mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
## What changed - Add `features.guardianv2.sync_elastic_budgeting` and `sync_elastic_sections` to configure section minimums, per-entry token caps, and optional section maximums. Require and validate section limits when enabled. - Use the selected budgeting policy consistently for history capture, resume, prompt preparation, and review input budgeting. Keep fixed budgeting as the default. ## Testing Add configuration validation tests, capture-and-resume coverage for both budgeting modes, and a request-history snapshot verifying retained instructions and transcript section limits. GitOrigin-RevId: c7b0bdfd3e0e008d75c4d8a204959bcc58eb1bf8
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