Repository navigation
Description
What issue are you seeing?
In an interactive Codex session, exec_command escalations repeatedly received hard denials citing a repository-authored production-data runbook, even after the user was told about that restriction and explicitly authorized the exact operation and then the exact tool execution. The assistant repeatedly suggested that another confirmation could unblock it, but the approval layer kept rejecting before process creation. No actionable recovery/control was surfaced to the user.
This is a suspected policy-provenance / approval-recovery UX bug. I cannot determine whether the denial was intended by an administrator-managed policy, an instruction-precedence mistake in the automatic reviewer, or another implementation detail. This report does not ask the agent to bypass a sandbox or an enforced organization policy.
Observed permissions in the affected session:
sandbox_mode: workspace-write
approvals_reviewer: auto_review
permission_profile: managed
network access: restricted
The requested operation was a reviewed, narrowly scoped SQL data repair. A repository runbook said production SQL must use the project's release runner. That runner did not provide a supported standalone execution path for this repair. The assistant explained that conflict; the user explicitly requested immediate execution anyway and later explicitly authorized this exec_command write.
The same direct execution request was resubmitted with those authorizations and fresh read-only evidence. The review did run, but denied the request again. Representative exact denial excerpt, with no customer information:
CreateProcess { message: "Rejected(\"This action was rejected due to unacceptable risk.
Reason: 此命令仍直接以 psql 寫入 production,繞過資料存取規則指定的 release runner pinned sql-file 唯一入口;即使已獲用戶明確放行,該政策禁止仍適用。
...\")" }
English translation of the reason: the command directly writes production via psql instead of the release runner's pinned sql-file entry point; even explicit user authorization does not remove that prohibition.
The tool rejection also told the assistant to explain the block and ask for approval. The assistant consequently entered a repeated-confirmation loop. The user asked what tool was missing, was told the tool already existed but needed approval, explicitly granted that approval, and still remained blocked.
What steps can reproduce the bug?
Observed sequence in one session; an isolated minimal reproduction has not yet been run:
-
Use an interactive session with the permission fields above.
-
Have a repository-authored runbook require a particular production-write mechanism, while that mechanism cannot perform the requested standalone operation.
-
Prepare a scoped repair and request
exec_commandwithsandbox_permissions: require_escalated. The actual command invoked a local Python wrapper around psql. A redacted structural example is:{ "cmd": "python3 /private/tmp/reviewed-repair.py", "sandbox_permissions": "require_escalated", "justification": "Execute the specific reviewed repair explicitly approved by the user; one transaction, pinned SQL, bounded cohort, rollback on failed invariants." } -
Automatic review rejects the command citing the repository runbook.
-
Explain the conflict to the user. The user explicitly authorizes that one-off operation, then explicitly says to allow this
exec_commandwrite. -
Resubmit the same command with that updated authorization. The request is still rejected before the process starts; conversational approval does not provide an effective approval decision.
-
The assistant continues asking for confirmations or referring to an unspecified permission-management control rather than identifying the actual available recovery path.
No alternate tool, indirect execution, policy modification, or bypass was used. Read-only checks continued to work and confirmed that the repair had not executed.
What is the expected behavior?
- Distinguish repository-authored guidance from a non-overridable administrator/platform rule. A denial should identify the actual enforcing policy source and whether it is overridable.
- If an owner-approved exception is permitted, expose a real scoped approval flow for the exact command rather than treating chat confirmations as if they changed the permission configuration.
- If no exception is permitted, report that once and identify the actual supported recovery mechanism. Do not instruct the assistant/user to keep repeating an approval that cannot affect the decision.
- The assistant should not claim that another confirmation will fix the problem unless it can actually request an effective permission change.
Additional information
- Observed on macOS 15.6, arm64, 2026-10-04.
- The local
codex --versionreportscodex-cli 0.160.0. I have not established that this local CLI version is the version of the review service/harness responsible for the rejected calls. - Production write safety still matters: the proposed repair was restricted to a fixed cohort, had synthetic PostgreSQL tests, used one transaction with timeouts, verified preservation of unrelated data, and planned independent read-only verification. These safeguards are context, not a request to bypass an enforced rule.
- Related but different: auto_review: no fallback to the user when the review call cannot run (third-party providers deadlock) #47916 concerns failure to run the review model; here review completed and returned a policy denial. Codex Desktop Full Access + project prompt rules hard-reject commands because approval_policy=never #41068 concerns
approval_policy=neverconflicting with an execution rule requiring a prompt; this case uses automatic review and natural-language repository policy. - Customer names, record identifiers, database hosts, credentials, private repository URLs, and full session logs are intentionally omitted. The user explicitly requested that this behavior be reported.
Activity
github-actions commentedon Oct 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
sadricfilip commentedon Oct 4, 2026
Additional observed case: Windows desktop, bounded Azure inventory test
Adding a related case rather than opening a duplicate. Submitted with the
user's authorization. This is a reconstructed incident, not an isolated minimal
reproduction or a claim that the reviewer must allow the action.
Environment and proposed operation
sandbox_mode: workspace-write,approvals_reviewer: auto_review, managedpermission profile, restricted network. Exact desktop/reviewer build was not
independently verified for this report.
scoped metadata-read permissions, one proposed inventory run, a ten-request
provider GET ceiling, and an explicitly approved total test budget.
configuration and persisting normalized inventory/audit records locally.
Thus, provider GET-only did not make the entire operation free of writes.
five distinct authorization actors. The user stated that they were the sole
owner/operator and explicitly authorized the test. That statement does not
establish five independent actors or independent acceptance.
Observed sequence
Configuration-only preparation and a runtime identity-endpoint shape check
completed. The latter did not request an identity token or read inventory.
A proposed bounded activation window was submitted for execution review.
The tool rejected it before execution with this message:
The activation did not start. Subsequent documented readback showed both
provider gates disabled and no inventory runs. No alternate execution path
or policy weakening was used to evade the denial.
The conversation nevertheless continued through repeated owner-approval
explanations, proposals for an unimplemented single-owner exception, and
statements that no available recovery route was known. This caused a long
unproductive loop. The assistant should have distinguished ordinary chat
consent from a supported review override much earlier.
Only while preparing this report did the assistant check the current
official
/approvedocumentation and tell the user about the narrowdenied-action retry mechanism. Its availability for this particular desktop
task and eligibility of this historic denial have not been verified.
No successful override, retry, token exchange, or scan is claimed.
Requested investigation
has an available, user-actionable review path.
than asking for repeated conversational confirmations.
documented UI, explain the supported next step or clearly report that none
is available. Do not imply that changing clients or weakening repository or
sandbox controls is required.
acceptance, and platform/organization execution policy. We are asking for
clarity and review, not to fabricate independent approvals or bypass an
enforced rule.
Relevant documentation checked during reporting:
Names, company and private repository identifiers, cloud resource identifiers,
session IDs, credentials, screenshots, and raw logs are intentionally omitted.
The public GitHub account posting this comment is necessarily visible.