worker_delegate
Delegate bounded coding, refactoring, or debugging tasks to a CLI worker; run synchronously up to a set wait limit and automatically continue as a background job if still running.
Instructions
Delegate a bounded coding, refactoring, or debugging task to a CLI worker (default: codex). Runs synchronously up to wait_seconds (default 35s) and seamlessly defers to a background job if still running.
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": {
"task": "<task>",
"cwd": "<cwd>"
},
"name": "worker_delegate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Target repository or working directory path. | |
| task | Yes | Clear, self-contained work order for the worker. | |
| model | No | Optional model override. | |
| worker | No | Worker driver name (default: 'codex'). | |
| extra_args | No | Optional pass-through CLI flags appended to the worker command. | |
| wait_seconds | No | Max seconds to wait before returning a running job_id (default 35, max 55). | |
| permission_mode | No | Permission preset: 'inherit' (default, respects ~/.codex/config.toml), 'read-only', or 'bypass'. | |
| timeout_seconds | No | Hard execution timeout in seconds (default 900). | |
| allow_concurrent | No | Override the per-cwd write lock if another write job is already active. | |
| max_rework_rounds | No | Circuit-breaker limit for subsequent followup rework rounds (default 3). |