Sandbox breaks workdir on Windows

Open 💬 1 comment Opened May 7, 2026 by MartinKolarik

What version of Codex CLI is running?

0.129.0

What subscription do you have?

pro

Which model were you using?

gpt-5.5

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Windows Terminal with PowerShell

What issue are you seeing?

Running with the default permissions mode, codex's CWD gets somehow messed up, and it runs commands directly in C:\ despite reporting the correct directory after starting. When the exact same session is repeated in --yolo mode, commands run in the correct directory.

Codex usually retries the commands by passing the directory as a parameter, but this also seems to mess up the permissions checks, so every single command invocation (git, npm, etc.) then requires approval despite staying in the original workdir.

Uploaded thread: 019e04a2-5458-7c41-98b4-2482fce3c544

What steps can reproduce the bug?

> list files in the current directory

• Ran Get-ChildItem
  └
        Directory: C:\
    … +27 lines (ctrl + t to view transcript)
• Get-ChildItem listed C:\, not C:\[...redacted...], despite the requested working directory.

What is the expected behavior?

It lists files in the project directory.

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗