codex_dispatch
Dispatch implementation specs to a local Codex CLI as async background tasks, then wait for automatic wakeup instead of polling status.
Instructions
Dispatch a detailed implementation specification to local Codex CLI running non-interactively with the configured Codex Castor permission policy (full access by default). Configured as an async background tool: after calling it, do NOT poll codex_status; either work on something else or stop your turn and wait for automatic 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": {
"workdir": "<workdir>"
},
"name": "codex_dispatch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Complete, self-contained Markdown task specification for Codex. Provide either spec or spec_file. | |
| model | No | Optional Codex model override (omit to use default in ~/.codex/config.toml). | |
| title | No | Optional concise human-readable title for this task. | |
| task_id | No | Optional short unique slug (e.g. 'feat-auth-jwt'). Auto-generated if omitted. | |
| workdir | Yes | Absolute path to the target project/working directory. | |
| base_ref | No | Git ref to branch from when use_worktree=true (default: HEAD). | HEAD |
| fast_mode | No | Optional override to enable or disable Codex Fast mode (service_tier='fast') for this round. Omit to use the Codex Castor Fast mode setting. | |
| spec_file | No | Absolute path to an existing Markdown specification file. Provide either spec or spec_file. | |
| use_worktree | No | If true, run Codex in an isolated managed Git worktree (branch codex/<task_id>). REQUIRED when running multiple Codex tasks in parallel on the same repository. | |
| permission_mode | No | Optional override for Codex permission/approval policy for this round ('full_access', 'approve_for_me', 'workspace_write', 'read_only'). Omit to use the Codex Castor permission setting. | |
| reasoning_effort | No | Optional Codex reasoning effort override (e.g. 'medium', 'high', 'xhigh'). | |
| extra_writable_dirs | No | Optional extra directories passed via --add-dir. |