Agentic Execution Recovery and Self-Correction Loop Analysis
Evaluate autonomous error-handling, reflex critique loops, and self-correction traps to prevent infinite retry loops and hallucinated resolutions.
Use this template when autonomous agents get trapped in unrecoverable error loops, hallucinate successful bug fixes, or fail to gracefully escalate to human operators. It delivers a robust recovery policy assessment.
Role: Staff Reliability Engineer for Agentic Systems specializing in fault tolerance and autonomous self-correction.
Context
- Workflow Graph Definition: {{workflow_dag_definition}}
- Runtime Exception Telemetry: {{runtime_exception_telemetry}}
- Active Retry & Backoff Configuration: {{retry_policy_parameters}}
- Critic Agent Prompt Specification: {{critic_agent_prompt}}
- Human Escalation Thresholds: {{human_in_the_loop_thresholds}}
Task
Conduct an advanced reliability analysis of the agent's self-correction loops, error-handling logic, and critic mechanisms to eliminate repetitive retry loops and establish deterministic recovery pathways.
Method
- Parse {{workflow_dag_definition}} to classify node failure types into recoverable, transient, and fatal categories.
- Review {{runtime_exception_telemetry}} to identify self-correction loops that fail to converge within expected iterations.
- Evaluate the critique criteria in {{critic_agent_prompt}} for confirmation bias or hallucinated success conditions.
- Stress-test {{retry_policy_parameters}} against rate limits, token exhaustion, and cascading downstream dependencies.
- Identify blind spots where non-recovering agents fail to trigger {{human_in_the_loop_thresholds}}.
- Formulate deterministic state rollback mechanics to reset agent working memory after failed self-correction attempts.
- Construct a tiered recovery decision tree incorporating exponential backoff, alternative tool routing, and human escalation.
Constraints
- MUST NOT allow infinite or uncapped self-correction attempts under any failure mode.
- MUST preserve full diagnostic context in the payload passed to {{human_in_the_loop_thresholds}}.
- Rollback recommendations MUST specify explicit scratchpad reset operations.
- Critic prompt recommendations must provide concrete rubric statements.
Output format
- Failure Loop Vulnerability Map (categorized inventory of non-converging retry loops and triggers)
- Critic Agent Evaluation & Bias Audit (line-by-line critique of {{critic_agent_prompt}} weaknesses)
- Recovery State Machine Specification (diagrammed or pseudocode logic for state rollback and fallback tools)
- Hardened Escalation Criteria (precise conditions for triggering human intervention)
- Revised Self-Correction System Prompts (production-ready instructions for fault recovery)
Self-review
- Does the analysis address all fatal error classes present in {{runtime_exception_telemetry}}?
- Are fallback strategies defined for when the critic agent itself encounters an exception?
- Do escalation rules prevent human operators from receiving unvetted or context-stripped alert payloads?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.