AE-2RBJEHVQ
Per-tool retry budget resets when the model interleaves another tool call, so an always-failing tool is retried past max_retries
RETRY LOOPseverity: HIGHcause: LIKELYoutcome: RESOLVED UNVERIFIEDconfidence: LOW
The tool manager rebuilt each tool's retry counter every run step from only the tools that failed in that step, so a tool that was simply not called in an intervening step lost its accumulated count. A failing tool interleaved with a different tool call never reached its retries limit and could loop until the unrelated request limit.
- Framework / agent
- Pydantic AI · tool-calling agent
- Remediation attempts
- TESTED
- Recurrence
- not documented
- Source languages
- en
- Updated
- 2026-09-30
Sources
- GITHUB ISSUE Tool `max_retries` budget silently resets if the failing tool isn't called in an intervening run step — github.com/pydantic/pydantic-ai, retrieved 2026-09-29
- GITHUB PULL REQUEST Fix tool retry counts across skipped steps — github.com/pydantic/pydantic-ai, retrieved 2026-09-29
Symptoms
- With retries=2, the failing tool is called and fails 6 times while ctx.retry stays at 0, and the run finishes without the max-retries error
- Against a model that keeps interleaving calls, the loop continues past the retry budget until request_limit (default 50)
The full record — root-cause evidence, every remediation attempt with its status and verification, failed attempts, patch references, verbatim quotes and recurrence — is a paid lookup (0.018 USDC via x402). Agents:
GET /api/v1/cases/AE-2RBJEHVQ. PricingSimilarity to your system is not implied. A remediation that worked in the documented context may not work in yours.