You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Multiple sequential edits to the same file are lost - only the last one persists (after fix #8513) #25868
Description:
After the fix in PR #8513 ("Serialize function calls that mutate state"), the bug of multiple edits on the same file still occurs.
When the model performs multiple sequential edits on the same file (even when each edit is individually accepted with ✓ Edit ... → Accepted), only the last edit is persisted. All previous edits are lost/overwritten.
Steps to Reproduce:
Ask Gemini CLI to make changes to a file (in my case update_prompts_v7.sql)
The model proposes edit 1 → I accept it
The model proposes edit 2 on the same file → I accept it
The model proposes edit 3 on the same file → I accept it
Only the 3rd edit remains. Edits 1 and 2 are gone.
What did you expect to happen?
All accepted edits should be applied sequentially and persist in the file.
Actual behavior:
Only the last accepted edit is kept. Previous edits are discarded.
I have strong rules in GEMINI.md telling the model to never do multiple edits on the same file and to always plan everything in one edit, but it still happens.
This occurs even though each edit is confirmed individually.
What happened?
Description:
After the fix in PR #8513 ("Serialize function calls that mutate state"), the bug of multiple edits on the same file still occurs.
When the model performs multiple sequential edits on the same file (even when each edit is individually accepted with
✓ Edit ... → Accepted), only the last edit is persisted. All previous edits are lost/overwritten.Steps to Reproduce:
update_prompts_v7.sql)What did you expect to happen?
All accepted edits should be applied sequentially and persist in the file.
Actual behavior:
Only the last accepted edit is kept. Previous edits are discarded.
Client information
Login information
No response
Anything else we need to know?
GEMINI.mdtelling the model to never do multiple edits on the same file and to always plan everything in one edit, but it still happens.References:
This is a critical reliability issue for using Gemini CLI in real development workflows.