codex
Execute coding tasks via a Codex CLI session and receive a Thread ID to continue the conversation.
Instructions
Run a Codex CLI session. Executes codex exec as a subprocess and returns the result.
Use this tool to start a new coding task with Codex. The response includes a Thread ID that can be used with the codex-reply tool to continue the conversation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the Codex session | |
| model | No | Model name override. Do NOT set this unless the user explicitly requests a specific model or asks for the "latest" model — Codex CLI uses its own configured default. Known models: gpt-5.6-sol (latest, supports effort max) | |
| config | No | Config overrides as key-value pairs (passed as -c key=value) | |
| effort | No | Reasoning effort level. Auto-select based on task complexity: medium for simple tasks (quick questions, small edits), high for moderate tasks (bug fixes, features), xhigh for complex tasks (architecture, multi-file refactoring), max for the hardest tasks (deep analysis, large-scale design). Do NOT set if the user explicitly requests a specific level. | |
| prompt | Yes | The prompt to send to Codex | |
| profile | No | Configuration profile from config.toml | |
| sandbox | No | Sandbox mode for file access | |
| timeout | No | Timeout in milliseconds (default: 600000 = 10 min). Increase for long-running tasks. |