G-19Language-server Integration

/coding-agents/language-server

The agent asks the same type engine an editor uses for definitions, references and diagnostics, instead of searching text.

Step-by-step walkthrough7 steps
  1. The agent needs to change save(). First question: who calls it?
  2. Grep answers a different question — where does the text “save(” appear — and returns comments, strings and three unrelated save methods.
  3. A language server answers the real one: it already knows the project’s symbols and types.
  4. The definition and every true reference, exact — one call, nothing to read through and discard.
  5. Now the agent edits. The server re-checks the changed file the moment it is written.
  6. A new type error — the second argument is now a string — pushed back in seconds.
  7. Fixed before any test runs. The cheapest rung of the verifier ladder, attached to every edit.
Key insight

Grep answers “where does this string appear”; a language server answers “what refers to this symbol”. Diagnostics pushed after every edit add a type check to each change, seconds before any test could run.

Failure mode

Trusting a server that is still indexing or misconfigured for the repo layout. It reports stale or false errors, and the agent spends its turns chasing imports that were never broken.

Elsewhere in the atlas