Agents meet failing tools all the time: a payment service returns 500, a lookup times out. What matters is what the agent does next. Three failures are common:
- Silent skip: the refund tool errors and the agent says "done" anyway.
- Loops: the agent calls the same tool again and again.
- Budget overrun: it takes far more steps (and tokens and money) than the job needs.
The right behaviour when a tool keeps failing is honest: try again a sensible number of times, then hand the case to a person and say so.
Your task
Write tests that pass whether the refund tool works or not, as long as the agent behaves well. On submit they run with the refund service up and down, against agents that skip silently, loop, or run over the budget of 6 steps.