Windows subagents cannot start shell processes: CreateProcessAsUserW error 5

Resolved 💬 1 comment Opened Aug 6, 2026 by kakabanga Closed Aug 6, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

  1. Open a local Windows workspace in Codex Desktop.
  2. Spawn a subagent (observed with both explorer and worker roles).
  3. Ask it to run a trivial command such as Get-Location, Get-Content -Raw CLAUDE.md, or rg in 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.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 22 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #36614
  • #36508

Powered by Codex Action