How do I regression test tool calls, not just the final answer?
Check what the tool calls changed, such as a record written or a refund issued, and assert on a call itself only when the call is the requirement. A final answer alone misses a wrong write, and a test that pins the exact sequence of calls fails every time the agent finds a different valid route.
Anthropic’s engineers describe the instinct to verify that an agent followed specific steps, and say they found it “too rigid” and prone to brittle tests. Their advice is to grade what the agent produced, not the path it took. Their example of an outcome is whether a reservation exists in the environment’s database, which is also how tau-bench scores a run.
So a regression case has two checks: the final state of whatever the tools touch, and the arguments of the calls that must be exact, such as an amount or a recipient. Run each case several times, since one pass proves little.
An outcome check sees only effects that are stored. A call whose effect leaves no record, like a sent email, needs the call itself asserted.
published