| name | recover |
| description | Use when a session has gone wrong and you don't know why — the agent is spiraling, fixes aren't landing, output contradicts earlier work, or you're hours in and stuck. Use before trying yet another random fix. |
recover
Overview
When things break, the worst move is another guess. recover first diagnoses which failure mode you're in, then applies the response that mode actually needs — not the one that feels urgent.
The three failure modes
- Targeted bug — one specific thing is broken; the rest is sound.
- Polluted context — the conversation is full of contradictions, dead ends, and stale assumptions; the agent is now reasoning from garbage.
- Wrong assumption — a decision made earlier was wrong, and everything built on it is drifting.
Diagnose first
Ask, in order:
- Is the failure isolated and reproducible? → likely targeted bug.
- Has the agent contradicted itself, re-tried the same fix, or "forgotten" decisions? → likely polluted context.
- Does the trouble trace back to something decided earlier that no longer holds? → likely wrong assumption.
Response by mode
| Mode | Right response |
|---|
| Targeted bug | Trace root cause from the real error/state (don't guess). Fix the one thing. |
| Polluted context | Stop adding. remember save the real state, then /clear and restart from the memory file. More prompting only deepens the hole. |
| Wrong assumption | Go back to the decision. Revisit the plan / architecture, fix the assumption, then re-derive forward. Don't patch symptoms. |
Common mistakes
- Treating polluted context as a bug → you debug forever inside a poisoned thread. Reset instead.
- Treating a wrong assumption as a bug → you patch symptoms while the root decision keeps re-breaking things.
- Skipping diagnosis → that is the spiral. Name the mode before you act.