logoalt Hacker News

raneyesterday at 10:36 PM1 replyview on HN

You don't want to run tests after every file change, because that will distract Claude from finishing whatever it's doing and add noise to the context window. Of course the tests will be broken if Claude hasn't finished the full change yet.

Running tests makes most sense on the Stop hook event, but personally I've found CLAUDE.md instruction of "Run `just check` after changes" to be effective enough. The Stop hook has the issue that it will run the checks every time Claude stops responding, even after without any changes.


Replies

odie5533yesterday at 11:05 PM

Won't the LSP distract Claude too? I am trying to think of ways to make Claude faster at iterating by reducing tool calls. That always seems to be a bottleneck when it's doing tons of back-and-forth with tool calls.