Expand description
Root of the codex-core library.
Re-exports§
pub use compact::content_items_to_text;pub use codex_prompts as review_prompts;
Modules§
- compact
- config
- connectors
- context
- Context fragments injected into model input.
- exec
- exec_
env - otel_
init - path_
utils - sandboxing
- shell
- skills
- spawn
- test_
support - Test-only helpers exposed for cross-crate integration tests.
- util
- windows_
sandbox
Macros§
- feedback_
tags - Emit structured feedback metadata as key/value pairs.
Structs§
- Attestation
Context - Request context that host integrations can use when deciding whether to generate an attestation header value.
- Background
Terminal Info - Codex
Responses Metadata - Caller-owned snapshot of Codex metadata sent to ResponsesAPI.
- Codex
Thread - Codex
Thread Settings Overrides - Thread settings overrides that app-server validates before starting a turn.
- Cursor
- Pagination cursor identifying the last item in a page.
- Loaded
Agents Md - Model-visible instructions loaded from AGENTS.md files and internal guidance.
- McpManager
- Model
Client - A session-scoped client for model-provider API calls.
- Model
Client Session - A turn-scoped streaming session created from a
ModelClient. - Model
Provider Auth Info - Configuration for obtaining a provider bearer token from a command.
- NewThread
- Represents a newly created Codex thread (formerly called a conversation), including the first event
(which is
EventMsg::SessionConfigured). - Prompt
- API request payload for a single model turn
- Response
Stream - Rollout
Recorder - Writes canonical session rollout items to JSONL.
- Sandbox
State - Session
Meta - SessionMeta contains session-level data that doesn’t correspond to a specific turn.
- Start
Thread Options - Thread
Config Snapshot - Thread
Item - Summary information for a thread rollout file.
- Thread
Manager ThreadManageris responsible for creating threads and maintaining them in memory.- Thread
Shutdown Report - Threads
Page - Returned page of thread (thread) summaries.
- TryStart
Turn IfIdle Error - Rejection returned when an extension asks to start automatic idle work but the thread is not eligible to run it.
- Turn
Context - The context needed for a single turn of the thread.
Enums§
- Exec
Policy Error - Fork
Snapshot - Response
Event - Rollout
Recorder Params - Sort
Direction - Steer
Input Error - Thread
Sort Key - TryStart
Turn IfIdle Rejection Reason - Explains why
CodexThread::try_start_turn_if_idlerejected an automatic idle turn.
Constants§
- ARCHIVED_
SESSIONS_ SUBDIR - DEFAULT_
AGENTS_ MD_ FILENAME - Default filename scanned for AGENTS.md instructions.
- LOCAL_
AGENTS_ MD_ FILENAME - Preferred local override for AGENTS.md instructions.
- PLUGIN_
TEXT_ MENTION_ SIGIL - Plugins use
@in linked plaintext outside TUI. - REVIEW_
PROMPT - Review thread system prompt.
- SESSIONS_
SUBDIR - TOOL_
MENTION_ SIGIL - Default plaintext sigil for tools.
- X_
CODEX_ INSTALLATION_ ID_ HEADER - X_
CODEX_ TURN_ METADATA_ HEADER - X_
RESPONSESAPI_ INCLUDE_ TIMING_ METRICS_ HEADER
Statics§
Traits§
- Attestation
Provider - Host integration boundary for just-in-time attestation header values.
- Time
Provider - Host integration boundary for reading and waiting on the current time.
Functions§
- append_
thread_ name - Append a thread name update to the session index. Name updates are append-only; the most recent entry wins when resolving names or ids.
- build_
models_ manager - check_
execpolicy_ for_ warnings - detached_
memory_ responses_ metadata - find_
archived_ thread_ path_ by_ id_ str - Locate an archived thread rollout file by its UUID string.
- find_
conversation_ path_ by_ id_ str - Locate a recorded thread rollout file by its UUID string using the existing
paginated listing implementation. Returns
Ok(Some(path))if found,Ok(None)if not present or the id is invalid. - find_
thread_ meta_ by_ name_ str - Locate a recorded thread rollout and read its session metadata by thread name. Returns the newest indexed name that still has a readable rollout header.
- find_
thread_ name_ by_ id - Find the latest thread name for a thread id, if any.
- find_
thread_ names_ by_ ids - Find the latest thread names for a batch of thread ids.
- find_
thread_ path_ by_ id_ str - Locate a recorded thread rollout file by its UUID string using the existing
paginated listing implementation. Returns
Ok(Some(path))if found,Ok(None)if not present or the id is invalid. - format_
exec_ policy_ error_ with_ source - grant_
read_ root_ non_ elevated - init_
state_ db - load_
exec_ policy - local_
agent_ graph_ store_ from_ state_ db - Construct the default SQLite-backed agent graph store when local state is available.
- parse_
cursor - Pagination cursor token format: an RFC3339 timestamp with an optional thread ID tie-breaker.
- parse_
turn_ item - read_
head_ for_ summary - Read up to
HEAD_RECORD_LIMITrecords from the start of the rollout file atpath. This should be enough to produce a summary including the session meta line. - read_
session_ meta_ line - Read the SessionMetaLine from the head of a rollout file for reuse by callers that need the session metadata (e.g. to derive a cwd for config).
- resolve_
installation_ id - rollout_
date_ parts - Extract the
YYYY/MM/DDdirectory components from a rollout filename. - thread_
store_ from_ config - truncate_
rollout_ after_ turn_ id - Return a rollout prefix ending after the requested persisted terminal turn.
- truncate_
rollout_ before_ turn_ id - Return a rollout prefix ending immediately before the requested persisted turn.
- web_
search_ action_ detail
Type Aliases§
- Codex
Apps Tools Cache - Backward-compatible name for the shared Codex Apps tools runtime.
- Codex
Conversation Deprecated - Conversation
Manager Deprecated - Generate
Attestation Future - NewConversation
Deprecated - Sleep
Future - State
DbHandle - Core-facing handle to the SQLite-backed state runtime.
- Time
Future