Observe Codex Turn
codex_observeMonitor a Codex thread's runtime events, pending requests, and terminal output. Use optional bounded waits during live turns to stay updated without polling.
Instructions
Read bounded incremental sanitized Bridge runtime events, pending requests, and terminal output for a thread. Optional wait_ms performs one bounded event-driven wait only when the live turn is active and the current snapshot has nothing useful; it is not polling or stall detection. After Bridge process loss, falls back to persistent thread/read history and marks live state unreconstructable. A long interval with no new command or output can still mean Codex is actively reasoning; absence of new command activity alone is not evidence of a stall. When actively supervising an in-progress turn, use repeated bounded-wait observe calls until terminal unless the user explicitly pauses or stops; do not end supervision merely because one snapshot is inProgress. After every wake or deadline return, inspect the newly available events/state and decide whether steer, respond, or interruption is needed before starting the next bounded wait.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum runtime events to return. | |
| cursor | No | Return runtime events with a cursor greater than this value. | |
| wait_ms | No | Optional per-call wait for the next live runtime change when nothing useful is ready; 0 returns immediately. This is event-driven waiting, not stall detection. | |
| thread_id | Yes | Codex thread to observe. |