gemini-cli - 💡(How to fix) Fix Command substitution block should be user-configurable, not a hardcoded wall [1 pull requests]

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…

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

What would you like to be added?

A allowCommandSubstitution toggle in settings.json (defaulting to false) that lets users opt out of the hardcoded command substitution block. In YOLO mode, this should either default to true or surface a warning instead of a silent block so the model can adapt its approach.

Why is this needed?

The current hardcoded block creates two problems:

  1. Token/turn waste — the model writes out a full command with $() substitution, the CLI blocks it at execution time, and the entire turn is wasted with nothing to show for it. The model has no way to know in advance the command will be blocked.

  2. YOLO mode contradiction — in YOLO mode the user has explicitly opted into "run everything without asking me." Silently blocking an entire command class undercuts that contract without any warning.

A configurable toggle keeps the safe default for everyone while letting users who understand the risk opt out.

Additional context

Reproduction: run any agentic task that requires command substitution (e.g. security triage, process inspection) in YOLO mode. The model generates a valid command, the CLI blocks it silently, the turn is lost, and the tokens still count against the user's quota — making this a compounding cost with no output to show for it.

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

gemini-cli - 💡(How to fix) Fix Command substitution block should be user-configurable, not a hardcoded wall [1 pull requests]