Book: AI Agents Pocket Guide: Patterns for Building Autonomous Systems with LLMs Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub A user reports that the agent did the wrong thing on Tuesday afternoon. You open the trace, you read the spans, and the offending step jumps out: the model called refund_order instead of cancel_subscription . You have the prompt, the tool schemas, the model id, the temperature. You run the same prompt against the same model and get back a different tool call. The bug is gone, and so is your chance of fixing it. This is the part of agent development the test-mocking docs do not cover. "Just mock the LLM" works for unit tests where you wrote both the prompt and the canned response.…