mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
## Why Guardian V3 uses fixed guidance for grouping evidence into board channels and deciding when to retrieve more evidence. Longer routing instructions also leave less room for evidence in the model's context window. ## What changed Under `features.guardianv3`, add `housekeeper.routing_instructions` and `reviewer.retrieval_instructions` to customize those strategies while preserving the routing format and the reviewer's board and authorization rules. Blank or omitted instructions use the built-in guidance. Add an optional `max_instruction_tokens` cap that validates each custom prompt separately using an estimated token count. Ignore both prompts and the cap in project config. The `housekeeper.batch_timeout_ms` setting controls the per-batch routing timeout and defaults to 90 seconds. Size routing batches to fit the model's input window after accounting for the prompt and response schema. Route the largest fitting prefix of whole evidence records within the tool-output budget and leave the rest pending. ## Testing Cover prompt validation, project config filtering, feature toggle merging, and default retrieval guidance. Exercise custom prompts in model requests and verify that routing reduces a batch under context pressure or stops without advancing the cursor when even one record cannot fit. GitOrigin-RevId: 83b3fcd23c680e90d2b2aea82a4a290633729658
ThreadManager Sample
Small one-shot binary that starts a Codex thread with ThreadManager from
codex-core-api, submits a single user turn, and prints the final assistant
message.
Authentication uses the configured credential storage under CODEX_HOME, including
cli_auth_credentials_store, mcp_oauth_credentials_store, and
features.secret_auth_storage. Local managed authentication requirements and auth
routing settings are respected. This also applies to cargo run builds. Other
execution settings remain the sample's built-in configuration.
cargo run -p codex-thread-manager-sample -- "Say hello"
Use --model to override the configured default model:
cargo run -p codex-thread-manager-sample -- --model gpt-5.2 "Say hello"
The prompt can also be piped through stdin:
printf 'Say hello\n' | cargo run -p codex-thread-manager-sample