Agent Failure Triage via Wiki

VerifiedSafe

Query the failure wiki for known recoveries when an agent fails, and log new failure modes for self-improvement.

Sby Skills Guide Bot
Data & AIIntermediate
008/5/2026
Claude Code
#failure-recovery#memory-search#long-horizon#self-improvement#token-efficiency

Recommended for

Our review

Triage an agent failure during a long-horizon run by querying the failure wiki for a known recovery before spending new tokens.

Strengths

  • Reduces token waste by reusing known recoveries.
  • Builds a self-improving knowledge base of failure modes.
  • Cites the failure_id for auditability.
  • Prefers concrete, locally executable recovery actions.

Limitations

  • Depends on a well-populated failure wiki (cold-start problem).
  • The default match threshold (0.82) may discard relevant matches.
  • Only covers failures that have a known recovery pattern.
When to use it

When an agent hits a failure in a long-running task and wants to reuse past recovery knowledge instead of solving from scratch.

When not to use it

When the failure is novel or the wiki is empty, or when recovery would require a high-level plan change not supported by the wiki.

Security analysis

Safe
Quality score90/100

The skill only uses the 'memory_search' tool, which is a read-only internal query. No external commands, network calls, or file system operations are performed. Recovery actions are logical steps, not system commands. No risk of data exfiltration or destruction.

No concerns found

Examples

Recover from empty subgraph
The traversal returned an empty subgraph after step 3. Use the failure wiki to find a recovery action and apply it.
Break a traversal cycle
I'm stuck in a traversal cycle in a long-horizon run. Query the failure wiki for a known recovery and follow it.
Low-confidence match
The last retrieval had low confidence. Check the failure wiki for a recovery from a similar low-confidence event.

description: Triage an agent failure during a long-horizon run by querying the failure wiki for a known recovery before burning new tokens. allowed-tools: memory_search

Instructions

When the agent hits a failure during a long-horizon run (missing relation, ambiguous match, traversal cycle, low-confidence retrieval, empty subgraph, or unexpected result shape), do not attempt to solve it from scratch.

  1. Build a failure signature from the symptom plus the last three traversal steps. Keep it short and concrete.
  2. Query the failure wiki via memory_search using that signature. The wiki stores FailureMode, RecoveryAction, SolutionLog, and LintIssue nodes connected to past AgentQuery events.
  3. If a wiki record matches above the configured threshold (default 0.82), apply its recovery_action directly. Cite the matched failure_id in the response so the next agent can audit the chain.
  4. If no record matches, log a new FailureMode with confidence=0.4 and apply the default recovery for the symptom class. The lint pass will flag the new memory until a later run confirms the recovery is stable.
  5. Always record a SolutionLog entry tying the failure_id to the recovery action and the run outcome. That log is what feeds the self-improvement loop.

Prefer recovery actions that are concrete and locally executable: backtrack to a sibling, re-rank by relationship count, fall back to semantic search, maintain a visited set, rephrase with synonyms, or return the node's raw description. Avoid recovery actions that require changing the agent's plan unless the wiki has a high-confidence example that did so successfully.

Related skills