Agent doesn’t request escalation after network-denied command in on-request mode
What version of Codex is running?
MacBook-Air ~ % codex --version codex-cli 0.57.0
What subscription do you have?
ChatGPT Business
Which model were you using?
gpt-5-codex
What platform is your computer?
raurioles@Ritos-MacBook-Air ~ % uname -mprs Darwin 25.0.0 arm64 arm
What issue are you seeing?
Environment:
- Codex CLI (Homebrew/NPM install)
- approval_policy = on-request
- sandbox_mode = workspace-write
- network_access = restricted
Impact: network-dependent tasks in restricted mode stall unless the user notices and reconfigures the environment. ChatGPT will adamantly deny that it can make network calls and when proven wrong via history log it shuts down completely and does not offer to do anything else. It will literally say that the conversation is no longer productive and "shutting it down"
What steps can reproduce the bug?
- Ask the agent to run
aws sts get-caller-identity. or any network call - Command fails with “Could not connect to the endpoint URL…”.
- Agent reports the failure but doesn’t rerun with
with_escalated_permissions=true.
What is the expected behavior?
ChatGPT recognizes the need for elevated permissions and prompts the user appropriately by immediately requesting escalation (with justification) and reruns the command.
Actual: agent stops after the failure, leaving the user to manually change permissions.
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the bug report. We've shared the feedback with the team members who are responsible for training our codex models. We're tracking this feedback and similar reports so we can make the model more robust in future iterations.
If you see other model behavior that you'd like to report, please use the recently-added
/feedbackcommand in the CLI. That will provide us with additional details including logs and conversation text.@etraut-openai Why not just give the model clear feedback that the command failed because it did something not permitted by the sandbox and that it MUST request user permission to re-execute the command?
I would also point the user to the
writable_rootsconfig option. I only learned of this today.