Agent Retry Decision Classification Matrix
A logic-gate checklist to classify LLM agent failures and prevent infinite loops.
Steps
- Categorize 429 (Rate Limit) and 5xx (Server Error) as 'Transient/Retryable'.
- Categorize 400 (Invalid Request) and 401/403 (Auth) as 'Permanent/Fatal'.
- Flag 'Context Length Exceeded' as 'Non-Retryable' (Requires Pruning).
- Mark 'Safety/Policy Violation' as 'Terminal' (Never Retry).
- Route 'JSON Parsing Failure' to a 'Single Repair Attempt' with a formatting nudge.
- Escalate to 'Dead Letter State' if a retryable error hits max_attempts.