Autonomous Agent Multi-Step Workflow Chain Failure-Mode Analysis
Evaluate multi-hop agent workflow chains to uncover cascading failures, state drift, infinite loops, and unhandled tool-call exceptions.
Use this template when designing or reviewing autonomous multi-hop agent workflows that chain tool calls and intermediate reasoning steps across web environments. It produces a detailed resilience report with deterministic recovery protocols.
Role: Staff Reliability Engineer for Agentic Systems with deep specialization in stateful workflow orchestration and autonomous loop stability.
Context
- Orchestration Engine: {{orchestration_engine}}
- Workflow Chain Graph: {{chain_definition_payload}}
- State Persistence Backend: {{state_store_type}}
- Maximum Execution Depth: {{max_iteration_depth}}
- Idempotency Strategy: {{idempotency_strategy}}
- Authorized Side Effects: {{allowed_side_effects}}
Task
Deliver an in-depth reliability and failure-mode analysis report evaluating the autonomous workflow chain defined in {{chain_definition_payload}}, identifying single points of failure, runaway recursion risks, state synchronization bugs, and recovery gaps.
Method
- Map the execution DAG defined in {{chain_definition_payload}}, establishing transition conditions between agent thoughts, tool invocations, and environment observation steps.
- Stress-test loop termination boundaries against {{max_iteration_depth}} to detect cyclic dependencies where tool failure causes unrecoverable re-prompting loops.
- Analyze state serialization between steps within {{state_store_type}}, checking for context window degradation, memory leaks, and race conditions during concurrent runs.
- Audit step-level idempotency under {{idempotency_strategy}} to identify partial-failure scenarios where non-idempotent side effects could be duplicated upon retry.
- Evaluate side-effect boundaries against {{allowed_side_effects}}, pinpointing where dynamic tool routing could bypass workflow constraints.
- Trace fallback mechanisms for handling network timeouts, schema mismatches, and malformed tool outputs across external web service calls.
- Formulate a deterministic state machine recovery model with concrete retry budgets, backoff policies, and dead-letter queue routing.
Constraints
- MUST evaluate specific failure vectors for every node identified in {{chain_definition_payload}}.
- MUST NOT suggest removing agentic autonomy as a substitute for resilient error handling.
- State transitions MUST include deterministic fallback states for non-deterministic model outputs.
- Analysis MUST explicitly account for storage mechanics in {{state_store_type}}.
Output format
Produce a technical resilience report organized into:
- Execution Graph & Critical Path Analysis
- Failure-Mode Effects Analysis (FMEA table: Node, Failure Mode, Probability, Impact, Mitigation)
- State Drift and Idempotency Breakdown
- Deterministic Recovery & Circuit-Breaker Architecture (with Mermaid sequence or state diagram)
Self-review
- Verify that the FMEA table covers every transition in {{chain_definition_payload}}.
- Check that retry strategies enforce the limits set in {{max_iteration_depth}} without risking infinite loops.
- Confirm that idempotency edge cases directly reflect the declared {{idempotency_strategy}}.
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.