Hermes starts giving file edits real language-server feedback before broken code piles up
Hermes PR #24168 adds an LSP layer behind write_file and patch so the agent can see semantic diagnostics introduced by its own edit: type errors, undefined names, missing imports, and similar failures from language servers such as pyright, gopls, rust-analyzer, typescript-language-server, clangd, bash-language-server, Vue, Svelte, Astro, Lua, PHP, OCaml, Dockerfile, Terraform, Dart, Haskell, Julia, Clojure, Nix, Zig, Gleam, Elixir, Prisma, Kotlin, and Java. The design first captures a pre-write baseline and then filters out old problems, so the model is not buried under a project's existing debt. It is also gated to git workspaces, keeping casual Telegram or Discord home-directory chats from accidentally waking language servers.
Syntax checks catch only the cheap failures. The more expensive mistakes in agent-written code are semantic: a missing import, a wrong type, a stale symbol, or a framework file that parses but will fail the next build. Surfacing those errors at edit time shortens the loop between agent action and correction. The caveat is operational: language servers are more stateful and heavier than a parser, so install policy, workspace detection, and noise filtering matter as much as the feature itself.
- PR #24168 adds agent/lsp modules for protocol framing, async client management, server registry, install dispatch, formatting, and CLI access
- write_file and patch_replace gain an LSP semantic tier after in-process syntax checks, with pre-write baselines to show only edit-introduced diagnostics
- The PR lists support for about 26 language servers across Python, Go, Rust, TypeScript, C/C++, shell, web frameworks, infrastructure files, JVM, and other languages
- The feature is gated on git workspace detection so non-repository gateway chats stay dormant by design
- The PR reports 49/49 LSP tests and 229/229 combined tools plus LSP tests passing
- The work is still an open PR, not a tagged Hermes release
- Language-server installation can be slow, network-dependent, or unsuitable for locked-down production hosts
- Pre-existing-error filtering must be validated on monorepos and generated-code folders where diagnostics can be noisy
- Semantic diagnostics help the model correct code but do not replace project-specific builds, tests, and review