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 original task. This Skill gives the agent a systematic four-phase self-debugging workflow so failures are captured, diagnosed, and recovered before escalating to a human. ## Core Features & Use Cases - Failure Capture: Records error type, last tool calls, context pressure, and environment assumptions before any retry. - Root-Cause Diagnosis: Matches failures against known patterns such as tool-call loops, context overflow, connection refused, rate limits, and stale filesystem state. - Contained Recovery: Applies the smallest reversible corrective action, from restating the objective to shrinking the failing scope. - Introspection Report: Produces a structured human-readable report covering failure, root cause, recovery action, and follow-up. - Use Case: An agent hits its maximum tool-call limit while retrying the same failing command. Activate this Skill to capture the failure state, classify it as a loop pattern, verify actual filesystem state, and produce a debug report instead of blindly retrying. ## 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.