Skip to main content

Module codex

Module codex 

Source
Expand description

Codex exec --json → AgentEvent translator — the answer text only.

Scoped to what a tool-less, one-shot turn produces (/btw, server/agent_handlers/side_question.rs): assistant text, the end of the turn, and failures. Tool items (command_execution, mcp_tool_call, …) are dropped rather than translated; the full renderer is the frontend’s providers/codex-translator.ts, which this follows for the frames it does handle:

  • item.started / item.updated / item.completed with item.type = "agent_message" (text in item.text) or item.type = "message", role = "assistant" (text in output_text content blocks). Each carries the item’s text SO FAR, not a delta, so only the new suffix is emitted as AssistantText.
  • turn.completed — Done, whose response is every message’s text.
  • turn.failed / error — Error. An error whose message contains Reconnecting... is a transient retry notice, not a failure.

Structs§

CodexTranslator