Agents misinterpret LSP diagnostics as failed edits #6612

Open
opened 2026-02-16 18:04:45 -05:00 by yindo · 3 comments
Owner

Originally created by @Lyapsus on GitHub (Jan 17, 2026).

Originally assigned to: @thdxr on GitHub.

When an edit or write operation succeeds but triggers LSP diagnostics (errors/warnings), the tool output only shows the diagnostics. This can lead agents to believe the operation failed, causing them to retry unnecessarily or get stuck in a loop.

The output should clearly indicate that the edit/write was applied successfully, even if diagnostics are present.

Originally created by @Lyapsus on GitHub (Jan 17, 2026). Originally assigned to: @thdxr on GitHub. When an edit or write operation succeeds but triggers LSP diagnostics (errors/warnings), the tool output only shows the diagnostics. This can lead agents to believe the operation failed, causing them to retry unnecessarily or get stuck in a loop. The output should clearly indicate that the edit/write was applied successfully, even if diagnostics are present.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6310: Sessions become unusable due to large LSP diagnostics (Lua + possibly others) - Similar problem where LSP diagnostics are causing issues with tool operations
  • #3902: File edits not applied - shows diff output only without modifying files - Shows similar symptom where edit operations appear to fail but may actually succeed
  • #2255: write and edit tools return spurious 'cmd must not be empty' error despite successful operations - Related issue where operations succeed but errors are shown, causing agents to misinterpret results

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be a duplicate of existing issues. Please check: - #6310: Sessions become unusable due to large LSP diagnostics (Lua + possibly others) - Similar problem where LSP diagnostics are causing issues with tool operations - #3902: File edits not applied - shows diff output only without modifying files - Shows similar symptom where edit operations appear to fail but may actually succeed - #2255: write and edit tools return spurious 'cmd must not be empty' error despite successful operations - Related issue where operations succeed but errors are shown, causing agents to misinterpret results Feel free to ignore if none of these address your specific case.
Author
Owner

@pschiel commented on GitHub (Jan 17, 2026):

It sounds a bit like a bad model issue. Had zero problems with that. Tool calls show clearly successful, agent interprets the type errors correctly, also understands when it's not due to that edit. What model are you using?

@pschiel commented on GitHub (Jan 17, 2026): It sounds a bit like a bad model issue. Had zero problems with that. Tool calls show clearly successful, agent interprets the type errors correctly, also understands when it's not due to that edit. What model are you using?
Author
Owner

@Lyapsus commented on GitHub (Jan 17, 2026):

Don't have transcripts at hand but I'm pretty sure Gemini 3 Pro and Codex 5.2 both at max thinking levels showed such behavior.
And even if this is a matter of weak model - why not help it? This case is a free lunch to me in this regard

@Lyapsus commented on GitHub (Jan 17, 2026): Don't have transcripts at hand but I'm pretty sure Gemini 3 Pro and Codex 5.2 both at max thinking levels showed such behavior. And even if this is a matter of weak model - why not help it? This case is a free lunch to me in this regard
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6612