Expand description
Protocol types for the Codex CLI exec --json JSONL output.
When the CLI is invoked with codex exec --json, every line on stdout is a
JSON object whose "type" field determines the variant.
type | Rust variant | Description |
|---|---|---|
thread.started | ThreadStarted | Thread ID assigned for this execution. |
turn.started | TurnStarted | A new turn has begun. |
turn.completed | TurnCompleted | Turn finished successfully. |
turn.failed | TurnFailed | Turn failed with an error. |
item.started | ItemStarted | An item (message, command, etc.) began. |
item.updated | ItemUpdated | Incremental update to an in-flight item. |
item.completed | ItemCompleted | An item finished. |
token_count | TokenCount | Token usage statistics. |
error | Error | Execution-level error. |
Structs§
- File
Update Change - A single file change within a
Item::FileChange. - Thread
Error - Error information from a failed turn.
- Todo
Item - A single item in a
Item::TodoList. - Usage
- Token usage statistics.