Desktop automations can start in workspace-write and switch to danger-full-access after chat interaction
What version of Codex is running?
Codex Desktop / VS Code-backed local app flow
Observed locally in session metadata with cli_version 0.115.0-alpha.4.
Which model were you using?
gpt-5.4 and previously gpt-5.3-codex in automation runs
What platform is your computer?
Windows 11
What steps can reproduce the bug?
- Configure Codex Desktop with global full access enabled.
- In local state, confirm the app is in full access mode. In my case
.codex-global-state.jsoncontains:
"agent-mode":"full-access""skip-full-access-confirm":true
- Create a recurring automation that needs Git access (
git pull, branch creation, commit, PR) and runs in a local workspace. - Let the automation start on its own from the scheduler/background runner.
- Inspect the generated rollout JSONL and/or local
threadsstate. - Then interact with the automation thread in the chat UI after it has already started.
What is the expected behavior?
If the app is configured for full access, a Git-capable automation should start with the same effective sandbox policy from the beginning.
A scheduled automation should not require a user to enter the chat before it can use the intended permission level.
What do you see instead?
Some automation runs start as background threads with:
sandbox_policy.type = "workspace-write"network_access = false
This causes failures in normal Git automation steps such as writing .git/FETCH_HEAD or creating branch lockfiles under .git/refs/heads.
After the thread is interrupted/re-entered via the chat UI, the same thread/session can then receive danger-full-access permissions and the Git commands start working.
This makes scheduled automations unreliable and appear to "fix themselves" only after manual user interaction.
Additional information
I found strong local evidence that the sandbox differs between the automatic/background creation path and the later interactive chat path.
Evidence from local state/logs:
- Global app state already indicates full access:
.codex-global-state.jsonincludesagent-mode = full-access.codex-global-state.jsonincludesskip-full-access-confirm = true
- A scheduled automation run started with restricted sandbox in its first turn context:
- rollout file:
rollout-2026-03-12T20-52-02-019ce476-e43e-7de1-bdb6-9db0d759c68f.jsonl - first
turn_contextshowssandbox_policy.type = workspace-write - same turn context shows
network_access = false
- Later in the same conversation history, after
turn_aborted/ re-entry through the chat UI, new developer permissions were injected withdanger-full-access.
- The local
threadstable instate_5.sqliteshows mixed sandbox policies for the same automation title:
- several runs recorded as
{"type":"danger-full-access"} - some runs recorded as
{"type":"workspace-write", ... "network_access":false}
This suggests the automation scheduler/background runner may sometimes ignore or fail to inherit the current interactive full-access mode.
Related but not identical:
- There are other issues about inconsistent sandbox/approval behavior in the extension/app, but this report is specifically about scheduled automations starting with a different sandbox than the app's configured full-access mode, then effectively recovering only after user interaction.
Impact:
- breaks unattended Git automations
- causes false
Permission deniedfailures on.git - forces manual intervention in workflows that should be autonomous
If helpful, I can provide a sanitized excerpt of the rollout JSONL showing the initial workspace-write turn context and the later danger-full-access developer instructions in the same conversation history.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Adding another repro from Codex Desktop on macOS with the same automation class, but surfaced through a networked worker (
qwen -y) instead of Git commands.What I found locally:
cpp2-scanner-hourly/Applications/Codex.app/Contents/Resources/codex app-serverExact on-disk evidence:
/Users/jim/.codex/archived_sessions/rollout-2026-03-14T07-20-06-019cec4a-1f6a-7970-a7f5-08e5acc1d40d.jsonlturn_context.sandbox_policy = {"type":"workspace-write", ..., "network_access":false}/Users/jim/.codex/sessions/2026/03/19/rollout-2026-03-19T17-34-02-019d083b-fe9f-7a31-bd95-9a8d483e7613.jsonlsandbox_policy = {"type":"workspace-write", ..., "network_access":false}sandbox_policy = {"type":"danger-full-access"}sandbox_policy = {"type":"danger-full-access"}/Users/jim/.codex/state_5.sqlitethreads019d083b-fe9f-7a31-bd95-9a8d483e7613sandbox_policy = {"type":"danger-full-access"}/Users/jim/.codex/sqlite/codex-dev.dbautomation_runsautomation_id = "cpp2-scanner-hourly"maps to the affected thread idsObserved symptom:
qwen -y -p "Reply with exactly PING"failed withError: [API Error: Connection error.]danger-full-accessturn contexts, the exact same command on the same machine/config returnedPINGSo this is not only a Git-automation problem. Any automation that depends on outbound network can start in a false-failure state when the scheduler/background path gives
workspace-write+network_access:false, then appear to recover after a manual chat interaction flips the thread todanger-full-access.One more detail: the compiled app-server binary contains the permission-profile strings and templates (
PermissionProfile,NetworkPermissions,workspace-write,danger-full-access, theFilesystem sandboxing...text), so this definitely looks like a host/session policy transition issue rather than repo-specific state.