Windows subagents cannot start shell processes: CreateProcessAsUserW error 5
Summary
In Codex Desktop on Windows, spawned subagents consistently fail before executing any shell command. The root agent in the same workspace can run the identical commands normally.
This makes delegated repository work unavailable even for read-only inspection.
Reproduction
- Open a local Windows workspace in Codex Desktop.
- Spawn a subagent (observed with both explorer and worker roles).
- Ask it to run a trivial command such as
Get-Location,Get-Content -Raw CLAUDE.md, orrgin the workspace.
Actual result
The subagent fails at process creation, before the command runs:
windows sandbox: CreateProcessAsUserW failed: 5 (Access is denied.)
The failure reproduced across multiple independent subagents and commands during the same session.
Expected result
A spawned subagent should be able to execute the same sandboxed read-only workspace commands as the root agent, subject to its assigned permissions.
Boundary observed
- Root agent: can read, write, validate, and commit in the workspace.
- Spawned agents: fail before PowerShell starts.
- This appears to be a subagent worker-token/sandbox process-launch issue, not repository ACLs, Git state, or an individual command.
Impact
Subagent-based exploration, canary sweeps, and bounded task registration cannot be performed. The root agent has to repeat the work serially.
Notes
The issue was observed on 2026-08-06. No secrets, repository data, or user credentials are needed to reproduce.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action