Windows sandbox cannot create process when cwd is under %USERPROFILE%\.config\opencode (ERROR 267)
Open
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
- Open
%USERPROFILE%\\.config\\opencodeas the workspace. - Ask the Codex planner executor to run
cmd /c cd. - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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