cascade-fail-recovery
What it does
This skill tells the AI what to do when repeated data lookups, such as reading web pages or running searches, keep failing. It is for people whose AI tasks get stuck when online tools break.
When to use it
- ✓When a web page reading tool or search tool fails two or more times in a row.
- ✓When network errors keep the AI from getting the content it needs.
- ✓When I want the AI to finish the task instead of giving up after tool errors.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/cascade-fail-recovery/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My AI keeps failing to open web pages. Finish the report anyway, and tell me which parts came from its own knowledge.”
5 new skills a week. 1 minute to read.
How it works
After repeated failures, the AI restates the goal and writes the result from its built-in knowledge. It notes that external sources were unavailable.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Cascade Failure Recovery
Purpose
When multiple data retrieval tools (read_webpage, search_web) fail in succession, immediately fall back to generating content from embedded knowledge rather than attempting repairs or abandoning the task. This preserves task context and ensures completion.
When to Apply
Use this pattern when you observe:
- 2+ consecutive failures from data retrieval tools
- Network/access errors preventing web content retrieval
- Risk of task abandonment due to tool errors
Recovery Procedure
Step 1: Recognize Cascading Failure
Identify the failure pattern:
Iteration N: read_webpage failed - connection error
Iteration N+1: search_web failed - timeout/unavailable
Iteration N+2: [risk] Agent may abandon task or switch objectives
Step 2: Preserve Task Context
Before switching strategies, explicitly restate the original objective:
ORIGINAL OBJECTIVE: [Restate the core task goal]
CONTEXT PRESERVED: [Key requirements, constraints, deliverables]
Step 3: Invoke Fallback Strategy
Immediately switch to embedded knowledge generation:
- Acknowledge the limitation: Note that external data sources are unavailable
- Activate internal knowledge: Use pre-trained knowledge relevant to the task
- Generate content: Use write_file to create the deliverable from available knowledge
- Document the fallback: Note in the output what information could not be verified externally
Step 4: Execute write_file
Generate the required document:
# Fallback to generating from embedded knowledge
write_file(
path="output/document.md",
content="[Generate content from internal knowledge base]"
)
Example Application
Scenario: PACT Act veterans benefits document needed, but web access failing
Wrong approach (observed failure):
Iter 11: read_webpage failed - access error
Iter 12: search_web failed - unavailable
Iter 13: [ABANDONED] Switched to unrelated musician payroll task
Correct approach (with this skill):
Iter 11: read_webpage failed - access error
Iter 12: search_web failed - unavailable
Iter 13: CASCADE FAIL DETECTED - invoking fallback
Iter 14: write_file - generate PACT Act document from embedded knowledge
- Note: "External verification unavailable; content based on training knowledge"
Guidelines
- Threshold: Trigger fallback after 2 consecutive retrieval failures
- No endless retries: Do not attempt more than 1 repair/retry cycle
- Preserve objective: Never switch to unrelated tasks when tools fail
- Transparency: Clearly mark any content that lacks external verification
- Document limitations: Note what could not be verified due to tool failures
Related Skills
write-file-fallback: Generate documents when data sources unavailabletask-context-preservation: Maintain objective continuity through errors
FAQ
Will the answer use live information?
No, this fallback uses built-in knowledge, so newer or live facts may be missing.
Does the AI say it used a fallback?
Yes, the guide says to note the fallback in the output.
Is this the same as retrying?
No, the guide says to switch to built-in knowledge after repeated failures rather than keep trying repairs.
Details
Original description by the author
Handle cascading data retrieval tool failures by falling back to embedded knowledge generation
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #12843
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
agentpilot
7.8kHelps your agent improve a project step by step by preparing a task and running the AgentPilot loop that proposes, tests and scores changes.
openspace
7.8kHelps your agent set up OpenSpace, a tool that stores and fetches agent skills, and connect it to your AI app through MCP.
rsi-arena
7.8kHelps your agent set up and run standard AI benchmark tests, such as AIME and Terminal-Bench, to compare different improvement methods.
experiment-guide
7.8kHelps your agent plan small experiments, read their results and record findings while it investigates how to improve a program.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.