Agent Self-Debugging Workflow

•
5
•

Implements a structured four-phase introspection workflow to diagnose and resolve AI agent loops, drift, and execution failures.

The Agent Introspection Debugging skill provides a systematic approach for Claude to debug its own execution failures before escalating to a human. When an agent gets stuck in a tool loop, consumes excessive tokens without progress, or drifts from its primary task, this workflow guides it through failure capture, root-cause diagnosis, and contained recovery actions. By prioritizing evidence-based checks over blind retries, it produces detailed introspection reports that document the failure state, ensuring that even if a task requires human intervention, the reasoning and environment state are clearly documented for faster resolution.

主な機能

01Four-phase debugging loop: Capture, Diagnose, Recover, and Report
02Evidence-based diagnostics using real-world state checks (ls, git status, cat)
03Pattern matching for common AI failures like tool loops and context overflow
04Standardized introspection reports for human-legible handoffs
05Context management to trim low-signal data and prevent reasoning degradation
065 GitHub stars

ユースケース

01Managing context growth and prompt drift during complex, multi-step coding tasks
02Diagnosing environment mismatches where the filesystem state differs from agent memory
03Breaking out of infinite tool-call loops or repetitive command execution