Testing Failure Recovery
Failure recovery tests inject faults into the agent's environment and verify that the agent responds correctly — retrying when appropriate, escalating when not.
6 min•By Priygop Team•Updated 2026
Fault Injection Tests
- Timeout injection: make a tool return a timeout error and verify the agent retries
- Network failure injection: simulate a network failure and verify fallback is used
- Not found injection: return a 404 for a resource and verify the agent handles it correctly
- Permission denied injection: return a 403 and verify the agent escalates instead of retrying
- Infinite loop injection: block all forward progress and verify the loop detector fires
- Partial failure injection: succeed on steps 1-3 then fail on step 4 — verify resume works
Key Takeaways
- Failure recovery tests inject faults into the agent's environment and verify that the agent responds correctly — retrying when appropriate, escalating when not.
- Timeout injection: make a tool return a timeout error and verify the agent retries
- Network failure injection: simulate a network failure and verify fallback is used
- Not found injection: return a 404 for a resource and verify the agent handles it correctly