Agent Introspection Debugging
Implements a structured self-debugging workflow to identify and resolve AI agent failures like loops, tool errors, and context drift.
This skill provides a systematic framework for Claude to debug its own execution failures when it encounters repetitive loops, maximum tool call limits, or degrading output quality. By following a rigorous four-phase process—Capture, Diagnosis, Recovery, and Introspection—it prevents endless token consumption and helps the agent recover from environment mismatches or logic errors without constant human intervention. It is an essential tool for maintaining the reliability of autonomous tasks where the agent might otherwise lose focus or get stuck in a retry storm.
Key Features
01Four-phase structured debugging loop: Capture, Diagnosis, Recovery, and Introspection
02Safety-first contained recovery actions to minimize environment disruption
03Heuristic-based intervention to stop redundant retries and restate objectives
040 GitHub stars
05Root-cause analysis for common agent failure patterns like loop-limits and context overflow
06Detailed introspection reporting for human-readable audit trails and post-mortems
Use Cases
01Resolving infinite loops where an agent repeats the same tool call without forward progress
02Managing context drift and token pressure when long-running sessions begin to degrade in quality
03Debugging file-system or environment state mismatches during autonomous development tasks