Skip to content

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

TermEnglishDescriptionSource / material
Coding agentcoding agentan agent that can read and edit files and run commandscodex-rs/core/src/
Session threadCodexThreadcodex's session orchestration entry, consumes Op and drives the LLMcodex-rs/core/src/codex_thread.rs:162-210
Agent main loopagent loopthe loop that consumes Op, calls the LLM, and executes toolscodex-rs/core/src/agent/
Compactioncompactionwhen the context is too long, fold history into a summarycodex-rs/core/src/compact.rs
Patch protocolapply_patcha text patch format generated by the model, applied to edit filescodex-rs/apply-patch/
Sandboxsandboxcommand execution isolation layer, cross-platformcodex-rs/sandboxing/
Command classificationexecpolicyclassifies shell commands to decide allow / block / approvecodex-rs/execpolicy/
App-serverapp-serverexposes Agent capabilities via a protocol to external clientscodex-rs/app-server/
Model providermodel providerabstracts different LLM backendscodex-rs/model-provider/
Cloud Taskscloud-tasksships tasks to run on the OpenAI cloudcodex-rs/cloud-tasks/
MCPModel Context Protocola standard protocol for tools / resourcescodex-rs/mcp-server/
Responses APIResponses APIOpenAI's unified model invocation interfacecodex-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 2026 enters 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/ and codex-rs/config.md
  • System prompts: codex-rs/prompts/templates/