How to really stop your agents from making the same mistakes
- Source
- x.com
- Publisher
- Garry Tan
- Author
- Garry TanTop Viber
- Date

Context
Garry Tan's account of recurring agent mistakes identifies a failure that adding another tool does not solve: an agent can already possess the right tool and still fail to use it. He describes a meeting-time error made despite an existing script that calculated the correct interval.
His proposed repair combines a written procedure with tests of whether the agent selects and runs that procedure. Testing the script checks its calculation; testing the routing checks whether a user's request reaches it. This extends his argument for testing complete AI systems into a specific maintenance practice: turn an observed failure into both a reusable and a regression test.
- A is a markdown procedure that teaches the model how to approach a task, not what the answer is. Think method call: the same procedure produces radically different output depending on what the user passes in.
- The fix that killed a recurring failure was one hard rule: live calendar APIs are only for the future or the last 48 hours, everything historical goes through the local index first. Five minutes of blocked retries became a sub-100ms local search.
- The missing practice is an ordered sequence, not more tooling: failure happens, write the skill, write the deterministic code, write unit tests, write the model evals, add a routing trigger, audit for duplicates, smoke test, it correctly.
- Process — A running instance of a program, with its own working memory, open files and identity.
- agent skill — A reusable instruction file that teaches an agent how to do one job well — the procedure, the tools, and what counts as done.
- API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.
- File — A named unit of stored data that keeps its contents while no program is using it.
“$160 million in funding, and most LangChain users still don't test their agents, because the framework gave them a gym membership without a workout plan.”
“But pieces aren't a practice.”
“The model's intelligence created the constraint that prevents the model from being stupid.”
“That's the bug. Not a wrong answer. A wrong side.”




