What problem does it solve? AI agent runs often fail by looping on the same tool calls, burning tokens without progress, or drifting from the intended task. This Skill provides a structured self-debugging workflow so the agent captures the failure, diagnoses the root cause, applies a minimal recovery, and reports the outcome instead of retrying blindly. ## Core Features & Use Cases - Four-Phase Debug Loop: Failure capture, root-cause diagnosis, contained recovery, and a structured introspection report. - Failure Pattern Table: Maps common symptoms like maximum tool calls, context overflow, ECONNREFUSED, 429 quota exhaustion, and stale file state to likely causes and checks. - Recovery Heuristics: Prioritizes restating the objective, verifying world state, shrinking scope, and running one discriminating check before retrying. - Use Case: When an agent hits a loop-limit failure after repeating the same command, use this Skill to record the failure state, classify the pattern, run one direct check, and produce a human-readable self-debug report. ## Quick Start Use the agent-introspection-debugging skill to diagnose why this agent run keeps looping on the same tool call and produce a recovery report.