Codex can't execute commands. (read-only sandbox, no approvals)
Resolved 💬 8 comments Opened Nov 1, 2025 by jMerta Closed Nov 7, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.53.0
What subscription do you have?
Pro
Which model were you using?
GPT-5-High
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
After updating to the latest Codex version I've started to receive following responses:
Thanks — I can’t execute Gradle here (read‑only sandbox, no approvals),
It says it can't execute commands (gradle, npm, powershell, git) after multiple back and forth it eventually executes them.
I'm running it in full access mode and before updating to 0.53 it never happened.
What steps can reproduce the bug?
Uploaded thread: 019a3faa-a8ed-7df0
What is the expected behavior?
It should use the commands as it did before.
Additional information
_No response_
8 Comments
我也一样,怎么解决这个问题?
<img width="277" height="109" alt="Image" src="https://github.com/user-attachments/assets/a2faa2bd-ad6b-43c8-a2da-e5bef13acda5" />
same 019a4551-4cc9-7ca2-9285-8f3ab6474375
macOS , codex is fully updated until today
I updated to 0.53.0 yesterday and it worked fine at first, but when I started it up today it was forced to be read-only.
Changing config.toml to "sandbox_mode = "danger-full-access"" worked without any problems, so it seems to be reading the configuration file.
Setting "sandbox_mode = "workspace-write"" forces it to be read-only.
Before the update it was working fine and I was able to read and write files only within the workspace, but suddenly I was told I didn't have permission to write files even though I hadn't changed any settings. When I investigated, I found that it had been forced to be read-only.
As I mentioned earlier, I haven't changed any settings, and the directories allowed by sandbox_workspace_write have not changed since the last time it was working fine.
The location where Codex is launched is also an allowed directory.
Is this a bug in the Windows directory resolution?
My environment is
I'm not sure if this is a bug or an issue with my environment.
Please consider my comments as a reference.
I hope this helps.
Thank you.
<img width="731" height="668" alt="Image" src="https://github.com/user-attachments/assets/82a64eea-1a8f-4f5a-bfbd-f627709d0ebd" />
Sorry for the multiple posts.
Downgrading to version 0.48.0 resolved the issue.
The same read-only issue occurred in version 0.52.0, so I think it's a bug in version 0.50 or later.
Just for reference.
Same +1 with 0.53.0 version.
Duplicate https://github.com/openai/codex/issues/5228
我的问题还没有解决,好烦人啊,没办法写代码,都是提示只读环境,授权了也没有生效。
Thanks for posting. This is a known limitation currently. We're actively working on addressing this, but it's challenging because Windows (unlikely MacOS or Linux) doesn't have an off-the-shelf sandboxing mechanism that meets our needs. We need to create one from scratch. We have an early version working, and it's going through testing and review now, so we will hopefully have something to announce soon.
In the meantime, we recommend that codex users on Windows use WSL. In that environment, we can offer proper sandboxing.
I'm going to close this issue as a duplicate. We're using this issue to track this.