Glossary and References
源码版本rust-v0.145.0
This page collects terms, crate names, and protocol abbreviations that recur throughout the codex breakdown, with a short definition and a link to source / official material.
Core terms
| Term | English | Description | Source / material |
|---|---|---|---|
| Coding agent | coding agent | an agent that can read and edit files and run commands | codex-rs/core/src/ |
| Session thread | CodexThread | codex's session orchestration entry, consumes Op and drives the LLM | codex-rs/core/src/codex_thread.rs:162-210 |
| Agent main loop | agent loop | the loop that consumes Op, calls the LLM, and executes tools | codex-rs/core/src/agent/ |
| Compaction | compaction | when the context is too long, fold history into a summary | codex-rs/core/src/compact.rs |
| Patch protocol | apply_patch | a text patch format generated by the model, applied to edit files | codex-rs/apply-patch/ |
| Sandbox | sandbox | command execution isolation layer, cross-platform | codex-rs/sandboxing/ |
| Command classification | execpolicy | classifies shell commands to decide allow / block / approve | codex-rs/execpolicy/ |
| App-server | app-server | exposes Agent capabilities via a protocol to external clients | codex-rs/app-server/ |
| Model provider | model provider | abstracts different LLM backends | codex-rs/model-provider/ |
| Cloud Tasks | cloud-tasks | ships tasks to run on the OpenAI cloud | codex-rs/cloud-tasks/ |
| MCP | Model Context Protocol | a standard protocol for tools / resources | codex-rs/mcp-server/ |
| Responses API | Responses API | OpenAI's unified model invocation interface | codex-rs/core/src/client.rs:413-480 |
Crate naming convention
Most codex-rs crate names correspond to directory names with a codex- prefix (e.g. codex-core, codex-tui). Check the [package] name field in Cargo.toml to confirm the official crate name.
Protocol abbreviations
- SSE: Server-Sent Events, streaming response transport
- JSON-RPC: the message format for App-server / MCP
- DECSET: terminal escape sequence, used by the TUI to switch modes (e.g.
DECSET 2026enters the kitty keyboard protocol)
Official material
- Repository:
openai/codex - Installation and usage: see the README at the repository root; this site does not duplicate it
- Config files: the repository's
docs/andcodex-rs/config.md - System prompts:
codex-rs/prompts/templates/