logoalt Hacker News

tasuki • yesterday at 3:23 PM • 2 replies • view on HN

What is the reason for this? Surely running tests by itself isn't necessarily token-expensive? And it provides cheap feedback for the agent: to see whether they're breaking things.


Replies

dotancohen • yesterday at 3:36 PM

My guess is that the LLM (usually Sonnet or Opus in my case) is burning tokens polling to see if the output finished - and there is often a lot of it. My current project is Rust, Python, and Kotlin for what it's worth.

I don't actually know the real mechanism, I came across this serendipitously.

erincandescent • yesterday at 6:21 PM

By default Anthropic's token cache TTL is 5 minutes. If your tests take >5m to execute, when the LLM resumes your entire context is a cache miss

➕ show 2 replies