Skip to main content

Module codex

Module codex 

Source
Expand description

Serde models for the OpenAI Codex CLI *.jsonl session format.

Every line is a CodexLog wrapping a type discriminator and a CodexPayload. The payload is a wide union of optional fields because the same struct deserializes session-meta, turn-context, event-message, and response-item records; only the fields relevant to each record type are populated.

Structsยง

CodexContent
One content block of a Codex message payload.
CodexExecCommandArguments
Arguments for the current name == "exec_command" function call.
CodexGitInfo
Git repository metadata captured at the start of a Codex session.
CodexLog
A single line of a Codex/OpenAI session log.
CodexPayload
Event-specific payload of a CodexLog.
CodexShellArguments
Arguments of the legacy name == "shell" function call.
CodexShellMetadata
Exit-code and timing metadata for a Codex shell command.
CodexShellOutput
Result of a Codex shell command: captured output plus optional metadata.