agent-self-recovery
Original:🇺🇸 English
Translated
Detects when the agent is stuck in a loop and escapes systematically. Use when you notice repeated failures or loss of direction.
1installs
Added on
NPX Install
npx skill4agent add archieindian/openclaw-superpowers agent-self-recoveryTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Agent Self-Recovery
State file:
~/.openclaw/skill-state/agent-self-recovery/state.yamlSigns You're Stuck
- Tried the same approach 3+ times with the same result
- Making changes that feel random rather than targeted
- Lost track of the original goal
- Taking longer than expected on a 'simple' step
Recovery Protocol
Step 1: Stop
Stop making changes. No more quick tries.
Step 2: Write State
Write to the state file:
- : what were you trying to do?
what_trying - : append this latest approach to the list
what_tried - : name the pattern (see Step 3)
loop_type - : increment by 1
attempts status: recovering- : current timestamp (first time only)
started_at
Step 3: Name the Loop
Pick the :
loop_type- — trying the same fix with minor changes
same-fix-variations - — each fix reveals a new dependency
cascading-dependencies - — unclear what the actual error is
unclear-error - — lost track of original requirement
lost-goal
Step 4: Break the Loop
If → use systematic-debugging first.
If → re-read the original requirement.
If genuinely blocked → document clearly, ask the user. Update state .
If context too large → use context-window-management.
If truly lost → use task-handoff, ask user to redirect. Update state .
loop_type: unclear-errorloop_type: lost-goalstatus: escalatedstatus: escalatedStep 5: Resume with a New Approach
Choose a genuinely different approach. Update state , append to .
On success: update state .
last_approachwhat_triedstatus: recovered