mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Guardian's retained root context appended assistant messages after user evidence and omitted questions sent through User Messaging. This could leave subagent authorization reviews with missing or misplaced conversational context. ## What changed - Record assistant messages and function calls in the same order sequence as accepted user inputs, then merge retained review context by recorded position while prioritizing user evidence within the message budget. - Capture bounded User Messaging text after input hooks when a send succeeds, and match it to the original call for assistant context. - Label assistant context without a recorded position explicitly and clear parent assistant and tool positions when forking agent history. - Clarify that recorded order does not establish delivery order or pair ordinary replies with questions; assistant messages remain untrusted context. ## Testing Add coverage for hook-rewritten messages, failed or unconfirmed sends, queued replies with delayed tool results, ordering across resume, and removal of inherited assistant positions from forked history. GitOrigin-RevId: ac717cf0f5efe4b05c18f2d8370dd48453ac4e35