mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
## Why Namespace-wide guidance can repeat on every entry in flat Code Mode listings. The existing prefix limit covers only reachable `functions` tools, leaving indirect namespace guidance outside the budget. ## What changed - Add `builtin_tool_namespaces` to put guidance on namespace headers in Code Mode prompts and tool search responses, including headers shared with client tools. The selector applies to namespaces with a registered built-in tool and is omitted from flat listings. Overlapping selectors must agree after trimming. - Validate all four prefix maps together against the selected model's `description_prefix_budget_bytes`, which defaults to 512. Count each trimmed value once in UTF-8 bytes, including unused selectors. Exclude keys, paragraph separators, and rendered copies. ## Testing Cover shared headers, flat listings, and conflicting selectors. Exercise the default budget boundary with multibyte text and verify that a model can raise the limit. GitOrigin-RevId: 1570c23ea1dbad6041cc8e48d0dc2b77f92596c7
codex-protocol
This crate defines the "types" for the protocol used by Codex CLI, which includes both "internal types" for communication between codex-core and codex-tui, as well as "external types" used with codex app-server.
This crate should have minimal dependencies.
Ideally, we should avoid "material business logic" in this crate, as we can always introduce Ext-style traits to add functionality to types in other crates.