Enable LSP semantic diagnostics on file writes
TL;DR
Run a real language server against edited files during `write_file` or `patch` operations to surface type errors, undefined symbols, and missing imports directly to the agent.
What changed
Hermes Agent added LSP semantic diagnostics that run on every write_file or patch call. A real language server now checks the edited file for type errors, undefined symbols, and missing imports before the agent continues.
The feature landed on 21 May 2026 and works with any LSP-compatible language server the user has installed on the VPS. No extra API keys or cloud services are required.
Why it matters
Vibe Builders who delegate code changes to Hermes now receive immediate feedback inside the same chat thread instead of discovering broken imports hours later. This reduces the loop of "agent writes code, human tests, agent fixes" that currently wastes tokens and time.
The move pressures pure LLM coding agents that skip static analysis. It also bets that self-hosted agents can match IDE-grade tooling when the host machine already runs the necessary language servers.
How to use it
Update Hermes Agent to the current release, then install the language server for your target language on the same VPS. Add the server binary path to the hermes config under lsp_servers.
Run a write_file or patch command as usual. Errors appear as normal agent messages with file, line, and suggested fix. The check adds roughly 200-800 ms per operation depending on project size.
Watch for
Confirm the bet if generated code passes type checks on first run in three consecutive projects. Watch for slowdowns on large monorepos or false positives that force manual overrides. The next expected step is automatic import insertion once diagnostics are stable.
Who this matters for
- Vibe Builders: Update Hermes to catch broken imports and type errors automatically during the chat session.
- Developers: Configure local LSP binaries in hermes config to reduce token waste on basic syntax debugging.
Harsh’s take
This update addresses the biggest bottleneck in agentic workflows: the hallucination-fix loop. By tethering Hermes to a local LSP, the system moves from blind text generation to verified code output. It is a pragmatic win for self-hosted setups over cloud-only black boxes that lack environment context.
Integrating static analysis directly into the write cycle forces the agent to confront its own errors before the human even sees the PR. This is how we get to reliable autonomous coding. Stop relying on the LLM to guess if a library is imported correctly and let the language server do its job.
It is a massive efficiency gain for anyone running agents on a VPS.
by Harsh Desai
About Hermes Agent
View the full Hermes Agent page →All Hermes Agent updatesMore from Hermes Agent
- App UpdateReduce cold-start launch times by up to 19 seconds
Shave ~19 seconds off the `hermes` launch time by deferring heavy imports, caching model catalogs on disk, parallelizing doctor checks, and skipping the welcome banner in single-query mode.
- App UpdatePublish Hermes Agent as a native PyPI package
Hermes Agent is now available directly on PyPI. Users can install the agent and its full TUI experience using `pip install hermes-agent` without needing to clone the repository.
- App UpdateOptimize installation size with lazy-loading dependencies
Heavy backends like messaging adapters, image-gen SDKs, and voice/TTS providers are now lazy-installed on first use. This reduces the initial installation footprint and speeds up setup.