Skip to content

Windows subagents cannot start shell processes: CreateProcessAsUserW error 5 #37259

Closed as duplicate

Description

@kakabanga

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.

Activity

  1. added
    bug
    app
    windows-os
    subagent
    sandbox
    on Aug 6, 2026
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

    appbugsandboxsubagentwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions