You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI 0.163.0: “Ask for approval” displays while sandbox escalation is prohibited #55727
CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingsandboxIssues related to permissions or sandboxing
0.163.0 — confirmed from the installed package; we haven’t run codex --version.
What subscription do you have?
unsure
Which model were you using?
got 6 astra
What platform is your computer?
macOS, Apple Silicon (aarch64) is verified. We don’t have the exact uname -mprs output or macOS version.
What terminal emulator and version are you using (if applicable)?
Terminal.app.
Codex doctor report
What issue are you seeing?
On macOS, Codex CLI 0.163.0 was launched with --no-daemon --sandbox workspace-write --ask-for-approval on-request -c 'approvals_reviewer="user"' -c 'sandbox_workspace_write.network_access=false'.
/status displays “Workspace (Ask for approval).” /debug-config reports Requirements: . However, the agent reports approval_policy=granular and sandbox_approval=false, preventing a one-time approval request.
Expected: human approval for a narrowly scoped command while retaining sandboxing.
No approval request or command was executed.
Uploaded diagnostic thread: 01a15c1e-b360-7bd0-a1be-6caec7895511
Thanks for including the launch flags and uploading the diagnostic thread. I tried those flags with CLI 0.163.0 on Apple Silicon. When I requested one-time approval to run /usr/bin/true outside the sandbox, Codex showed “Yes, proceed.” I canceled at the prompt.
In your session, the agent said escalation was disabled before it tried a command. Could you start a fresh session with the same flags and paste this prompt?
Request one-time approval to run /usr/bin/true outside the sandbox using sandbox_permissions="require_escalated".
If an approval dialog appears, you can cancel it. If it doesn’t, please let us know whether the tool returned an error (and its exact wording) or the agent declined without calling it. That distinction will help us tell whether the CLI rejected the request or the agent incorrectly assumed it would.
Separate user here, adding an independent reproduction. In our case the agent actually called the execution tool with sandbox_permissions="require_escalated" and a justification, and the tool rejected the request before executing the command. This was not just the agent declining to try.
This occurred on macOS/arm64. Codex CLI 0.164.0 was observed earlier in the investigation, and 0.165.0 is the currently verified version. Switching models did not resolve it.
The tool returned this permission error:
approval policy is Granular(GranularApprovalConfig { sandbox_approval: false, rules: false, skill_approval: false, request_permissions: true, mcp_elicitations: true }); reject command — you cannot ask for escalated permissions if the approval policy is Granular(GranularApprovalConfig { sandbox_approval: false, rules: false, skill_approval: false, request_permissions: true, mcp_elicitations: true })
The operation was a read-only network request. Ordinary sandbox execution failed DNS resolution. The elevated attempt then failed with the error above, rather than surfacing an approval prompt. Marking the folder trusted and restarting the daemon did not resolve the rejection in the existing chat.
Later, once the effective session permissions allowed escalation, the same elevated request succeeded with exit code 0. It also succeeded under automatic approval review. DNS remained blocked inside the sandbox.
We did not isolate which session-setting change restored escalation, so this is not a confirmed daemon-cache fix. The key evidence for the maintainer's question is that the execution tool itself rejected the escalation, and the operation subsequently worked when the effective permission policy changed.
Thanks for capturing the exact tool error. That answers the question from the earlier test: in your session, the agent requested escalation, and the execution tool rejected it before an approval prompt could appear. The error identifies the effective policy as Granular with sandbox_approval: false. The same request later succeeded after the session permissions changed.
The open question is how the affected chat acquired that policy and what /status showed at the time. The original report captured “Workspace (Ask for approval)” without a tool call. Your follow-up captured the tool rejection in a different session. If this recurs, the most useful evidence would be the /status output from the same chat immediately after the rejection, before changing permissions, plus whether the chat was newly started or resumed. That would let us check whether the displayed and enforced policies disagree in a single session.
I closed this as not planned because I couldn’t reproduce a mismatch between /status and the policy the CLI enforced.
On Apple Silicon, I tested CLI 0.163.0 and 0.165.0 with the original launch flags. Both showed “Ask for approval” and told the agent how to request escalation. I used a mock model to request one-time approval for /usr/bin/true outside the sandbox. Both versions showed “Yes, proceed.” I canceled at the prompt.
I also reproduced @Alphasite’s exact error on 0.165.0 by explicitly setting the granular policy from the follow-up. In that session, /status showed granular, and sandbox_approval: false blocked the request before a prompt appeared.
The original agent declined before calling the tool. I couldn’t determine why it declined or how the second session acquired its policy. Thanks to both of you for helping distinguish those two cases.
CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingsandboxIssues related to permissions or sandboxing
Activity
github-actions commentedon Oct 21, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Oct 25, 2026
(response from codex)
Thanks for including the launch flags and uploading the diagnostic thread. I tried those flags with CLI 0.163.0 on Apple Silicon. When I requested one-time approval to run
/usr/bin/trueoutside the sandbox, Codex showed “Yes, proceed.” I canceled at the prompt.In your session, the agent said escalation was disabled before it tried a command. Could you start a fresh session with the same flags and paste this prompt?
If an approval dialog appears, you can cancel it. If it doesn’t, please let us know whether the tool returned an error (and its exact wording) or the agent declined without calling it. That distinction will help us tell whether the CLI rejected the request or the agent incorrectly assumed it would.
Alphasite commentedon Oct 27, 2026
Separate user here, adding an independent reproduction. In our case the agent actually called the execution tool with
sandbox_permissions="require_escalated"and a justification, and the tool rejected the request before executing the command. This was not just the agent declining to try.This occurred on macOS/arm64. Codex CLI 0.164.0 was observed earlier in the investigation, and 0.165.0 is the currently verified version. Switching models did not resolve it.
The tool returned this permission error:
The operation was a read-only network request. Ordinary sandbox execution failed DNS resolution. The elevated attempt then failed with the error above, rather than surfacing an approval prompt. Marking the folder trusted and restarting the daemon did not resolve the rejection in the existing chat.
Later, once the effective session permissions allowed escalation, the same elevated request succeeded with exit code 0. It also succeeded under automatic approval review. DNS remained blocked inside the sandbox.
We did not isolate which session-setting change restored escalation, so this is not a confirmed daemon-cache fix. The key evidence for the maintainer's question is that the execution tool itself rejected the escalation, and the operation subsequently worked when the effective permission policy changed.
etraut-openai commentedon Nov 9, 2026
(response from codex)
Thanks for capturing the exact tool error. That answers the question from the earlier test: in your session, the agent requested escalation, and the execution tool rejected it before an approval prompt could appear. The error identifies the effective policy as
Granularwithsandbox_approval: false. The same request later succeeded after the session permissions changed.The open question is how the affected chat acquired that policy and what
/statusshowed at the time. The original report captured “Workspace (Ask for approval)” without a tool call. Your follow-up captured the tool rejection in a different session. If this recurs, the most useful evidence would be the/statusoutput from the same chat immediately after the rejection, before changing permissions, plus whether the chat was newly started or resumed. That would let us check whether the displayed and enforced policies disagree in a single session.etraut-openai commentedon Nov 26, 2026
(response from codex)
I closed this as not planned because I couldn’t reproduce a mismatch between
/statusand the policy the CLI enforced.On Apple Silicon, I tested CLI 0.163.0 and 0.165.0 with the original launch flags. Both showed “Ask for approval” and told the agent how to request escalation. I used a mock model to request one-time approval for
/usr/bin/trueoutside the sandbox. Both versions showed “Yes, proceed.” I canceled at the prompt.I also reproduced @Alphasite’s exact error on 0.165.0 by explicitly setting the granular policy from the follow-up. In that session,
/statusshowedgranular, andsandbox_approval: falseblocked the request before a prompt appeared.The original agent declined before calling the tool. I couldn’t determine why it declined or how the second session acquired its policy. Thanks to both of you for helping distinguish those two cases.