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_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗