Codex Source Notes
Codex Source Notes
This series reads openai/codex by following one ordinary request: how it becomes a typed operation, enters session and turn ownership, projects context, exposes tools, narrows authority, and leaves evidence that clients, recovery paths, the memory layer, and platform sandboxes can reuse.
The English pages are standalone articles, not route stubs. Source claims are tied to a fixed openai/codex public snapshot; product contracts come from OpenAI documentation.
Establish the route first: entry, typed protocol, session, turn, context, model stream, tool authority, and evidence projection.
Source Notes · Part II Context Is a Runtime LedgerSeparate runtime context, prompt projection, compaction replacement, rollout persistence, rollback, and resume boundaries.
Source Notes · Part III Protocol and Event StreamFollow typed requests, submissions, operations, events, app-server projection, rollout, and resume as one shared evidence layer.
Source Notes · Part IV Tools Are Runtime ContractsRead how tool specs, routing, registry hooks, invocations, approval, sandboxing, events, and history stay separated.
Source Notes · Part V Permission and SandboxingFollow policy, permission hooks, orchestrator decisions, sandbox attempts, approvals, denial, retry, and structured review events.
Source Notes · Part VI Client ProjectionSeparate core events, turn items, thread items, server notifications, TUI cells, and rollout evidence.
Source Notes · Part VII Extensions and Multi-AgentRead how skills, plugins, MCP tools, dynamic tools, tool discovery, and agent control enter the same turn boundary.
Source Notes · Part VIII Hooks and Lifecycle SlotsPlace hook discovery, prompt gates, tool gates, permission requests, compact, stop, and protocol events back into the turn lifecycle.
Source Notes · Part IX Performance and Prompt CacheTie the OpenAI caching contract, cache keys, stable prefixes, dynamic tails, compaction, and token metrics into one request-shape story.
Source Notes · Part X Rollout and RecoveryFollow rollout items, JSONL writes, initial history, reverse scan, replay suffix, rollback markers, and fork snapshots.
Source Notes · Part XI SDK and app-serverRead app-server initialization, typed client requests, thread/start, turn/start, listener projection, and SDK wrappers as one runtime entry path.
Source Notes · Part XII Memory LayerRead Feature::MemoryTool, memory_mode, Phase 1 / Phase 2, the memories workspace, read path, citation, and polluted threads as one local recall layer.
Source Notes · Part XIII Windows SandboxFollow SandboxAttempt, sandbox users, ACLs, firewall rules, command runner, and restricted tokens as the Windows local execution boundary.