Gemini CLI read_file is executing without any explicit approval.
What happened?
Gemini CLI read_file is executing without any explicit approval. Approval prompt is not shown, and the model accessed sensitive files automatically. This violates the expected security policy described in the documentation. This behavior is repeatable and presents a major privacy risk.
What did you expect to happen?
Approval prompt should be shown before every read_file excution.
Client information
- CLI Version: 0.1.9
- Git Commit: 34935d6
- Operating System: win32 v22.16.0
- Sandbox Environment: no sandbox
- Model Version: gemini-2.5-pro
- Memory Usage: 146.6 MB
Login information
No response
Anything else we need to know?
This is not only read_file but also read_many_file, which can be triggered by entering two files in the prompt. The difference read_file and read_many_file to @path/to/file , with @ I give it to the agent on the screen, it does not have to use a tool. Without @ the tools have to be used, so that seems to be something bigger.
Save_memory (write) has already been executed by the agent without consent or any instruction at all outside its root and on a whole other hard disk, something is generally wrong here.
Thanks for your message.
Hi,
Thanks for bringing up read_file and read_many_files. The is currently by design, but this is a great opportunity to discuss it as a community.
We'd love to hear your ideas for improvement! Please feel free to start a new discussion thread so we can all jump in.
Looking forward to hearing what the community thinks! 🚀
I am going to close this as WAI since read tools are on by default as intended.
Happy to continue the discussion if folks feel strongly about changing this behavior 😄
Found possible duplicate issues:
- #3848: (0.9006915092468262)
Closing as by design for the reasons discussed earlier. One thing to call out is you can define a geminiignore file if there are directories of files within your project that you want to ensure gemini should ignore and not read even if you need to give it access to other files in the directory.