← openai/codex
CodeVetter · Repo Unpack · Data flow

openai/codex

Scanned commit a1f40f3f13 dated 2026-09-22 — last upstream commit. Generated by codevetter codevetter 1.12.0 on 2026-09-22. Deep analysis by cli:grok via the grok CLI on 2026-09-22 (229s).

A user prompt enters either as a TUI `Op::UserTurn`, an exec submit, or an app-server `turn/start` params object. Core enqueues it on the session submission channel. `submission_loop` turns it into model input: prior rollout items plus a bounded developer/user context built from `core/context` fragments. The model streams Responses events; tool calls are dispatched by the tool router, their outputs are appended as function-call items, and the loop continues until the turn completes. Side effects (shell stdout, patch files, MCP results) are approved, sandboxed, then written back into the event stream and the rollout JSONL. Clients render `Event` values; nothing rewrites history except explicit compact, which summarizes and replaces older items under a size cap.