gemini-cli - 💡(How to fix) Fix Bug Report: Discrepancy Between Edit Tool CLI Output and Actual File Changes [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25783Fetched 2026-04-23 07:45:19
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Code Example

> /about
# paste output here
RAW_BUFFERClick to expand / collapse

What happened?

Recently, I've noticed a bug with the Edit tool on the Gemini CLI. When it was instructed to update my document files with new information or make amendments, it used the Edit tool and displayed the changes it made, which I was satisfied with. However, when I checked GitHub to view the changes, only half of what Gemini reported was actually reflected; the rest were missing. When I told it to try again and verify the work, it used the Write tool instead, which worked, but the issue remains that Gemini is hallucinating that it made changes to the file when it actually didn't. Since it did show the Edit function call, it seems like there could be an issue with the Edit tool itself rather than Gemini. Gemini even mentioned that there appears to be an issue with the Edit tool.

What did you expect to happen?

I expected all stated changes to have actually been applied to my documents.

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about
# paste output here

About Gemini CLI
│ CLI Version: 0.38.2
│ Model: gemini-3.1-pro-preview
│ Sandbox: no sandbox
│ OS: win32
│ Auth Method: Signed in with Google
│ Tier: Gemini Code Assist in Google One AI Pro
│ IDE Client: Antigravity

</details>

Login information

│ Auth Method: Signed in with Google
│ Tier: Gemini Code Assist in Google One AI Pro

Anything else we need to know?

No response

extent analysis

TL;DR

The issue may be resolved by investigating and fixing the Edit tool, which appears to be malfunctioning and not applying all changes as reported by Gemini.

Guidance

  • Investigate the Edit tool's functionality and logs to determine why it's not applying all changes as expected.
  • Compare the changes reported by Gemini with the actual changes made to the documents to identify any patterns or discrepancies.
  • Consider using the Write tool as a temporary workaround, as it seems to be working correctly.
  • Check for any updates or known issues with the Gemini CLI, specifically version 0.38.2, that may be related to the Edit tool.

Example

No code snippet is provided as the issue does not contain sufficient technical details to create a relevant example.

Notes

The issue may be specific to the Gemini CLI version 0.38.2 or the Edit tool itself, and further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Use the Write tool instead of the Edit tool until the issue is resolved, as it seems to be working correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Bug Report: Discrepancy Between Edit Tool CLI Output and Actual File Changes [1 participants]