Goal auto-continuations can downgrade Full Access threads to read-only/on-request while UI still shows Full Access
Summary
A Goal thread that is persisted and displayed as Full Access / no approvals can have automatic continuation turns launched with a read-only sandbox, on-request approvals, and a managed permission profile.
The visible state and persisted thread state indicate Full Access, but actual tool execution is restricted. This causes EPERM failures and approval paths during unattended Goal runs.
Environment
- Codex Desktop for macOS
- App version: 26.519.41501, build 3044
- Bundled CLI: codex-cli 0.133.0-alpha.1
- macOS: 15.7.4
- Goal feature enabled
What I expected
Goal automatic continuations should inherit the thread's effective permission context. If a Goal thread is Full Access with approvals disabled, its automatic continuation turns should also run with Full Access and no approvals.
Alternatively, if the runtime intentionally downgrades the permissions, the UI should show the effective downgrade before the continuation runs.
What happened
The thread metadata / persisted state showed Full Access:
thread_id=019e53bb-dda1-7ff3-ae85-3c3fd33b2119
sandbox_policy={"type":"danger-full-access"}
approval_mode=never
However, automatic Goal continuation turns in the rollout used a downgraded runtime context:
approval_policy=on-request
sandbox_policy={"type":"read-only"}
permission_profile=managed
This happened on automatic Goal continuation / resume turns, not on normal user-submitted turns.
Timeline / evidence
2026-05-24T05:44:39Z approval_policy=never sandbox_policy={"type":"danger-full-access"} permission_profile=disabled
2026-05-24T05:46:33Z approval_policy=on-request sandbox_policy={"type":"read-only"} permission_profile=managed
2026-05-24T05:52:16Z approval_policy=on-request sandbox_policy={"type":"read-only"} permission_profile=managed
2026-05-24T05:54:21Z approval_policy=on-request sandbox_policy={"type":"read-only"} permission_profile=managed
2026-05-24T06:03:17Z approval_policy=on-request sandbox_policy={"type":"read-only"} permission_profile=managed
2026-05-24T06:24:09Z approval_policy=on-request sandbox_policy={"type":"read-only"} permission_profile=managed
2026-05-24T06:25:55Z approval_policy=never sandbox_policy={"type":"danger-full-access"} permission_profile=disabled
The downgraded entries were automatic Goal continuations (summary=auto).
Error examples
Attempts to save local artifacts failed with EPERM during the downgraded Goal continuation turns, including a workspace file and temporary files:
EPERM: operation not permitted, open '<workspace-path>/29-current-debt-unpay-header-chain-field-final.png'
EPERM while writing /tmp/pf5665-write-test.txt
EPERM while writing /var/folders/.../pf5665-write-test.txt
A later command attempted to use an escalation path despite the UI/thread state indicating Full Access, and it failed as an approval rejection:
Rejected("rejected by user")
Impact
- Long-running Goal workflows become unreliable when unattended.
- The UI can say or imply Full Access while the actual runtime behaves like the default/read-only profile.
- The assistant may incorrectly ask for or attempt approvals in a thread that should not require them.
- File-producing tasks can stall on EPERM even when the thread was started and persisted as Full Access.
Related issues
This seems related to, but more specific than:
- #22090 (
/goalcontinuation uses stale permission context after permissions changes) - #23105 (Full Access
/goalsession falling back to sandboxed execution) - #21839 (previously-existing Full Access sessions requiring approvals)
The distinguishing detail here is that the persisted thread state still shows danger-full-access / approval_mode=never, while automatic Goal continuation turn_context entries are actually launched as read-only / on-request / managed.
10 Comments
Additional observation: in my local usage, this seems to occur mostly after Codex updates/restarts, or after some other condition that causes the app/session to exit and later resume.
I have not seen this happen while keeping the same Codex app process running continuously without restarting. The problematic cases so far are associated with a restart/resume boundary, where the thread still appears to be Full Access afterward but the Goal auto-continuation can run with the downgraded
read-only/on-request/managedcontext.Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for reporting. This is a known issue, and we're working on a fix.
In the meantime, you can work around it by issuing a dummy prompt after you change the permissions of the thread but before you create a goal. The same goes for other thread settings like the model, reasoning effort, and fast mode.
Solution: Fix Goal Auto-Continuations Downgrading Full Access Threads
Issue: openai/codex #24300
Labels: bug, sandbox, app, session, automations
Component: Goal Automation + Sandbox Permission Inheritance
Severity: HIGH (Breaks unattended Goal execution)
---
1. Problem Statement
A Goal thread that is persisted and displayed as "Full Access / no approvals" launches automatic continuation turns with:
Impact: This causes EPERM (permission denied) failures and approval prompts during unattended Goal runs, breaking the automation loop.
---
2. Root Cause Analysis
2.1 Architecture Overview
2.2 Likely Root Cause
Permission Profile Not Inherited in Auto-Continuation Path
When the GoalController spawns an auto-continuation turn, it creates a new execution context but fails to copy the parent thread's sandbox and permission settings. Instead, it uses default values:
read_only(safe default for manual turns)on_request(safe default for manual turns)The Full Access settings from the parent thread are not propagated to the continuation turn.
Code Flow:
---
3. Proposed Fix
3.1 Primary Fix: Inherit Permission Profile in Auto-Continuation
File:
src/goal/goal-controller.ts(or equivalent)3.2 Secondary Fix: Add Permission Validation
Add a validation step that ensures auto-continuation turns match the thread's permission profile:
3.3 Tertiary Fix: Add UI Consistency Check
Ensure the UI accurately reflects the actual permissions:
---
4. Testing Strategy
Unit Tests
Integration Tests
Regression Tests
---
5. Impact Assessment
---
6. Files to Modify
| File | Change |
|------|--------|
|
src/goal/goal-controller.ts| Inherit permission profile in spawnContinuationTurn ||
src/goal/permission-validator.ts(new) | Add permission validation for continuations ||
src/app/thread-status-renderer.ts| Add consistency check and warning indicator ||
src/types/turn-context.ts| Ensure all permission fields are inheritable ||
tests/goal/auto-continuation.test.ts| Add regression tests |---
7. Estimated Effort
What if there was no change in permissions, or model, reasoning, fast mode? I'm having this issue in a thread where I just set a goal without changing any of those settings...
Is it a new thread where you haven't sent any user prompts? Then this could occur. Sending a user prompt should work around the problem. If you're seeing this for a thread where you've already sent at least one user prompt and have not subsequently changed the permissions, let me know because that behavior would be explained by our current understanding of the problem.
Yes: already started thread, lots of replies back and forth, no permissions or other settings changed... and goal keeps asking for permissions even with "Full access." What more info do you need (I posted version etc in the closed duplicate thread.)
I can reproduce a closely related variant of this on Windows Codex Desktop, and in my case it is not limited to Goal auto-continuations.
Environment
OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0C:\Users\강인철\Desktop\AX\codeWhat I am seeing
The app/UI flow led me to believe I was operating in a Full Access-like mode, but newly created threads still persisted as:
approvalPolicy = on-requestapprovalsReviewer = guardian_subagentsandboxPolicy.type = workspaceWriteThis reproduces even for fresh test threads that do nothing except reply once and stop.
Why this seems related but broader than the current issue
This looks adjacent to the Full Access / visible-state mismatch in this issue, but I can reproduce it on ordinary new thread creation / handoff creation, not only on automatic Goal continuation turns.
In other words:
on-request/workspaceWriteRepro evidence from my local app state
Host-level persisted mode in
C:\Users\강인철\.codex\.codex-global-state.json:agent-mode-by-host-id.local = guardian-approvalspreferred-non-full-access-agent-mode-by-host-id.local = guardian-approvalsFresh / recent threads I created while investigating:
019e866c-0a1c-7601-a60c-686b686bcc5c->on-request / guardian_subagent / workspaceWrite019e8764-2aa9-73d2-9b3d-87ecb202af5a->on-request / guardian_subagent / workspaceWrite019e8765-f908-7410-b44d-443df7934c73->on-request / guardian_subagent / workspaceWrite019e877d-fb12-7683-8033-3f909b8ca714->on-request / guardian_subagent / workspaceWrite019e8689-b909-7ed1-a141-d0b3323a21cf->on-request / guardian_subagent / workspaceWriteOne extra datapoint:
approvalPolicy = never, while 60 wereon-requestSo the behavior is not a one-off for a single stuck thread; it looks like new threads are systematically defaulting back to the guardian/on-request path.
Minimal repro I used
on-request / workspaceWrite / guardian_subagent.Why this may be useful for triage
This seems different from issue patterns where:
never + danger-full-accessbut the approval UI still fires anywayIn my case, the persisted thread state itself already shows the downgrade:
on-request + workspaceWriteSo this may be a thread creation / permission inheritance bug on Windows Desktop, or a case where the UI selection is not being committed to the host/thread creation path.
I can reproduce a related VS Code variant that may be useful for debugging.
In a thread, the first bad permission transition I found happened before any
thread_goal_updatedevent in the session log:2026-05-19T22:18:53Z:approval_policy=never,sandbox_policy=danger-full-access,permission_profile=disabled2026-05-19T22:49:17Z: next normal user-message turn changed toapproval_policy=on-request,sandbox_policy=workspace-write,permission_profile=managedthread_goal_updatedevent was later:2026-05-30T03:26:43ZSo in this case the Goal does not appear to have created the bad permission state. The thread first entered
workspace-write/on-requestduring a normal old-thread turn, and later Goal auto-continuation appears to have inherited that per-thread state.Current local VS Code state has separate stores for:
agent-mode-by-host-id.local = full-accessheartbeat-thread-permissions-by-idRelevant local VS Code extension code paths I found, shown as simplified pseudocode from the minified bundle:
webview/assets/composer-CotcHxTB.jswebview/assets/app-server-manager-signals-B8yJv95l.jswebview/assets/local-conversation-stream-role-product-event-CeOlewiE.jsThis suggests the fix may need to handle stale or unintended per-thread permission state, not only Goal creation immediately after changing permissions.
This will be addressed in the next release of the app.