openai / openai/codex

Windows sandbox cannot create process when cwd is under %USERPROFILE%\.config\opencode (ERROR 267)

Open
#40,379 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI sandbox tool-calls windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Environment

  • Windows
  • Codex updated to the latest available version
  • OpenCode workspace: %USERPROFILE%\\.config\\opencode

Expected behavior

The Codex planner executor can start cmd.exe /c cd and PowerShell Get-Location with the exact workspace cwd.

Actual behavior

The executor fails before a child process is created:
CreateProcessWithLogonW failed: 267

No command output or child-process exit code is produced.

Reproduction

  1. Open %USERPROFILE%\\.config\\opencode as the workspace.
  2. Ask the Codex planner executor to run cmd /c cd.
  3. Observe error 267 before command execution.

Notes

  • Normal PowerShell can enter the directory successfully.
  • Codex was restarted and updated.
  • No ACL, sandbox, or OpenCode configuration changes were made.
  • This appears limited to the Codex Windows sandbox/executor cwd binding.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Windows sandbox/executor path that binds the workspace cwd and invokes CreateProcessWithLogonW. Reproduce with %USERPROFILE%.config\opencode and cmd /c cd or PowerShell Get-Location. Done means both commands start successfully with that cwd and no ERROR 267 occurs before child-process creation.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, rust, shell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.