You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug Report: Commands failed to run in sandbox in Codex CLI #4934
This kind of errors occurred a lot: I asked codex to run "git add ." and it failed immediately and returned stuff like "failed in sandbox". But when I asked it to run it again and ask for my approval, it succeeded easily. Other kinds of commands failed like this too. Seems that Codex tends to run commands (bash/python etc.) in sandbox but not locally... Could you fix this and make it more robust?
What is the expected behavior?
The agent already lives in the terminal so it shouldn't be running things in sandbox. Codex CLI should just run the commands locally. (Donno if this is right...)
Thank you for reporting this! This appears to be a duplicate of #4928. We’ll track the issue there to keep discussion in one place. If you think this is an incorrect diagnosis, please reply here and we’ll revisit.
This is incredibly annoying. pnpm type-check always hangs, and winds up creating a new .pnpm-store/ folder in my project folder due to pnpm running in some sort of sandbox.
when i git commit in another terminal, the codex sandbox stops working, the model goes for dirty-perl|python inline cmd edits instead of apply_patch due to sandbox failure: it doesnt recover.
Activity
github-actions commentedon Oct 8, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
dylan-hurd-oai commentedon Oct 8, 2025
(Note: this comment was generated by Codex.)
Thank you for reporting this! This appears to be a duplicate of #4928. We’ll track the issue there to keep discussion in one place. If you think this is an incorrect diagnosis, please reply here and we’ll revisit.
ahernandezmiro commentedon May 18, 2026
this is still happening to me on latest codex versions
ffxsam commentedon May 19, 2026
This is incredibly annoying.
pnpm type-checkalways hangs, and winds up creating a new.pnpm-store/folder in my project folder due to pnpm running in some sort of sandbox.fblgit commentedon May 21, 2026
when i
git commitin another terminal, the codex sandbox stops working, the model goes for dirty-perl|python inline cmd edits instead of apply_patch due to sandbox failure: it doesnt recover.ffxsam commentedon May 21, 2026
Solution/workaround found. Create
~/.codex/rules/pnpm.rulesand paste this into it: