What happens
A CAS thread can get stuck in the middle of a permission upgrade after stale interactive state is left behind.
In practice this shows up as /cas_status continuing to print:
Permissions: Default
Permissions note: Full Access will apply after the current Codex turn ends.
That can keep happening even after /cas_cancel or after the original interactive action is already dead.
There is a second user-facing symptom on the same path: a thread that is already supposed to be Full Access can still surface requestApproval prompts for dangerous commands instead of bypassing the approval bridge entirely.
Repro
- Bind a CAS thread and switch it to Full Access.
- Trigger a command that produces a Codex interactive approval or questionnaire.
- Let the interactive state go stale, or cancel the run while that state is still hanging around.
- Check
/cas_status or try another dangerous command.
Expected
- Full Access threads should not prompt for
requestApproval.
- If the run is gone, stale interactive state should be cleaned up.
- Pending permission migration should either apply or clear itself instead of staying stuck forever.
Actual
- The thread can stay in
Default with a permanent Full Access will apply after the current Codex turn ends note.
- Stale pending callbacks can outlive the run that owned them.
- Dangerous commands can still hit the approval bridge even though the thread is supposed to be Full Access.
Notes
This looks like two parts of the same lifecycle bug:
- the client path still forwards some
requestApproval events instead of auto-accepting them for Full Access threads
- controller cleanup paths clear some stale state, but not enough to unblock
pendingPermissionsMode migration when the owning run is already gone or no longer accepting input
Related background:
What happens
A CAS thread can get stuck in the middle of a permission upgrade after stale interactive state is left behind.
In practice this shows up as
/cas_statuscontinuing to print:Permissions: DefaultPermissions note: Full Access will apply after the current Codex turn ends.That can keep happening even after
/cas_cancelor after the original interactive action is already dead.There is a second user-facing symptom on the same path: a thread that is already supposed to be
Full Accesscan still surfacerequestApprovalprompts for dangerous commands instead of bypassing the approval bridge entirely.Repro
/cas_statusor try another dangerous command.Expected
requestApproval.Actual
Defaultwith a permanentFull Access will apply after the current Codex turn endsnote.Notes
This looks like two parts of the same lifecycle bug:
requestApprovalevents instead of auto-accepting them for Full Access threadspendingPermissionsModemigration when the owning run is already gone or no longer accepting inputRelated background: