baekenough/oh-my-customcode/stuck-recovery
Claude Code and agent skill by baekenough/oh-my-customcode
- community
Checking that the SKILL.md file is still in the repository.
Detect stuck loops and advise recovery strategies
Install
npx vskill@latest install baekenough/oh-my-customcode/stuck-recoverySKILL.md
The same SKILL.md was published earlier as baekenough/oh-my-customcode/stuck-recovery.
Stuck Recovery Skill
Detects when tasks are stuck in repetitive failure loops and advises recovery strategies. Advisory-only — the orchestrator decides the action (R010).
Detection Signals
| Signal | Pattern | Threshold | |
|---|---|---|---|
| Repeated error | Same error message appears 3+ times | 3 occurrences | |
| Edit loop | Same file edited 3+ times in sequence | 3 edits | |
| Agent retry | Same agent_type fails 3+ times consecutively | 3 failures | |
| Tool loop | Same tool called 5+ times with similar input | 5 calls |
Recovery Strategies
| Strategy | When | Action | |
|---|---|---|---|
| Fresh context | Repeated same error | Suggest rephrasing the task | |
| Model escalation | Agent retry loop | Trigger model-escalation advisory | |
| Alternative approach | Edit loop detected | Suggest different file/method | |
| Human intervention | All automated strategies exhausted | Ask user for guidance | |
| Context reset | Long-running task (>30min) or context >80% | Structured handoff: save state to memory, create fresh session with task summary |
Architecture
Advisory Format
Integration
- Complements model-escalation skill (escalation is one recovery strategy)
- Respects R010 (advisory only, orchestrator decides)
- Uses same PPID-scoped temp file pattern as other hooks
- Works with task-outcome-recorder.sh data when available
Context Reset Strategy
For long-running tasks (>30 minutes) or when context usage exceeds 80%, context reset is preferred over compaction:
- Save state: Write current progress, decisions, and open items to native auto-memory
- Create handoff: Generate structured task summary with:
- Completed steps and their outcomes
- Current step and its state
- Remaining steps
- Key decisions made and their rationale
- Reset: Start fresh session with handoff document as input
Context reset preserves decision quality by avoiding the information loss inherent in compaction. Based on Anthropic's finding that models experience "context anxiety" — prematurely concluding tasks due to perceived token limits.
When to Use
| Condition | Strategy | |
|---|---|---|
| Context < 60% | Continue normally | |
| Context 60-80% | Consider /compact | |
| Context > 80% OR duration > 30min | Context reset recommended | |
| Repeated compaction in same session | Context reset required |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/.claude/skills/stuck-recovery/SKILL.md
Popularity
- Repository stars
- 43
- Repository forks
- 7
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/baekenough/oh-my-customcode/stuck-recovery)