workflow-stuck-detect-reset
Skill1 starsChanged 6 months agoMITView on GitHub
Detect being stuck and recover with a clean-context reset instead of thrashing.
In this repository33 other files it gives its agents.
- skill-process-gotchasSkill
- workflow-cache-disciplineSkill
- workflow-codegraphSkill
- workflow-conductorSkill
- workflow-context-condenserSkill
- workflow-context-hygieneSkill
- workflow-criticSkill
- workflow-deadline-disciplineSkill
- workflow-deep-researchSkill
- workflow-done-definitionSkill
- workflow-edit-formatSkill
- workflow-effort-routingSkill
- workflow-escalateSkill
- workflow-execute-from-planSkill
- workflow-filesystem-offloadSkill
- workflow-learn-frameworkSkill
- workflow-long-running-processesSkill
- workflow-lspSkill
- workflow-memory-curationSkill
- workflow-plan-contractSkill
- workflow-plan-firstSkill
- workflow-planSkill
- workflow-quality-barSkill
- workflow-repomapSkill
- workflow-retrieve-before-actSkill
- workflow-spec-drivenSkill
- workflow-stuckSkill
- workflow-subagent-isolationSkill
- workflow-subtask-loopSkill
- workflow-task-finishSkill
- workflow-task-startSkill
- workflow-tool-selectionSkill
- workflow-verify-enhancedSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
When stuck, climb the RECOVERY LADDER in order — only go to the next rung if the current one doesn't unblock you.
- Distinctive: line 27
STOP: Do not make another edit. Write a STUCK SUMMARY: (a) the goal, (b) what is verifiably TRUE right now (what works, what files exist, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- TRIGGERS WHEN: Detect being stuck and recover with a clean-context reset instead of thrashing. -->When stuck, do NOT thrash in a polluted context. Summarize, reset, retry with fresh eyes.
Small-model failures are usually CONTEXT-POLLUTION failures: the context has filled with failed attempts, contradictory state, and dead ends, and the model can no longer find the thread. More turns in that context make it worse. The fix is a clean reset, not more attempts.
STUCK is detected TWO ways — use both:
- Across turns (Hermes-native): same error 3 times, 5+ turns with no verifiable progress, or
you cannot clearly state the current code state. The native
tool_loop_guardrailsalso trip here. - Within a turn (mcp-watchdog — the signals the turn-based guardrails can't see):
mcp_hermes_max_watchdog_check_spiral(recent_thinking_text=...)→spiral_detected(reasoning loop)mcp_hermes_max_watchdog_check_stall(...)→hung(a tool call silent past its budget)mcp_hermes_max_watchdog_check_progress(task_id, signals=...)→no_progress(deltas all zero)mcp_hermes_max_watchdog_check_budget(task_id, ...)→budget_exceededAny of these firing means STUCK — act on it the same as a native trip. (If the watchdog is down, the calls just fail; fall back to the across-turns signals — graceful degradation.)
When stuck, climb the RECOVERY LADDER in order — only go to the next rung if the current one doesn't unblock you. Don't skip to escalate, and don't thrash on one rung:
- STOP. Do not make another edit. Write a STUCK SUMMARY: (a) the goal, (b) what is verifiably TRUE right now (what works, what files exist, last green checkpoint), (c) exactly what is failing and the precise error, (d) the 2-3 approaches already tried that did NOT work.
- incremental-verify — re-run the verifier on the last-known-good scope to confirm what is actually green vs your assumption.
- checkpoint-revert —
mcp_hermes_max_checkpoint_revert_to_last_green()to land on known-good code (it stashes any dirty tree first, nothing is lost), thenmcp_hermes_max_checkpoint_restore_state(task_id)to bring back the PLAN + decision notes (so the reset is lossless — you reset CONTEXT, not your understanding of the goal). - replan — RESET CONTEXT: fresh attempt with ONLY the STUCK SUMMARY + reverted-clean code + restored PLAN.md. Drop the failed-attempt history — it's noise now.
- alternative-approach — try a DIFFERENT approach than the ones in the summary.
- decompose-further — if the subtask is too big to land green, split it smaller and retry the smallest piece.
- fresh-subagent — hand a clean, well-scoped restatement to an isolated sub-agent (no polluted context).
- escalate — a genuinely-hard, well-scoped subproblem →
mcp_hermes_max_escalation_escalate(if enabled); a missing DECISION or a repeated wall after reset → ping the human (Telegram) with the STUCK SUMMARY and wait. This is the "loop overnight then ping me" contract. - abort-clean — if even escalation can't proceed, stop on the last green checkpoint with the STUCK SUMMARY recorded. A clean stop beats a broken tree.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

