mirror of
https://github.com/openai/codex.git
synced 2026-09-04 15:08:45 +00:00
## Why Multi-agent mode instructions are durable model context and need to survive history changes without re-emitting unrelated setup hints. ## What changed - Add a `multi_agent_mode` world-state section that diffs, retains, and restores the effective mode instructions. - Persist mode changes in world-state snapshots while keeping the legacy `TurnContextItem.multi_agent_mode` field for reading older rollouts. - Keep initial mode instructions after the root-agent usage hint so the active mode takes precedence, and bound custom mode text before snapshotting it. ## Testing - Add snapshot coverage for mode transitions, retained history, and custom-text truncation. - Verify live mode changes preserve instruction ordering, avoid duplicating the usage hint, and record both modes in world state. GitOrigin-RevId: 96b9964d6e5299b07a011c559b68e3d948a49226
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.