Repository navigation
Description
What happened?
Codex CLI 0.164.0 creates a thread with a hidden granular approval policy that makes network escalation impossible.
Environment:
- Codex CLI 0.164.0, installed with Homebrew
- macOS 27.0.1, Apple Silicon
- ChatGPT authentication
TERM_PROGRAM=herdr, Herdr 0.9.5- Launched using bare
codex
A newly created CLI thread receives:
{"granular":{"sandbox_approval":false,"rules":false,"skill_approval":false,"request_permissions":true,"mcp_elicitations":true}}This is not one of the four visible /permissions modes. Because sandbox_approval=false, commands requiring network escalation—for example outbound SSH—are rejected without displaying an approval request.
The thread is also incorrectly persisted with source="vscode", although:
- It was launched from the Codex TUI in Herdr.
TERM_PROGRAMisherdr.- The recorded originator is
codex-tui. - No VS Code environment variables are present.
Configuration checks:
~/.codex/config.tomlcontains no approval policy./etc/codex/managed_config.tomldoes not exist.codex app-server --print-startup-configreportsrequirements=null.codex doctor --jsonreports the effective fresh approval policy asOnRequest.- No alias or wrapper is used;
codexresolves directly to/opt/homebrew/bin/codex. - The incorrect policy is present from the thread's first turn and is persisted in
~/.codex/state_5.sqliteunderthreads.approval_mode. - The app-server protocol exposes
approvalPolicyinThreadStartParams, suggesting the Codex TUI/app-server client is supplying an incorrect per-thread override.
Uploaded thread: 01a16df4-481b-7ba0-ac78-62d304ad01bc
What did you expect to happen?
Bare codex should use the documented visible permission preset/default, permit sandbox escalation prompts, and record the thread source as CLI.
What is the workaround?
Launching with codex --approve-for-me creates an on-request/auto-review context in which the same outbound SSH command succeeds.
This appears to be a Codex TUI/app-server thread-creation bug, not a local or managed configuration issue.
Activity
github-actions commentedon Oct 24, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
jrothlis commentedon Oct 28, 2026
Update: still reproducible on Codex CLI 0.165.0
This remains reproducible after upgrading the Homebrew installation to
codex-cli 0.165.0.Fresh-session evidence:
codexand no permission-related flags.~/.codex/config.tomlstill contains noapproval_policy,sandbox_mode,default_permissions,approvals_reviewer, or permission-profile configuration.requirements.toml, managed config, or macOS MDM policy was found.codex doctor --jsonresolves the disk/default approval policy asOnRequestand reports no managed filesystem source.CODEX_PERMISSION_PROFILE=:workspace.turn_contextreceives:{ "sandbox_policy": { "type": "workspace-write", "network_access": false }, "approval_policy": { "granular": { "sandbox_approval": false, "rules": false, "skill_approval": false, "request_permissions": true, "mcp_elicitations": true } }, "permission_profile": { "type": "managed" } }Thus the filesystem profile is the standard workspace profile; the TUI displays Custom solely because the injected granular approval policy does not match any visible
/permissionspreset.The new thread is again persisted with
originator="codex-tui"butsource="vscode". The affected 0.165.0 thread is01a18417-37fc-7a30-815a-be312d0035d9.Manually selecting Ask for approval changes the existing thread to plain
on-request, but a later fresh session receives the granular policy again. Guardian reviewer subthreads are also created automatically, despite no local reviewer configuration.This differs from #56570, where the configured
on-requestpolicy remained active and automatic escalation behavior was restored in 0.165.0. Here the fresh CLI thread is not starting withon-requestat all; a per-thread/runtime override replaces the documented default during thread creation.The 0.165.0 changelog notes that fresh TUI sessions now honor the server default approval reviewer when no explicit override is present. Combined with the
codex-tui/source="vscode"mismatch, the evidence continues to point to the TUI/app-server thread-start path or a server-supplied default, rather than user configuration.jrothlis commentedon Oct 28, 2026
Codex in this state is incredibly nerfed, it can do almost nothing, and I end up wasting time troubleshooting why it's so nerfed on every single session.
oslijunw commentedon Nov 3, 2026
Additional evidence on 0.166.0: granular policy can leave no usable permission-request tool
I am seeing the same class of problem on macOS with Codex CLI/runtime 0.166.0 (November 3, 2026). Adding evidence here rather than opening a duplicate, as requested by the contributing guide.
Observed behavior
turn_contextrecords showworkspace-writewith this approval policy:{"granular":{"sandbox_approval":false,"rules":false,"skill_approval":false,"request_permissions":true,"mcp_elicitations":true}}docker --context <existing-context> psrequest usingsandbox_permissions="require_escalated"was rejected by the approval policy before execution; no approval prompt appeared.on-request + auto_review. A different, newly created thread subsequently started with the granular policy above. That new thread later switched toon-request + userafter its permissions were changed. This is evidence of differing initialization/selection behavior, not proof that changing one thread should change every other thread.granular. When asked to inspect only its injected permissions and available tools, the agent reported that sandbox approvals were disabled and that norequest_permissionstool was available. This last observation is an agent/tool-list report captured in a screenshot, not an independently captured full tool-schema trace./etc/codex/managed_config.tomland/etc/codex/requirements.tomlpaths were absent. This was not an exhaustive audit of all policy sources.Potential implementation gap in current main
Static inspection at commit
80a8710546cfab76aa13503645fccc3af1e5ec35found:request_permissions_tooldefaulting tofalse.RequestPermissionsHandleronly when that feature is enabled.These independent gates appear capable of producing “legacy escalation disabled, replacement permission-request tool unavailable” unless another layer enables the tool. This is a candidate explanation, not a claim that every affected desktop/TUI session takes this exact path. I have not compiled or run a regression test against main.
Requested improvements
request_permissions, make the supported request mechanism available, or clearly explain that permission requests are unavailable under the effective policy. Preserve managed restrictions.Could maintainers confirm whether the projectless default and tool-feature gating are intended to be coupled, and track a fix for the unusable combination?