Skip to main content

Module events

Module events 

Source
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§

ItemCompletedEvent
Event indicating an item has completed.
ItemStartedEvent
Event indicating an item has started processing.
ItemUpdatedEvent
Event indicating an item has been updated.
ThreadError
Error information from a thread.
ThreadErrorEvent
A thread-level error event.
ThreadStartedEvent
Event indicating a thread has started.
TurnCompletedEvent
Event indicating a turn has completed successfully.
TurnFailedEvent
Event indicating a turn has failed.
TurnStartedEvent
Event indicating a turn has started.
Usage
Token usage statistics for a completed turn.

Enums§

ThreadEvent
All possible events emitted during a Codex exec-format thread execution.