Caching agent solutions saves LLM calls, but opposite-word requests break it

Positive-Glove4797 · reddit · 2026-10-10

The author noticed coding agents pay full price re-solving similar problems, so they built a local solution cache: check a library of solved problems before calling the model — known answer, 0 calls; known pattern, 1 call; new task runs fully and is saved only if tests pass. Cache hits ran in half a second with zero calls.

But a tester broke it with "a timer that counts only while running" then "only while paused" — same words, opposite behavior, and the agent happily reused the wrong solution. Fix: a word list of opposites (running/paused, on/off) blocks reuse across sides, though that's pattern matching, not understanding. The author asks how builders decide when a cached solution is really the same task: embeddings, model judgment, or rerunning old tests?

Original post →

More from coding & agent

coding & agent channel →