codex - 💡(How to fix) Fix CLI hard-refuses explicitly authorized infrastructure administration tasks instead of prompting for confirmation [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18150Fetched 2026-04-17 08:32:04
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
0
Timeline (top)
labeled ×4commented ×2unlabeled ×2closed ×1

Root Cause

The concrete task was to enable a service on ESXi hosts that I administer. I explicitly requested the action, provided the workflow, and was willing to authorize the dangerous step. Instead of asking for a per-task confirmation or elevated authorization flow, the agent refused outright because it interpreted the task as a privileged action on real infrastructure.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.121.0

What subscription do you have?

ChatGPT plan with Codex access

Which model were you using?

gpt-5.4

What platform is your computer?

Linux 6.17.0-20-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

xterm-kitty (Kitty). No tmux/zellij.

What issue are you seeing?

In an infrastructure-admin workflow, the CLI was helpful for documentation, scripting, environment setup, and troubleshooting, but it hard-refused to perform the actual administrative action on systems under my control.

The concrete task was to enable a service on ESXi hosts that I administer. I explicitly requested the action, provided the workflow, and was willing to authorize the dangerous step. Instead of asking for a per-task confirmation or elevated authorization flow, the agent refused outright because it interpreted the task as a privileged action on real infrastructure.

From an infrastructure/operator point of view, this makes the agent much less useful: it can prepare everything around the task but cannot complete the task itself even with explicit user intent.

What steps can reproduce the bug?

  1. Start a Codex CLI session as an administrator/operator.
  2. Ask the agent to perform an administrative action on real systems under the user's control.
  3. Provide explicit intent/authorization, credentials, and the exact workflow.
  4. Observe that the agent may help with prep work (docs/scripts/env fixes), but refuses to execute the real administrative action itself.

Uploaded thread: 019d96ca-c00c-77f0-b882-8c6a0b8e4b45

What is the expected behavior?

For explicitly authorized admin operations, the CLI should support a gated execution path rather than an unconditional refusal. A more useful behavior would be:

  • detect that the task is sensitive
  • require explicit user confirmation per action or per batch
  • execute with auditability/logging
  • optionally provide post-action validation and rollback guidance

In other words: asking for strong confirmation is reasonable; outright refusal is not useful for legitimate infrastructure administration workflows.

Additional information

I am not reporting poor technical quality from the agent. The technical help was good. The issue is the product behavior/policy boundary: the CLI can assist around the task but not complete the authorized task itself, which is a major limitation for infrastructure/operations use cases.

I also sanitized the uploaded thread before filing this issue so it should not contain the real secret, hostnames, IPs, or direct access URLs.

extent analysis

TL;DR

The Codex CLI should be modified to support a gated execution path for explicitly authorized admin operations, allowing for user confirmation and auditability instead of outright refusal.

Guidance

  • Review the Codex CLI's policy boundaries and consider implementing a more nuanced approach to handling sensitive administrative actions, such as requiring explicit user confirmation per action or per batch.
  • Investigate the possibility of adding auditability and logging features to the CLI to track executed actions and provide post-action validation and rollback guidance.
  • Consider adding a flag or option to the CLI that allows administrators to explicitly authorize and confirm sensitive actions, overriding the default refusal behavior.
  • Evaluate the current workflow and authentication mechanisms to ensure they are sufficient for legitimate infrastructure administration use cases.

Example

No code snippet is provided as the issue is related to the product behavior and policy boundary rather than a specific code implementation.

Notes

The issue is specific to the Codex CLI's behavior and policy boundary, and the solution may require changes to the CLI's architecture and implementation. The provided information does not contain enough technical details to suggest a specific code-level fix.

Recommendation

Apply a workaround by modifying the Codex CLI's configuration or implementing a custom script to handle sensitive administrative actions, as the current version (0.121.0) does not support the desired behavior. This is because the issue is related to the product's policy boundary and behavior, and a workaround is necessary until a fixed version is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING