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