Agent Introspection & Debugging

0•

Implements a structured self-debugging workflow for AI agents to diagnose and recover from execution failures and loops.

This skill provides a systematic framework for AI agents to handle repetitive failures, token wastage, and logic drifting without immediate human intervention. By following a rigorous four-phase cycle—Capture, Diagnosis, Recovery, and Introspection—the agent learns to record error states precisely, identify specific failure patterns such as context overflow or environment mismatches, and apply minimal corrective actions. It acts as an internal governance layer that optimizes performance and minimizes cost by breaking unproductive tool-call loops and verifying environmental assumptions before escalating to a human developer.

Key Features

01Contained Recovery Heuristics: Prioritizes the smallest, safest actions to validate hypotheses.
020 GitHub stars
03Failure Pattern Recognition: Identifies loops, context overflow, and environment state mismatches.
04Four-Phase Debugging Loop: Systematically handles capture, diagnosis, recovery, and reporting.
05Token Burn Mitigation: Prevents expensive, unproductive retries and optimizes context usage.
06Standardized Introspection Reports: Generates human-readable summaries of agent failures and fixes.

Use Cases

01Diagnosing 'hallucinated' file paths or environment state mismatches.
02Recovering from context window saturation and degraded reasoning quality.
03Resolving infinite tool-call loops or maximum retry limit failures.