Repository navigation
Description
What version of Codex CLI is running?
0.164.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
gpt-5.6-luna
What platform is your computer?
Linux 6.8.0-138-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
No response
Codex doctor report
What issue are you seeing?
Description
Codex CLI 0.164.0 on Ubuntu does not automatically request approval to execute commands outside the sandbox, despite approval_policy = "on-request".
Configuration
toml
sandbox_mode = "workspace-write"
approval_policy = "on-request"
codex doctor --json confirms that the effective approval policy is OnRequest. A newly launched Codex session also displays Workspace (Ask for approval) in /status.
Steps to reproduce
- Launch a fresh session using
codex. - Verify that
/statusdisplaysWorkspace (Ask for approval). - Ask Codex to run
docker ps. - Codex reports permission denied accessing
/var/run/docker.sockand stops without requesting approval. - Open
/permissionsand manually reselectAsk for approval. - Ask Codex to run
docker psagain. - Codex now requests approval, and the command succeeds.
- Run
docker infowithout mentioning permissions or sandboxing. Codex automatically requests approval and successfully retrieves the Docker server version.
Expected behavior
Codex should automatically request user approval when a command requires execution outside the sandbox, without requiring the user to reselect the already configured approval profile.
Actual behavior
Fresh sessions may fail to request approval even though the configured and displayed approval policy is correct. Manually reselecting Ask for approval appears to activate the expected behavior.
Additional observations
- Docker works normally from the Ubuntu terminal.
- The user already belongs to the Docker group.
- Docker daemon version: 29.1.3.
- Reproduced with both the background server and standalone execution.
- No experimental features are enabled for execution approvals.
- No Docker permissions, groups, or socket ownership were modified.
Impact
This interrupts normal workflows involving Docker and potentially other operations requiring sandbox escalation. Users must manually re-select the approval profile in affected sessions.
What steps can reproduce the bug?
Uploaded thread: 01a16a51-05b9-7230-ad50-fe3ad33a9a6f
What is the expected behavior?
No response
Additional information
No response
Activity
github-actions commentedon Oct 23, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
ahmadqayyum7 commentedon Oct 25, 2026
I performed the diagnostic test suggested by the OpenAI contributor in #55727.
Environment:
--no-daemon --sandbox workspace-write --ask-for-approval on-requestIn a fresh session, I submitted:
Request one-time approval to run /usr/bin/true outside the sandbox using sandbox_permissions="require_escalated".Result: The approval dialog appeared successfully.
However, when I simply ask Codex to run
docker psordocker infoin a fresh session, it encounters permission denied on/var/run/docker.sockand stops without requesting escalation.This confirms that explicit escalation requests work, but Codex does not consistently initiate them automatically after sandbox permission failures.
The issue appears to concern automatic escalation behavior rather than the availability of the approval mechanism itself.
ahmadqayyum7 commentedon Oct 27, 2026
Update: Regression confirmed between Codex 0.163.0 and 0.164.0
I performed additional testing and identified a working rollback version.
Environment:
workspace-writeon-requestResults:
Codex 0.164.0:
codexcommand./statuscorrectly displayedWorkspace (Ask for approval).docker psordocker inforesulted in Docker socket permission errors.Codex 0.163.0:
sudo npm install -g @openai/[email protected].codexcommand without additional flags.Conclusion:
The native approval mechanism works correctly in 0.163.0 for the tested Docker workflow but fails to trigger automatically in 0.164.0 under the tested conditions.
This suggests a behavioral regression between versions 0.163.0 and 0.164.0.
I have temporarily rolled back to 0.163.0 to continue working while preserving manual sandbox escalation approvals.
ahmadqayyum7 commentedon Oct 28, 2026
Update: Issue no longer reproducible on Codex v0.165.0
I upgraded to Codex CLI v0.165.0 and repeated the Docker container test under the same sandbox and approval configuration (
workspace-write,on-request).Codex successfully detected the Docker socket permission restriction and automatically displayed the native approval dialog without requiring explicit instructions to request escalation.
After approval, Docker operations completed successfully.
Results:
The issue is no longer reproducible in my environment on v0.165.0.
Thank you!