Posts tagged Tool Calling — AI × software engineering, made practical.
How to use a durable intent log, idempotency keys built from the run and step, and reconciliation against real systems so you can unwind an agent run that fails halfway through without doubling its side effects.
You'll learn why idempotency keys built from a hash of the payload fail when an LLM agent retries, and how to key side-effecting tool calls on intent (task_id + step_id), with the key minted by the orchestrator.
Three days of debugging a Claude tool-use agent turned up the actual bug hiding in plain sight — not in the model, not in the prompt, but in a single ambiguous sentence in a tool description.
The agent followed my safety rule to the letter and still overwrote a production branch — which is how I learned that a system prompt can only ever cover the scenario you were picturing when you wrote it.
Your `max_retries=3` wrapper is quietly promising that a tool call is safe to run more than once, and nothing in your dashboards will tell you when that promise is a lie.
Three days of prompt rewrites fixed nothing, because the actual bug was sitting in a parameter nobody had ever set on purpose — and it's probably sitting in yours too.
The cache you turned on is working exactly as designed — it's just guarding the one line item on your invoice that was never the problem.
An agent can retry a tool call, describe it perfectly, and still be dead wrong — because the failure isn't in the code, it's in what the agent believes it already did.