mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
## Why MCP hooks could only use the default spill threshold. Hooks that return larger context, such as a session-start memory hook, need a way to keep more of that context inline. ## What changed Allow `mcp_tool` hooks to set `additionalContextLimit` for events that can emit `additionalContext`. Plaintext context spills to disk above approximately 2,500 tokens by default. MCP hooks can set a threshold from 1 to 10,000 tokens. A value of 0 or above 10,000 warns and uses 10,000. Hook trust hashes use the effective threshold. Expose the setting in app-server configuration requirements and hook list responses. ## Testing Cover limit normalization, warnings, trust hashes, and app-server reporting. Verify that a bundled memory hook with a higher threshold injects its full context at startup and after compaction. GitOrigin-RevId: 318704ac1532267b3eb2f138f130b6799863a5c0
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.