Dispatch Backend Execution to Codex
codex_exec_backendDispatch a backend implementation and unit-testing task to the local Codex CLI with sandboxed writes, session resume, and worktree isolation. Auto-detaches before MCP timeout.
Instructions
Dispatch a self-contained, interface-locked backend implementation and unit-testing task to the local Codex CLI (GPT 6.2-sol) using --sandbox workspace-write. Supports resume_session_id, use_worktree, and auto-detaches before MCP timeout with wait_cmd for reactive wakeup.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "codex_exec_backend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| async | No | If true, return immediately with run_id and wait_cmd for reactive wakeup via run_command (recommended for backend coding). | |
| title | No | Short task title shown in the AI Hub dashboard. | |
| prompt | Yes | Detailed backend implementation instructions. | |
| workdir | No | Absolute working directory path. | |
| test_cmd | No | Optional test command Codex should run before finishing. | |
| timeout_sec | No | Timeout in seconds (default 1200). | |
| use_worktree | No | Optional: run fresh Codex exec in a new isolated git worktree. | |
| contract_path | No | Optional path to shared API contract file. | |
| soft_wait_sec | No | Max seconds to wait synchronously before auto-detaching (default 25, max 120, 0 = immediate async). | |
| resume_session_id | No | Optional previous Codex thread_id to resume rework without losing context. |