Expand description
Exec-format JSONL event types.
These types represent the events emitted by codex exec --json -, where
each line is a JSON object with a "type" field. They are distinct from
the app-server’s JSON-RPC notifications, but share the same ThreadItem
types.
§Example
use codex_codes::ThreadEvent;
let json = r#"{"type":"thread.started","thread_id":"th_abc"}"#;
let event: ThreadEvent = serde_json::from_str(json).unwrap();
assert_eq!(event.event_type(), "thread.started");Structs§
- Item
Completed Event - Event indicating an item has completed.
- Item
Started Event - Event indicating an item has started processing.
- Item
Updated Event - Event indicating an item has been updated.
- Thread
Error - Error information from a thread.
- Thread
Error Event - A thread-level error event.
- Thread
Started Event - Event indicating a thread has started.
- Turn
Completed Event - Event indicating a turn has completed successfully.
- Turn
Failed Event - Event indicating a turn has failed.
- Turn
Started Event - Event indicating a turn has started.
- Usage
- Token usage statistics for a completed turn.
Enums§
- Thread
Event - All possible events emitted during a Codex exec-format thread execution.