Back to AI Q&A
Hermes Agent still gives an error after writing code? Let's look at the LSP diagnosis first

Hermes Agent still gives an error after writing code? Let's look at the LSP diagnosis first

AI Q&A Admin 64 views

If the project still reports an error after the Hermes Agent writes the code, look at the LSP diagnosis and actual test results first, and don't just believe that it says "fixed". v0.14 adds LSP semantic diagnostics after each write_file or patch, which can expose new types of errors, undefined symbols, missing imports, etc. to the agent earlier, but it is not a substitute for full build and testing.

What can LSP diagnosis capture?

LSP is better at catching problems that can be judged immediately after editing: variable names are written incorrectly, import is missing, type mismatches, function signatures are incorrect, JSON/YAML/TOML structure errors, Python syntax errors, etc. It's closer to the redline hint in the editor than just formatting, allowing Hermes Agent to see the obvious issues you just wrote in the next round.

Why is it still leaking?

It doesn't necessarily know if the database migration is correct, nor does it necessarily override runtime permissions, network errors, third-party service returns, browser compatibility, concurrency issues. Another common situation is that the project does not have a good language server, or the dependencies are not fully installed, and the LSP cannot provide an effective diagnosis.

Recommended troubleshooting sequence

  1. Let Hermes Agent summarize what files it has changed first, and don't just continue with major changes.
  2. Check if there are any new errors in the LSP diagnosis and fix the new items first.
  3. Then run the project's own tests, type checks, or build commands.
  4. If the test fails, return the first error and the repro command to Hermes.
  5. When it comes to production code, you still have to look at the diff manually.

In a word: LSP diagnosis is to apply the brakes in advance, not to automatically guarantee correctness. It reduces the number of "low-level errors only found after writing", but the real acceptance is still testing, running, and code reviewing. Official warehouse address: https://github.com/NousResearch/hermes-agent.

Recommended Tools

More