Skill v1.0.0
currentAutomated scan100/100name: codex-control-claude description: Delegate coding analysis, implementation, review, and debugging tasks from Codex to a local Claude Code worker through MCP. Use when the user asks Codex to call, consult, hand work to, or continue work with Claude Code. metadata: version: "1.0.0"
Codex Control Claude
Delegate only the task the user placed in scope. Keep the Claude session inside the selected project and preserve explicit approval for sensitive tools.
Preflight
- Resolve
cwdto an existing absolute project directory. - Confirm that the current task exposes all four lifecycle tools from the MCP server named exactly
codex-control-claude:claude_code,claude_code_check,claude_code_reply, andclaude_code_session. - Do not call the separate global MCP server named
claude_code, itsAgenttool, or agent types such ascode-reviewerordefault. Do not substitute any other agent interface for the four lifecycle tools. - If the four tools are unavailable, stop and tell the user to fully exit and restart the Codex desktop app, then create a new task. A skill can refresh without the desktop process refreshing its MCP tool registry.
- Treat
agent type not found,registry empty, or a missing agent type as evidence that the wrong MCP server was selected, not as a provider or Claude Code failure. - If MCP startup readiness is uncertain after the four tools are visible, run
scripts/doctor.ps1from the plugin root. The worker must use the locally configured Anthropic-compatible third-party provider; do not direct the user to/login. - If provider configuration is missing, direct the user to run
scripts/configure-provider.ps1in a local PowerShell. Never ask the user to paste an API key into chat. - Do not print environment-variable values, the encrypted provider file, or Claude credential files.
Choose A Mode
For analysis, review, or diagnosis, start claude_code with:
{"allowedTools": ["Read", "Glob", "Grep"],"strictAllowedTools": true,"maxTurns": 24}
For implementation explicitly requested by the user, start with:
{"allowedTools": ["Read", "Glob", "Grep", "Edit", "Write"],"strictAllowedTools": false,"maxTurns": 24}
Always include the absolute cwd. Do not set a bypass permission mode. Do not add advanced.additionalDirectories unless the user names them. Use the provider-configured model by default. Do not override the model in a tool call unless the user explicitly names a model that the configured provider supports.
Run The Session
- Call
claude_codewith a self-contained prompt,cwd, and the selected policy. - Retain the returned
sessionId; initializecursorto0. - Poll with
claude_code_check(action="poll"). Pass the lastnextCursoron every subsequent poll and follow the returned poll interval. - If status is
waiting_permission, inspect every action. Do not approveBash, network-capable tools, additional directories, or tools outside the selected policy without user authorization. - Resume polling until status is
idle,error, orcancelled. - Report the final result, files changed, verification performed, and any denied or timed-out action.
Do not turn a failed or incomplete Claude run into an unreported Codex-side implementation. State which worker layer failed before deciding the next in-scope step.
Continue Or Stop
- Use
claude_code_replywith the samesessionIdfor a user-requested follow-up. - Use
claude_code_session(action="get")to inspect state. - Use
claude_code_session(action="cancel")when the user cancels, the task exceeds scope, or cleanup is required. - Never resume a session from another project without confirming its
cwdand task scope.