YOLO mode should override block of command-substitution in bash
What happened?
Repro:
- run
gemini -ybecause security be damned (say, I'm running in my own sandbox) - ask it some question about "the diff wrt merge-base"
- it tries to run the obvious
git diff $(git merge-base master HEAD)
Actual:
the command is blocked with Command substitution using $(), <(), or >() is not allowed for security reasons, which certainly doesn't sound YOLO to me!
What did you expect to happen?
the command succeeds
Client information
Login information
oauth
Anything else we need to know?
No response
Found possible duplicate issues:
- #6389
If you believe this is not a duplicate, please remove the status/possible-duplicate label.
I don't seem to have the rights to remove the label, but I'd say this is not a duplicate since the use cases are very different (CI action vs interactive usage), though the underlying cause is likely the same, and ideally a single fix would be able to close both issues.
Hey thanks for filing. Going to add @cornmander to this thread, since he mentioned he would be looking into this area!
I think this is a good idea.
Gemini CLI GHA users are running into this:
- https://github.com/google-gemini/gemini-cli/issues/6389
- https://github.com/google-github-actions/run-gemini-cli/issues/174
Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.
It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.
Thank you for your contribution!
The block makes sense as a default, but it should be a user-configurable toggle rather than a hard wall. The main pain point is token and 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. In YOLO mode especially this is counterproductive; the user has already explicitly opted into "run everything without asking me," so silently blocking a command undercuts that contract. A toggle in settings.json would be a better approach than a hardcoded limit, letting users who understand the risk opt out while keeping the block on by default for everyone else.