Skip to content

[Bug] Codex 0.164.0 fails to request sandbox escalation until permissions are reselected #56570

Closed

Description

@ahmadqayyum7

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

  1. Launch a fresh session using codex.
  2. Verify that /status displays Workspace (Ask for approval).
  3. Ask Codex to run docker ps.
  4. Codex reports permission denied accessing /var/run/docker.sock and stops without requesting approval.
  5. Open /permissions and manually reselect Ask for approval.
  6. Ask Codex to run docker ps again.
  7. Codex now requests approval, and the command succeeds.
  8. Run docker info without 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

  1. added
    bug
    on Oct 23, 2026
  2. added
    CLI
    sandbox
    on Oct 23, 2026
  3. github-actions commented on Oct 23, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. ahmadqayyum7 commented on Oct 25, 2026

    @ahmadqayyum7
    Author

    I performed the diagnostic test suggested by the OpenAI contributor in #55727.

    Environment:

    • Codex CLI 0.164.0
    • Ubuntu Linux
    • Launched with --no-daemon --sandbox workspace-write --ask-for-approval on-request
    • No experimental permission features enabled

    In 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 ps or docker info in a fresh session, it encounters permission denied on /var/run/docker.sock and 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.

  5. ahmadqayyum7 commented on Oct 27, 2026

    @ahmadqayyum7
    Author

    Update: Regression confirmed between Codex 0.163.0 and 0.164.0

    I performed additional testing and identified a working rollback version.

    Environment:

    • OS: Ubuntu Linux
    • Sandbox: workspace-write
    • Approval policy: on-request
    • Installation: Global npm package

    Results:

    Codex 0.164.0:

    • Launched using the normal codex command.
    • /status correctly displayed Workspace (Ask for approval).
    • Running Docker commands such as docker ps or docker info resulted in Docker socket permission errors.
    • Codex did not automatically trigger the native sandbox escalation approval dialog.

    Codex 0.163.0:

    • Downgraded using sudo npm install -g @openai/[email protected].
    • Launched using the normal codex command without additional flags.
    • Requested that Codex start a simple Nginx Docker container.
    • Codex automatically detected the Docker socket permission restriction and displayed the native interactive approval dialog with the expected Allow/Deny options.

    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.

  6. ahmadqayyum7 commented on Oct 28, 2026

    @ahmadqayyum7
    Author

    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:

    • v0.163.0: Working
    • v0.164.0: Regression observed
    • v0.165.0: Working again

    The issue is no longer reproducible in my environment on v0.165.0.

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions