gemini-cli - 💡(How to fix) Fix Agent raising multiple changes but only the last accepted change is reflecting [1 comments, 2 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#25750Fetched 2026-04-22 08:03:34
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
commented ×1labeled ×1
RAW_BUFFERClick to expand / collapse

What happened?

when a single file has multiple changes at different line agent is giving it in one request. like back to back accepts. But the bug is, only the last accepted change is reflecting. for example - if changes are at line 20, 40 and 60. you accept the first change. Then in the same request(no other llm call) you accept the 2nd and then the 3rd. only the 3 line that is change on the line 60 will reflect

What did you expect to happen?

Expected behavior is that all the changes should reflect.

Client information

  • CLI Version: 0.38.2
  • Git Commit: b0ed611a0
  • Session ID: ea96fdab-8e3a-4f36-9d77-f8a4255ec083
  • Operating System: linux v25.2.1
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 297.0 MB
  • Terminal Name: ghostty 1.2.3-arch2
  • Terminal Background: #1a1b26
  • Kitty Keyboard Protocol: Supported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The issue can be mitigated by ensuring that each change is accepted in a separate request, rather than accepting multiple changes in a single request.

Guidance

  • Review the code that handles the acceptance of changes to ensure it is designed to handle multiple changes in a single request correctly.
  • Verify that the issue is not related to the specific version of the CLI (0.38.2) or the model version (auto-gemini-3) being used.
  • Consider adding logging or debugging statements to track the changes being accepted and how they are being processed.
  • Test the behavior with a smaller set of changes to see if the issue is specific to the number of changes being accepted.

Example

No code snippet can be provided without more information about the codebase.

Notes

The issue may be related to the specific implementation of the change acceptance logic, and without more information about the code, it is difficult to provide a more specific solution.

Recommendation

Apply workaround: Ensure that each change is accepted in a separate request, rather than accepting multiple changes in a single request, to mitigate the issue until a more permanent solution can be found.

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