28. Glossary

One term, one meaning. These are the terms this book uses, with the chapters that explain each. Code identifiers keep their exact spelling.

Term Meaning Ch
AGENTS.md A Markdown file of project instructions that Codex finds from the repository root to the working directory and adds to the context 7
Agent role A named configuration for a child agent; it can switch features off but never on 20
apply_patch Codex’s file-edit tool: a free-form tool with its own patch grammar, applied in-process with sandboxed writes 11
App server The JSON-RPC runtime (codex app-server, crate codex-app-server) that hosts threads for every client 2, 21
App-server client The library (codex-app-server-client) through which the terminal UI and codex exec reach the app server in-process or remotely 2, 22
Approval A decision by a hook, the Guardian, or a person to let an action run that the policy does not allow on its own 13
Approval policy AskForApproval: on-request (the default), granular, never, or the internal untrusted that Codex applies only to untrusted projects; when Codex must ask 13
Approvals reviewer Who answers approvals: user or auto_review (the Guardian); unset, it can resolve to auto_review 13, 16
arg0 dispatch The multicall trick by which the one codex binary acts as apply_patch, the Linux sandbox helper, and other helpers 2
Auto-compaction Compaction that the turn loop starts on its own when the token count crosses a limit 8
Base instructions The model’s standing system prompt, sent as the leading developer message of the prompt 6, 7
Bubblewrap The Linux tool (bwrap) that Codex vendors and uses to build a filesystem and namespace sandbox 14
Cancellation token A Tokio CancellationToken; one per task, with child tokens for the turn, each sampling request, and each tool call 5, 27
Code mode A tool mode in which the model writes JavaScript for an exec tool that runs in V8 and calls other tools as tools.* 12
CODEX_HOME The directory (by default ~/.codex) that holds configuration, credentials, rollouts, and state 24, 25
codex exec The headless surface: one prompt, an in-process app server, optional JSON Lines output 23
CodexThread The public handle to one thread; it owns the Session and the queue endpoints 4
Compaction Replacing a long history with a shorter one that keeps recent user messages and a summary; local or remote 8
Config layer One source of configuration with a numeric precedence, from packaged defaults to managed settings 25
Context window The number of tokens a model can read in one request; the budget the context manager works within 7, 8
Daemon A shared app server process on your machine that several terminal windows attach to over a Unix socket 2, 22
Developer message An input item with role developer; how Codex sends base instructions and context diffs 6, 7
Dynamic tool A tool a client defines at runtime; Codex forwards calls to it as a server-to-client request 12
Elicitation A request from an MCP server for input from the user, relayed by Codex 17
Engine codex-core and its close relatives: threads, sessions, the turn loop, the model client, context, persistence 1, Part II
Environment context The context section that tells the model its working directory, shell, date, and environments 7
Event (EventMsg) One of 86 typed messages a session emits, such as TurnStarted or ExecApprovalRequest 4
Execpolicy Codex’s rule engine for commands: prefix rules that allow, prompt, or forbid, with the strictest match winning 15
exec_command The shell tool: runs a command, possibly in a long-lived terminal session; paired with write_stdin 10
Experimental API App-server methods marked experimental; a client must opt in with experimentalApi 21
Extension A crate under codex-rs/ext/ that adds tools, context, or behavior through the extension registry 19
Feature flag An entry in codex-rs/features/src/lib.rs with a stage and a default; 237 at the pinned commit 1, 25
Fork A new thread that starts from a copy of another thread’s history 4, 24
Guardian A read-only model reviewer that answers approval requests with an outcome, a risk level, and a rationale 16
Harness In this book, the crates that turn model output into safe actions: tools, exec, apply_patch, approvals, sandboxes, execpolicy, network control 1
Hook A user-configured command that runs on a turn or tool event; the only surface that can block or rewrite a tool call 18
Item (TurnItem) A typed unit of conversation, such as a user message, agent message, reasoning summary, command, or file change 4
JSON-RPC The request, response, and notification format the app server speaks, without the "jsonrpc" field 21
Landlock A Linux kernel feature that restricts file access; Codex keeps only a legacy Landlock mode behind the DEPRECATED use_legacy_landlock flag 14
MCP Model Context Protocol; a standard for tool servers that Codex connects to as a client 17
Model catalog The list of models with their context windows, reasoning levels, and tool modes (models.json) 6
Model provider A configured endpoint and authentication for model requests; Codex speaks only the Responses API 6
Multi-agent Codex’s support for agents that spawn child agents, forming a tree of threads 20
Network proxy The local proxy that mediates a sandboxed command’s outbound traffic under allow and deny rules 16
Op One of 36 submission commands a client sends to a session, such as Interrupt or ExecApproval 4
Permission profile A named set of filesystem and network permissions, such as read-only or workspace-write 13
Plugin A bundle of skills, MCP servers, apps, and hooks installed from a marketplace 18
Prefix rule An execpolicy rule that matches commands by their leading words 15
Prompt cache Provider-side reuse of a request’s unchanged leading tokens; why Codex keeps the prompt prefix stable 6, 7
Protected path A location inside a writable root that the sandbox keeps read-only, such as .git 13, 14
Remote control A mode in which a local app server connects out to a relay so another device can drive it 21
requirements.toml A separate stack of administrator constraints that bounds what configuration may set 25
Responses API The OpenAI model API that Codex speaks, over HTTP with server-sent events or over WebSocket 6
Responses Lite A catalog setting under which tools travel as an input item rather than a tools array 6, 12
Resume Rebuilding a thread’s history from its rollout so the conversation can continue 24
Rollout A thread’s append-only JSON Lines log of items and events under CODEX_HOME/sessions/ 24
Sampling request One call to the model inside a turn 5, 6
Sandbox The operating-system confinement of a command: Seatbelt on macOS, bubblewrap with seccomp on Linux, or a restricted token on Windows 14
Seatbelt The macOS sandbox, applied through sandbox-exec with a generated policy 14
Seccomp A Linux kernel filter on system calls; used to block network access in the sandbox 14
Server request One of eight requests the app server sends to a client, such as an approval, and waits for 21
Session The in-memory engine state that serves one thread, with its own submission loop 4
Skill A folder with a SKILL.md file whose name and description enter the context and whose body loads on selection 18
Steering Adding input to a turn that is already running instead of starting a new one 5
Submission loop The one task per session that receives submissions in order; an actor 4
Surface A front end: the terminal UI, codex exec, an SDK, or an editor or desktop client 1
Task The unit of work a session runs, such as a regular turn, a review, a compaction, or a user shell command 5
Thread One conversation, persisted as a rollout 4
ThreadManager The registry that creates, resumes, forks, and stops threads 4
Token budget The share of the context window a thread may fill before Codex compacts; also the token_budget flag (UNDER DEVELOPMENT, off), which replaces the summary with a fresh-window reset 8
Tool A capability the model can call, declared by a schema or grammar 9
Tool handler The Rust code that serves one tool 9
Tool mode Whether the model calls tools directly, through code mode, or only through code mode 9, 12
Turn One user input and every model call and tool call that answers it 3, 5
Turn context The per-turn settings: model, working directory, approval policy, sandbox, and tools 5
Unified exec The process manager behind exec_command that keeps long-lived terminal sessions 10
World state The named context sections that render in full once and as diffs afterward 7
write_stdin The tool that sends input to, or polls, a running exec_command session 10