Delegate work to a new Codex session
delegate_to_codexDelegate a coding task to Codex by creating a session in the target directory, sending the prompt, and returning the reply while preserving thread history for review in Codex Desktop.
Instructions
Create a named Codex session at the requested project directory, send Claude's prompt into it, return Codex's reply, and hand the session to Codex Desktop without leaving the bridge writer lock behind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Absolute project directory where Codex must work | |
| name | No | Optional Codex session title; otherwise one is derived from the prompt | |
| model | No | Model override, e.g. gpt-5.6-luna | |
| effort | No | Override reasoning effort (default whatever ~/.codex/config.toml says) | |
| prompt | Yes | The complete task Claude is delegating to Codex | |
| openInApp | No | Show the task in Codex Desktop; native tasks open immediately while running | |
| timeoutSec | No | How long to observe the task (Desktop caps the entire call, including creation, at 40s; the task continues and its threadId is returned) | |
| releaseAfterTurn | No | Unsubscribe this thread after a terminal turn; open Desktop only after its unload is confirmed |