What problem does it solve?
Self-debug prevents wasted retries by helping an AI agent recognize looping or drifting, capture the exact failure state, diagnose the likely agent-level cause, and perform the smallest recovery step before escalating.
Core Features & Use Cases
- Loop and drift detection: Triggers when retries repeat 3+ times, token burn occurs, or context drifts away from the objective.
- Structured failure capture: Freezes task state with required fields like last successful step and repeated pattern observed.
- Pattern-based diagnosis + minimal recovery: Selects the most likely agent failure pattern, verifies world state, shrinks scope, runs one discriminating check, then reports outcome.
- User escalation guardrail: Avoids repeating the same recovery cycle and escalates with a Self-Debug Report when blocked after one cycle.
Quick Start
Use this skill when you notice the agent is looping by running /self-debug and generating a Self-Debug Report with capture, diagnosis, one minimal recovery action, and final escalation if still blocked.