LLM Sometimes Fails to Request Permission Escalation on Sandbox Error
What version of Codex is running?
codex-cli 0.36.0
Which model were you using?
gpt-5-codex medium
What platform is your computer?
Darwin 25.0.0 arm64 arm
What steps can reproduce the bug?
Because this behavior depends on the LLM’s output, there is no stable way to reproduce it.
---
When Approval Mode is set to Auto, my project fails unit tests with the error:
sandbox error: command was killed by a signal
In many cases, the LLM correctly recognizes this as a sandbox issue and re‑suggests the same command via Proposed Command, which allows me to choose Allow Command to run it.
However, when I use Codex heavily, there are times when the LLM skips proposing the command altogether. Instead, it simply terminates execution and tells me to run the test myself.
Even worse, sometimes when I ask the LLM to fix a failing test, it encounters a sandbox error and then tries to "solve" the problem by only reading the code and making changes without even running the test. That feels like a very bad idea.
---
Suggestions for improvement:
- When a sandbox error occurs, don’t let the LLM decide whether to generate a Proposed Command. Always ask me directly if I want to run it.
- Consider improving the handling strategy through prompt engineering or training, so that the LLM consistently proposes the command whenever possible.
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗