delegate
Send coding tasks to OpenAI Codex, set workspace and mode, then check run status before using results so agents can plan and review while Codex executes.
Instructions
Delegate a coding task to OpenAI Codex. Never run codex from the shell — use this tool. Check status before trusting result — a run that spawns then fails returns normally. Set spec, workspace and mode, plus resumeThreadId to resume and reviewTarget in review; leave every other field at its default unless the user asks. See the delegate skill.
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": {
"spec": "<spec>",
"workspace": "<workspace>"
},
"name": "delegate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fast | No | Codex Fast mode; higher credit use. | |
| mode | No | agent implements; plan returns a structured plan; ask answers; review runs native review. | agent |
| spec | Yes | Brief with goal, scope, fixed decisions quoted exactly, and acceptance criteria; reference files instead of pasting code. | |
| model | No | Codex model id. doctor deep:true lists every id. | gpt-6-luna |
| timeoutMs | No | Whole-run cap in ms (default 6h). Mid-turn silence is allowed; startup has a separate 60s first-output deadline. | |
| webSearch | No | Codex's built-in web search. | |
| workspace | Yes | Codex's working directory; not confinement. Must already exist — never create one for the call. | |
| reviewTarget | No | Required in review; forbidden otherwise: uncommitted, base branch, or commit. | |
| resumeThreadId | No | Thread to continue. Reuse its workspace. Forbidden with review. | |
| reasoningEffort | No | Codex reasoning level. doctor deep:true lists each model's levels. | xhigh |