Agent Introspection
Breaks infinite loops and diagnoses recurring failures through systematic self-analysis and recovery procedures.
Agent Introspection is a specialized reliability skill for Claude Code designed to prevent the 'hallucination loop' where an AI agent repeats failing commands. It provides a structured framework for self-diagnosis that triggers automatically after three consecutive failures or when context usage becomes critical. By classifying errors into specific patterns—such as environment drift, context overflow, or tool mismatch—the skill enforces a 'smallest safe action' recovery strategy. This ensures the agent pivots to new strategies rather than repeating unsuccessful attempts while logging every failure to persistent memory for long-term improvement.