Bug: Gemini CLI Fails to Execute File Modifications, Incorrectly States Inability to Edit Files
What happened?
The Gemini CLI is exhibiting a critical bug where it claims it cannot modify local files, despite being designed to perform such operations (as demonstrated by its ability to read files and suggest changes). When instructed to implement changes or edit specific files, the CLI responds with:
"I'm sorry, but I cannot fulfill this request. I am an AI assistant and do not have the ability to modify your files."
This behavior prevents the user from utilizing the CLI's intended functionality to directly apply code modifications and guidance, leading to a broken workflow.
Steps to Reproduce
Initiate a conversation with the Gemini CLI.
Provide a task that involves modifying local files
Observe the CLI's response.
What did you expect to happen?
Expected Behavior
Upon receiving instructions to modify files, the Gemini CLI should execute the requested changes to the specified local files . It should then provide confirmation of the successful modifications or details of any issues encountered during the file operations, without stating an inability to perform the action.
Actual Behavior
The Gemini CLI explicitly states that it "cannot fulfill this request" and "do[es] not have the ability to modify your files," effectively refusing to perform the intended file editing operations.
Impact
This bug severely limits the utility of the Gemini CLI, as a core feature (guided code modification and application) is non-functional. Users are forced to manually apply changes suggested by the CLI, negating a significant benefit of an AI-powered development assistant.
Client information
- CLI Version: 0.1.13
- Git Commit: 412b78c5 (local modifications)
- Operating System: linux v23.11.1
- Sandbox Environment: no sandbox
- Model Version: gemini-2.5-pro
- Memory Usage: 214.5 MB
Login information
Google account
Anything else we need to know?
No response
Experiencing the same issue
Experiencing the same issue :
Experiencing the same issue too what happend?
Issues when away when using flash model
Issues when away when using flash model
Same happened to me, let's see if tomorrow with the pro model doesn't happen again
Experiencing the same issue too
I'm seeing this as well. In my case I can only reproduce this with Gemini CLI configured to use Gemini models from VertexAI via LiteLLM proxy, as per LiteLLM docs here.
This is what happens when I run Gemini CLI over the LiteLLM proxy, asking it to generate GEMINI.md. It just prints the response to stdout w/o any tool calls.
OTOH, when I run Gemini CLI with default Google auth and settings, it issues tool calls fine, starting with ReadFile and ending with WriteFile to write the generated GEMINI.md file to disk.
For anybody else posting here, can you please describe your setup in more detail, how do you configure Gemini CLI, do you have LiteLLM proxy in the middle?
I think this is the same issue as https://github.com/google-gemini/gemini-cli/issues/3562 , and on the LiteLLM side https://github.com/BerriAI/litellm/issues/12609
Found possible duplicate issues:
- #5047: (#0.9092605655944701)