mirror of
https://github.com/openai/codex.git
synced 2026-09-07 15:40:00 +00:00
## Why Thread settings can update the approval policy after a turn context is created. Keeping a separate copy on `TurnContext` could leave tool approval checks using the previous policy. ## What changed - Remove the duplicated approval-policy field from `TurnContext`. - Resolve the policy through the turn's current configuration everywhere it is needed, including tool execution, Guardian routing, MCP handling, and permission requests. ## Testing - Update the shell escalation test to apply a thread-level policy override and verify that the next turn rejects an escalation using the updated policy. GitOrigin-RevId: e5966ba08f179d53fd76871ad904762958c0f5ea