Skip to content

bug: full-access CAS threads can still prompt or stay stuck pending #105

Description

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

  1. Bind a CAS thread and switch it to Full Access.
  2. Trigger a command that produces a Codex interactive approval or questionnaire.
  3. Let the interactive state go stale, or cancel the run while that state is still hanging around.
  4. 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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions