mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why A `PreToolUse` hook can change a tool's arguments while keeping its call ID. An asynchronous risk score for that ID still describes the original action, even if the score arrives after the rewrite. ## What changed Require synchronous Guardian review when a hook changes the tool payload and discard the original assessment. Preserve normal review behavior when the hook returns an identical payload. Also require synchronous review for MCP elicitations without an associated tool approval context. ## Testing Add regression coverage for unchanged hook output, rewritten patches whose original scores arrive before the rewrite or during review, and MCP elicitations with missing approval context or rewritten inputs. GitOrigin-RevId: 994519d61d52c69edcdec9517766a8e3051587d5