fix(server): Codex keeps your permissions profile when T3 resumes the thread between turns (#20266)

T3 resumes a loaded Codex thread before every turn whose runtime settings
changed. That thread/resume response reports the thread's current state,
which has no active permission profile after a Full access (or any legacy
sandboxPolicy) turn, so the adapter forgot the user's profile and the next
Auto turn fell back to sandboxPolicy, dropping the profile's .env denies.

A response without a user-defined profile now leaves the remembered one in
place. The round-trip test now issues the thread/resume calls T3 really
makes between turns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41f688b86bJulius Marminge committed on 10/22/2026, 12:34:36 PMparentdeff3b8
2 files changedLine totals unavailable