codex_poll
Long-poll an asynchronous Codex job to wait for completion or new events, returning only events after a cursor and reporting truncation for safe, replayable progress tracking.
Instructions
Safely long-poll an asynchronous Codex job (wait_seconds <= 55). Supports replayable cursor (returns seq > cursor), truncation reporting, terminal/events wakeup modes, and optional intermediate event omission.
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": {
"job_id": "<job_id>"
},
"name": "codex_poll"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Last seen event seq; returns events with seq > cursor (default 0). | |
| job_id | Yes | Job ID returned by codex_run/resume/fork/review. | |
| wait_mode | No | Wakeup mode: 'terminal' (default) waits until job finishes or wait_seconds elapses; 'events' wakes immediately on any new event. | |
| wait_seconds | No | Long-poll duration in seconds (default 55, max 55). | |
| include_events | No | Include intermediate recent_events in response (default false in 'terminal' mode to save host context, true in 'events' mode). |