Skip to content

Codex Desktop full-access and approved command prefixes still trigger approval prompts #30898

Open

Description

@ryofukutani

Summary

Codex Desktop appears to have a permission and escalation bug.

Even after the user enables full access in the Codex Desktop UI and approves specific command prefixes, later tool calls still trigger approval prompts or fail inside the sandbox with network errors.

This breaks unattended long-running workflows because the agent cannot reliably tell whether a command is genuinely unsafe, already approved, blocked by a network sandbox, or blocked by prefix matching.

Environment

  • Product: Codex Desktop app
  • OS: macOS
  • Shell: zsh
  • Filesystem mode reported to agent: workspace-write / restricted
  • Network mode reported to agent: restricted
  • User setting: full access enabled in Codex UI
  • Workflow: long-running goal, GitHub Actions deploy verification, multi-agent coordination

Observed Behavior

The user explicitly granted full access and approved command categories such as git add, git commit, git push, gh run view, and gh workflow run.

Despite that:

  • git add was still reported as sandbox-denied.
  • gh workflow run initially failed inside the sandbox with a GitHub API connectivity error, then required escalation.
  • gh run view succeeded once after approval, but a later gh run view invocation still tried to raise an approval path.
  • curl to a clone host failed inside the sandbox with DNS resolution failure and retrying required another approval prompt.
  • A piped command using an approved gh run view segment plus local rg filtering was not handled as an already-approved operation.

Expected Behavior

  • Full-access mode should either be authoritative, or the UI should clearly state which limits remain.
  • Saved prefix approvals should apply consistently to later matching commands.
  • The denial reason should distinguish filesystem sandbox, network sandbox, shell segmentation, prefix mismatch, and user policy.
  • Long-running Codex Desktop goals should support a non-interactive scoped allow policy so overnight work does not stop on repeated prompts.

Actual Behavior

The session enters contradictory states:

  • The agent sees approved prefixes, but still has to request escalation.
  • The user believes full access is enabled, but commands still fail due to sandbox or network restrictions.
  • Retrying with escalation opens approval UI, which defeats unattended operation.
  • Rejecting that UI because permission was already granted leaves the agent unable to proceed.

Impact

This is severe for Codex Desktop autonomous workflows.

Deploy/proof loops stop unexpectedly, the user cannot safely leave the agent unattended, and the UX makes it appear that Codex is ignoring explicit authorization.

Additional Note

During an attempted bug report, a shell command containing issue-body text with backticks caused the shell to interpret parts of the body as command substitution.

This is partly agent/tooling misuse, but it also shows why issue creation and shell escalation paths need safer structured APIs or first-class bug-report tooling.

No secrets are included in this report.

Activity

  1. added
    bug
    app
    sandbox
    tool-calls
    connectivity
    on Jul 2, 2026
  2. ryofukutani commented on Jul 2, 2026

    @ryofukutani
    Author

    This issue started occurring with the latest Version 26.623.81905 as of July 2, or rather, it is a case where the behavior has regressed to that of a much older version, so it is not a duplicate of other issues.

  3. rpelevin commented on Jul 3, 2026

    @rpelevin

    I would treat this as an effective-authorization state bug, not only a repeated prompt bug.

    The invariant I would want is:

    • every tool call should evaluate against one explicit effective authorization profile before execution
    • full-access mode, saved command-prefix approvals, sandbox mode, network mode, and approval policy should resolve into one machine-readable decision
    • a denial should carry a typed reason: filesystem sandbox, network sandbox, prefix mismatch, shell segmentation, user policy, or missing approval
    • saved prefix approvals should be canonicalized against the exact command boundary before shell expansion, pipes, or command substitution
    • escalation should not be retried as a new human decision when the same command class was already approved under the current profile
    • the agent should receive the same state the UI shows, including which constraints remain active after full access is enabled
    • every blocked or allowed command should emit an audit event with profile id, approval source, matched rule, command digest, and terminal decision

    Tests I would add:

    • full-access UI state and runtime permission profile resolve to the same effective profile
    • an approved command prefix matches the same command class on later runs without a fresh prompt
    • piped commands and shell-expanded commands are classified before execution with a stable command digest
    • filesystem denial, network denial, prefix mismatch, and explicit user policy denial produce different typed errors
    • rejected or expired approvals do not leave stale approval assumptions for later commands
    • an unattended goal can fail closed with a visible terminal reason instead of silently waiting for another approval path

    That would make authorization reconstructable for long-running Codex Desktop work: the user, UI, agent, sandbox, and audit log all agree on whether a command is allowed, blocked, or waiting for approval.

    Boundary: architecture and conformance feedback only; no claim about OpenAI/Codex alignment, implementation correctness, acceptance, partnership, integration, customer interest, official alignment, Codex usage, or Neura usage.

  4. junl commented on Aug 5, 2026

    @junl

    Additional reproduction observed on 2026-08-05:

    • macOS 15.1.1 (24B91), zsh
    • Codex CLI 0.146.1 through Codex Desktop
    • User explicitly selected/granted full permission and asked that approval prompts stop
    • The agent still received a managed workspace-write profile with restricted network access
    • Read-only production health checks repeatedly required approval as command arguments changed, including DigitalOcean job-invocation listings and S3-backed data-quality/cache reads
    • Saved approvals behaved like exact or narrowly shaped command prefixes. A later semantically identical read-only invocation with a different job name or query shape prompted again until a broader prefix was separately granted

    Expected: the user-selected full-permission mode should be authoritative for the task, or the UI should clearly disclose that a managed policy overrides it. Once a bounded read-only command family is approved, argument-only variations should not repeatedly interrupt the task.

    No project paths, credentials, or production data are included.

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

    appbugconnectivitysandboxtool-calls

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions