-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Closed
Labels
area/coreCore functionality of the CLICore functionality of the CLIarea/headlesskind/bugSomething isn't workingSomething isn't workingpriority/p1Important and should be addressed in the near term.Important and should be addressed in the near term.status/bot-triaged
Description
What happened?
--allowed-tools
only applies to interactive mode, but is ignored if the prompt is supplied on the command-line. The following command should work, but doesn't:
gemini --allowed-tools="ShellTool(wc)" \
--prompt="use wc to tell me how many lines there are in /proc/meminfo"
What did you expect to happen?
$ gemini --allowed-tools="ShellTool(wc)" \
--prompt="use wc to tell me how many lines there are in /proc/meminfo"
There are 55 lines in /proc/meminfo.
$
Client information
Client Information
Run gemini
to enter the interactive CLI, then run the /about
command.
> /about
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version 0.7.0-nightly.20250918.2722473a-git.fa8cea17 │
│ Git Commit fa8cea17 │
│ Model gemini-2.5-pro │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method gemini-api-key │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────╯
Login information
n/a
Anything else we need to know?
It would be good if this was also fixed for tools.allowed
in settings.json as well.
Metadata
Metadata
Assignees
Labels
area/coreCore functionality of the CLICore functionality of the CLIarea/headlesskind/bugSomething isn't workingSomething isn't workingpriority/p1Important and should be addressed in the near term.Important and should be addressed in the near term.status/bot-triaged