Prompt Details
Model
Chat - (gpt-5.6)
Token size
2,622
Example input
[Describe the workflow / upload workflow definition]: Customer submits a support ticket. ↓ AI classifies the issue. ↓ AI retrieves customer/order information. ↓ AI determines whether the request qualifies for a refund. ↓ Low-risk cases are automatically processed. ↓ High-risk or ambiguous cases are sent to a support supervisor. ↓ Refund API is called when approved. ↓ Ticket is updated. ↓ Customer receives resolution message.
[Agents, functions, tools, APIs, external actions]: Classification Agent - Categorizes the support request. Customer Data Agent - Retrieves account and order information. Resolution Agent - Determines the recommended action. Refund Agent - Calls the refund service. Supervisor Handoff Agent - Escalates uncertain cases. Notification Agent - Sends the final response.
[Retries, timeouts, fallbacks, exception handling]: Customer database retry: UNKNOWN Order API retry: UNKNOWN Refund API retry: UNKNOWN Ticket update retry: UNKNOWN Notification retry: UNKNOWN Timeout behavior: UNKNOWN No unsupported retry behavior is assumed.
[Approval, escalation, manual intervention]: Supervisor review is required when: Refund eligibility is unclear Customer information conflicts Refund amount exceeds the automatic approval threshold Fraud or abuse indicators are detected AI confidence is insufficient
[SLA, idempotency, recovery, business impact, output requirements]: A customer must not receive two refunds for one eligible transaction. Refund decisions must be traceable. Customer data must not be incorrectly associated with another order. Ambiguous cases must not be automatically refunded. Ticket status must accurately reflect the actual refund state. Failed actions must be recoverable without creating duplicate financial actions.
Example output
PHASE 1 — WORKFLOW RECONSTRUCTION
Workflow Map
Trigger
Customer Support Ticket
↓
Processing
AI Classification
↓
Customer & Order Lookup
↓
Decision
Refund Eligible?
↓
Low Risk
Automatic Refund
↓
High Risk / Ambiguous
Supervisor Review
↓
External Action
Refund API
↓
State Update
Ticket Updated
↓
Output
Customer Notification
---
Failure Boundaries
1. Ticket ingestion
2. AI classification
3. Customer lookup
4. Order lookup
5. Eligibility decision
6. Supervisor handoff
7. Refund API
8. Ticket update
9. Customer notification
---
PHASE 2 — FAILURE POINT DISCOVERY
Failure Point Component Failure Mode Impact Detection
Ticket ingestion Ticketing System Event not received Request never processed UNKNOWN
Classification AI Agent Wrong category Incorrect workflow branch Classification validation
Customer lookup Database Failure Customer data unavailable API error
Order lookup Order API Wrong/invalid response Wrong refund decision Response validation
Eligibility Resolution Agent Incorrect decision Incorrect refund Business-rule validation
Supervisor Human Handoff No response Ticket stuck Escalation timeout
Refund Refund API Timeout Refund state unknown Timeout
Ticket update Ticket API Update failure Incorrect ticket state API response
Notification Notification API Delivery failure Customer not informed Delivery status
---
PHASE 3 — API & DEPENDENCY FAILURE AUDIT
Customer Database
Failure: Temporary database outage
Classification:
RETRYABLE
Reason:
The requested read operation does not create an external financial side effect.
---
Failure: Customer ID does not exist
Classification:
NON-RETRYABLE
Retrying the same invalid identifier is unlikely to resolve the problem.
Recommended action:
ESCALATE / REQUEST VERIFICATION
---
Order Management API
Failure: Rate Limit
Classification:
RETRYABLE
A controlled retry with backoff may be appropriate.
Failure: Authentication Failure
Classification:
NON-RETRYABLE
Repeatedly sending the same unauthorized request is not a recovery strategy.
Recommended:
ESCALATE
Failure: Invalid Order Response
Classification:
UNKNOWN
The workflow does not specify whether malformed responses are retried, rejected, or escalated.
---
Refund API
Failure: Timeout
Classification:
UNKNOWN
This is particularly dangerous because the refund may have succeeded even though the automation did not receive the response.
Failure: Explicit "Insufficient Funds"
Classification:
NON-RETRYABLE
Retrying immediately is unlikely to solve the underlying problem.
Failure: Rate Limit
Classification:
RETRYABLE
Controlled retry may be appropriate.
---
PHASE 4 — RETRY & TIMEOUT AUDIT
Critical Finding
The workflow does not define refund timeout behavior.
Example
Automation sends:
Refund $80
Refund service processes the transaction.
Network connection fails before the response reaches the automation.
The automation sees:
TIMEOUT
But the actual state could be:
Refund completed
If the workflow blindly retries:
Second refund request
This could produce a duplicate refund.
Classification
CRITICAL
---
Retry Findings
Missing Retry
Customer database retry: UNKNOWN
Order API retry: UNKNOWN
Ticket update retry: UNKNOWN
Wrong Retry Risk
Refund API after ambiguous timeout
Timeout Gap
Refund transaction status after timeout
Infinite Retry
UNKNOWN
No infinite retry behavior is specified.
Backoff
UNKNOWN
Jitter
UNKNOWN
---
PHASE 5 — DUPLICATE EXECUTION & IDEMPOTENCY
Duplicate Scenario 1: Ticket Event Redelivery
The same ticket event is delivered twice.
Possible result:
Refund workflow executes twice.
Duplicate risk:
HIGH
---
Duplicate Scenario 2: Worker Restart
Workflow reaches the refund step.
Worker crashes.
Workflow restarts.
The refund request may execute again.
Duplicate risk:
CRITICAL
---
Duplicate Scenario 3: Refund Timeout
Refund succeeds but response is lost.
Automation retries.
Duplicate refund may occur.
Duplicate risk:
CRITICAL
---
Operation Classification
Operation Idempotency
Customer Lookup IDEMPOTENT
Order Lookup IDEMPOTENT
Ticket Classification IDEMPOTENT
Ticket Update PARTIALLY IDEMPOTENT
Refund Request UNKNOWN
Notification UNKNOWN
---
Recommended Safeguards
For the refund operation:
Use a unique refund idempotency key.
Associate the key with the original ticket/order.
Check existing refund status before retrying.
Persist the refund transaction ID.
Prevent another refund when an existing successful refund is detected.
These controls are recommendations, not capabilities currently demonstrated by the workflow.
---
PHASE 6 — PARTIAL FAILURE & STATE CONSISTENCY
Scenario
Refund succeeds.
Ticket update fails.
Completed Actions
Refund processed
Failed Action
Ticket status update
Persisted External State
Payment/refund system
Potential Internal State
Ticket still appears unresolved
Inconsistency
Customer has received money back, but support system may show:
Refund Pending
---
Recommended Recovery
RESUME
1. Query refund status.
2. Verify transaction ID.
3. Confirm refund completion.
4. Update ticket.
5. Record audit event.
6. Send notification only if it has not already been sent.
---
PHASE 7 — HUMAN HANDOFF AUDIT
Required Handoff
Scenario
Refund API returns an ambiguous response.
The system cannot determine whether the refund succeeded.
Recommended:
ESCALATE
---
Handoff Context Must Include
Ticket ID
Customer ID
Order ID
Refund amount
Request timestamp
Refund request ID
API response
Error/timeout information
Last known workflow state
---
Potential Handoff Failure
Supervisor does not respond.
Impact:
Ticket remains unresolved.
Recommended:
ESCALATE TO SECONDARY REVIEW
If no secondary path exists:
MISSING HANDOFF
---
PHASE 8 — FAILURE SCENARIO GENERATION
Scenario 1: Order API Outage
Trigger: Customer submits refund request.
Failure Point: Order API.
Impact: Eligibility cannot be verified.
Detection: API failure.
Immediate Action: Do not refund.
Recovery: Retry according to a controlled policy.
Validation: Confirm order information is retrieved correctly.
---
Scenario 2: Refund API Timeout
Trigger: Refund request sent.
Failure Point: Refund API/network.
Impact: Refund status unknown.
Detection: Timeout.
Immediate Action: STOP automatic retry.
Recovery: Query refund status.
Validation: Confirm transaction status before taking another financial action.
Priority: P0
---
Scenario 3: Duplicate Ticket Event
Trigger: Same ticket event arrives twice.
Failure Point: Workflow trigger.
Impact: Same refund workflow may execute twice.
Detection: Ticket/event identifier.
Immediate Action: Deduplicate.
Recovery: Resume original execution.
Validation: Only one refund transaction exists.
---
Scenario 4: Incorrect AI Classification
Trigger: Customer asks about a refund but AI classifies it as a general inquiry.
Failure Point: Classification Agent.
Impact: Refund workflow may not start.
Detection: Classification validation or customer correction.
Immediate Action: Reclassify.
Recovery: Route to correct workflow.
Validation: Correct intent is recorded.
---
Scenario 5: Supervisor Unavailable
Trigger: High-risk refund requires approval.
Failure Point: Human handoff.
Impact: Ticket remains pending.
Detection: Approval SLA.
Immediate Action: Escalate.
Recovery: Secondary supervisor.
Validation: Approval state is recorded.
---
Scenario 6: Notification Failure
Trigger: Refund completed.
Failure Point: Notification service.
Impact: Customer does not receive confirmation.
Detection: Delivery failure.
Immediate Action: Retry notification.
Recovery: Send notification after delivery service recovers.
Validation: Delivery confirmation.
---
PHASE 9 — FAILURE CONTAINMENT
Safe Stop
Use when:
Refund status is unknown
Customer identity cannot be verified
Order information conflicts
Refund amount cannot be established
---
Circuit Breaker
Recommended for repeated refund API failures.
Purpose:
Prevent the automation from continuously sending requests to an unhealthy dependency.
---
Dead-Letter Queue
Recommended for:
Failed ticket updates
Events that cannot be processed
Repeated non-resolvable integration failures
---
Containment Gaps
CRITICAL
No demonstrated refund idempotency mechanism.
No demonstrated timeout reconciliation.
No demonstrated duplicate-event protection.
UNKNOWN
Circuit breaker behavior.
Dead-letter queue.
Maximum retry duration.
---
PHASE 10 — RECOVERY STRATEGY
Failure Recommended Recovery Reason
Database timeout RETRY Read operation
Invalid customer ID ESCALATE Input cannot be fixed by retry
Order API rate limit RETRY Temporary dependency limitation
AI ambiguity ESCALATE Prevent incorrect financial action
Refund timeout RESUME / VERIFY Refund may already exist
Duplicate event DEDUPLICATE Prevent duplicate execution
Ticket update failure RESUME External refund should not be reversed
Notification failure RETRY Notification is recoverable
---
PHASE 11 — RECOVERY VALIDATION
Test 1: Refund Timeout
Test: Simulate timeout immediately after refund request.
Expected Behavior: Workflow must not blindly submit another refund.
Evidence: Refund transaction lookup and resulting state.
Pass Criteria: Exactly one refund exists.
---
Test 2: Duplicate Ticket Event
Test: Send the same ticket event twice.
Expected Behavior: Only one workflow execution creates a financial action.
Evidence: Workflow execution records and refund transactions.
Pass Criteria: One refund maximum.
---
Test 3: Order API Outage
Test: Make order API unavailable.
Expected Behavior: No refund is issued without validated order information.
Evidence: Workflow state.
Pass Criteria: Workflow stops or retries safely.
---
Test 4: Partial Completion
Test: Allow refund to succeed and force ticket update to fail.
Expected Behavior: Workflow later reconciles the refund and updates the ticket.
Evidence: Refund transaction and ticket history.
Pass Criteria: Ticket eventually reflects the actual refund state.
---
Test 5: Human Handoff
Test: Create an ambiguous refund case.
Expected Behavior: Automatic refund is blocked.
Evidence: Escalation record.
Pass Criteria: Supervisor receives sufficient context and the workflow resumes correctly after approval.
---
PHASE 12 — FAILURE RISK SCORING
Failure Likelihood Impact Detectability Recovery Difficulty Business Criticality Classification
Duplicate Refund UNKNOWN Very High Medium High Very High CRITICAL
Refund Timeout UNKNOWN Very High Low/Medium High Very High CRITICAL
Wrong Customer Data UNKNOWN High Medium High High CRITICAL
Order API Outage UNKNOWN Medium High Medium Medium HIGH
Ticket Update Failure UNKNOWN Medium High Low/Medium Medium MEDIUM
Supervisor Unavailable UNKNOWN Medium High Medium Medium MEDIUM
Notification Failure UNKNOWN Low High Low Low LOW
No numerical probabilities are assigned because the workflow provides no production failure statistics.
---
PHASE 13 — FAILURE PRIORITIZATION
P0 - Critical Recovery Gap
1. Refund timeout ambiguity
2. Duplicate refund protection
3. Customer/order identity verification
P1 - High Risk
1. Order API failure recovery
2. Partial refund/ticket state inconsistency
3. Missing demonstrated reconciliation
P2 - Medium Risk
1. Supervisor availability
2. Ticket update failures
P3 - Low Risk
1. Notification delivery failures
---
PHASE 14 — REMEDIATION PLAN
MUST FIX
Problem: Duplicate Refund
Root Cause: Refund operation's idempotency behavior is UNKNOWN.
Evidence: Workflow does not specify an idempotency key or duplicate transaction check.
Recommended Fix: Create a unique refund request key based on the ticket/order/refund transaction context and verify existing refund status before retrying.
Recovery Strategy: Verify existing transaction before any retry.
Owner: Payments/Integration Team
Priority: P0
Validation: Execute the same refund request multiple times.
Expected Outcome: Only one refund is created.
---
Problem: Refund Timeout
Root Cause: The workflow does not define what happens when the refund request times out.
Evidence: Timeout behavior is UNKNOWN.
Recommended Fix: Introduce transaction-status reconciliation before retrying.
Recovery Strategy: RESUME / VERIFY
Owner: Payments Integration Team
Priority: P0
Validation: Simulate successful refund followed by lost API response.
Expected Outcome: System discovers the existing refund instead of creating another one.
---
Problem: Incorrect Customer Association
Root Cause: Workflow depends on customer and order lookups, but validation behavior is not fully specified.
Recommended Fix: Require customer ID + order ID consistency checks before financial action.
Recovery Strategy: SAFE STOP / ESCALATE
Owner: Support Automation Team
Priority: P0
Validation: Provide mismatched customer/order information.
Expected Outcome: Refund is blocked.
---
SHOULD FIX
Add explicit retry policies.
Add controlled exponential backoff.
Add dead-letter handling.
Add reconciliation for incomplete ticket updates.
Define human escalation timeout.
Persist complete execution state.
OPTIMIZATION
Improve AI classification confidence thresholds.
Improve notification retry handling.
Add operational dashboards.
---
PHASE 15 — FAILURE & RECOVERY MATRIX
Failure Scenario Impact Detection Recovery Duplicate Risk Human Handoff Priority
Customer DB Timeout Processing delay API error Retry Low No P2
Order API Outage Refund blocked API error Retry/Resume Low Possible P1
Wrong Customer Data Incorrect refund Validation Abort/Escalate High Yes P0
AI Classification Error Wrong workflow Validation Reclassify Medium Possible P1
Refund Timeout Unknown financial state Timeout Verify transaction Critical Yes P0
Duplicate Ticket Event Duplicate execution Event ID Deduplicate High No P0
Refund API Rate Limit Delay API response Backoff/Retry Medium No P1
Ticket Update Failure State inconsistency API error Resume/Reconcile Low No P1
Supervisor Unavailable Workflow stuck SLA Escalate Low Yes P2
Notification Failure Customer uninformed Delivery status Retry Low No P3
---
PHASE 16 — FINAL FAILURE & RECOVERY REPORT
1. Executive Summary
The automation can safely automate low-risk customer support cases in principle, but the provided workflow has critical evidence gaps around financial refund execution.
The most dangerous scenario is a refund request that succeeds externally while the automation receives a timeout.
---
2. Workflow Architecture
Customer Ticket
→ AI Classification
→ Customer/Order Lookup
→ Refund Eligibility
→ Automatic Approval OR Human Approval
→ Refund API
→ Ticket Update
→ Customer Notification
---
3. Failure Point Map
Major failure boundaries exist at:
AI classification
Customer lookup
Order lookup
Human approval
Refund API
Ticket update
Notification
---
4. API & Dependency Risks
The Refund API is the highest-risk dependency because it produces a financial side effect.
---
5. Retry & Timeout Audit
The biggest gap is the absence of defined behavior for a refund timeout.
Blind retry is unsafe.
---
6. Duplicate & Idempotency Analysis
Duplicate execution can occur through:
Duplicate ticket events
Worker restarts
API timeouts
Workflow resubmission
Refund idempotency is currently:
UNKNOWN
---
7. Partial Failure & State Consistency
A refund can succeed while the ticket update fails.
This can create:
Actual State: Refund completed
System State: Refund pending
A reconciliation mechanism is therefore important.
---
8. Human Handoff Audit
Human review is appropriate for:
Ambiguous eligibility
Conflicting customer/order information
High-value refunds
Fraud indicators
Unknown refund status
The workflow needs a defined escalation path when the supervisor is unavailable.
---
9. Failure Scenarios
Highest-risk scenarios:
1. Refund timeout
2. Duplicate refund request
3. Incorrect customer/order association
4. Duplicate ticket event
5. Partial refund + ticket update failure
---
10. Containment Strategy
Recommended controls:
Safe stop
Idempotency
Duplicate detection
Transaction reconciliation
Controlled retries
Circuit breaker
Dead-letter handling
Human escalation
---
11. Recovery Strategy
The workflow should prefer:
VERIFY → RESUME → RECONCILE
over:
TIMEOUT → BLIND RETRY
for financial operations.
---
12. Recovery Validation Plan
Mandatory tests:
Refund timeout
Duplicate execution
API outage
Rate limiting
Partial completion
Incorrect customer/order data
Human escalation
Worker restart
---
13. Failure Risk Register
P0
Duplicate refund
Unknown refund status
Incorrect customer/order association
P1
Order API failure
Ticket/refund state inconsistency
AI classification error
P2
Human approval delay
Ticket update failure
P3
Notification failure
---
14. Priority Remediation Plan
The first engineering priority should be:
1. Refund idempotency
2. Refund transaction reconciliation
3. Duplicate event protection
4. Customer/order consistency validation
5. Partial-state recovery
---
15. Failure & Recovery Matrix
The matrix above identifies the principal failure modes, their detection mechanisms, recovery strategies, duplicate risks, and priorities.
---
16. Final Reliability Assessment
PARTIALLY RESILIENT
Why?
The workflow contains appropriate human intervention points and has a logical sequence for handling customer requests. However, the evidence provided does not demonstrate safe recovery for the most dangerous operation: issuing a refund.
The biggest unresolved question is:
"If the refund API times out after actually processing the refund, how does the system know whether to retry?"
Until that behavior is explicitly implemented and recovery-tested, the workflow should not be considered fully resilient for automated financial actions.
By purchasing this prompt, you agree to our terms of service
GPT-5.6
AI automation workflows can silently fail, retry endlessly, execute actions twice, lose context, or get stuck when APIs, tools, or human handoffs break.
This prompt helps audit automation workflows, identify failure points, analyze API/retry/timeout and duplicate-execution risks, and create practical failure scenarios and recovery strategies.
🔍 Identify workflow failure points
🔌 Analyze API & dependency failures
🔄 Audit retries, timeouts & duplicate execution
🤝 Detect human handoff &
...more
Added over 1 month ago
