google-gemini / google-gemini/gemini-cli
toml command interpolation stuck in infinite loop when multiple commands need permission
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
I have a .toml command template with two instances of `!{}`. Each contains a command that causes the agent to request permissions. After I allow the first one the agent runs it, then the agent asks for permissions for the second one and runs it, then asks again for permissions for the first one again and runs it again, then asks permissions for the second one again and runs it again... in an infinite loop. YOLO mode breaks out of it. Not even allowing the command for the rest of the session breaks the loop.
### What did you expect to happen?
each command inside `!{}` blocks inside of .toml commands to be run only once, when the template is first interpolated.
### Client information
Client Information
Run `gemini` to enter the interactive CLI, then run the `/about` command.
```console
> /about
│ CLI Version 0.58.0 │
│ Git Commit ac9431c9e │
│ Model Auto │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method Signed in with Google (zach.coffin@vetsource.com) │
│ Tier Gemini Code Assist Enterprise │
│ GCP Project vetsource-clouddevstacks │
│ IDE Client VS Code │
```
### Login information
Google account
### Anything else we need to know?
_No response_
Contributor guide
Research direction
Reproduce the issue in the Gemini CLI with a .toml command template containing two !{} blocks, then allow each permission request and observe the repeated execution. Trace the command-interpolation and permission flow; done means each command runs once during the initial interpolation without returning to the loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100