Skip to main content

Module types

Module types 

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

typeRust variantDescription
thread.startedThreadStartedThread ID assigned for this execution.
turn.startedTurnStartedA new turn has begun.
turn.completedTurnCompletedTurn finished successfully.
turn.failedTurnFailedTurn failed with an error.
item.startedItemStartedAn item (message, command, etc.) began.
item.updatedItemUpdatedIncremental update to an in-flight item.
item.completedItemCompletedAn item finished.
token_countTokenCountToken usage statistics.
errorErrorExecution-level error.

Structs§

FileUpdateChange
A single file change within a Item::FileChange.
ThreadError
Error information from a failed turn.
TodoItem
A single item in a Item::TodoList.
Usage
Token usage statistics.

Enums§

Event
A single JSONL event read from codex exec --json stdout.
Item
An item within a codex execution turn.