Agent can't access linter diagnostics in certain languages

Could someone from the team explain how exactly the Agent gets the diagnostics that exist in a workspace?

When I attempt to ask the Agent to e.g. fix all compilation errors in Dart (which are reported by the Dart LSP-based language server), Agent doesn’t seem to be able to read those diagnostics, which has not been my experience in e.g. Typescript.

I had assumed that diagnostics were accessed via the LSP client built into Cursor, but is that not necessarily true?

EDIT: I created a repo that can be used by the Cursor team to easily reproduce the bug:

3 Likes

Yeah, I’m seeing the same issue with C++ and clangd

1 Like

So weird - they must not be tapping directly into the LSP protocol, because I would think this wouldn’t be different from one language to the next.

Turns out that with my clangd case the issue was that Cursor does not see warnings. When I change my configuration to treat warnings as errors, I’m able to do “Can you fix the @Linter errors” in the chat and the agent will handle it correctly.

1 Like