agent-introspection-debugging

Diagnose AI agent failure loops with a 4-phase self-debug workflow.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill agent-introspection-debugging-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-introspection-debugging
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/.agents/skills/agent-introspection-debugging
Command: npx skills add https://github.com/luongldptit/move-ticket --skill agent-introspection-debugging-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the frustration of AI agents getting stuck in unproductive failure loops, wasting tokens and time on repeated retries, context drift, or unrecoverable tool errors with no clear path to resolution.

Core Features & Use Cases

  • 4-Phase Self-Debug Workflow: Guides agents through structured failure capture, root-cause diagnosis, contained recovery, and introspection reporting to resolve issues systematically.
  • Common Failure Pattern Matching: Includes a curated lookup table for frequent agent failure scenarios (loop limits, context overflow, service timeouts, quota errors, file state mismatches) to speed up diagnosis.
  • Use Case: Activate this skill when an agent hits maximum tool call limits, drifts from its original task due to bloated context, or encounters recoverable tool or environment errors that block progress.

Quick Start

Activate the agent-introspection-debugging skill immediately when an agent run hits repeated tool failures, loop limits, or starts drifting from its original task to follow the structured self-debug workflow.

Frequently Asked Questions about agent-introspection-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop an AI agent from getting stuck in a tool retry loop?

Resolving AI agent failure loops requires a structured 4-phase self-debug workflow that captures the failure, diagnoses the root cause, executes contained recovery, and generates an introspection report to prevent unproductive tool retries.

What causes context drift in AI agent workflows and how do I fix it?

Context drift in AI agent workflows is caused by bloated context overflowing the reasoning window. Fix it by applying a structured self-debug workflow that performs root-cause diagnosis and contained recovery to realign the agent with its original task.

How do I debug an AI agent that hits maximum tool call limits?

Debug an AI agent hitting maximum tool call limits by activating a self-debugging skill that matches common failure patterns like loop limits and service timeouts, guiding the agent through failure capture and root-cause diagnosis to restore forward progress.

Can I automatically recover an AI agent from environment state mismatches?

You can automatically recover an AI agent from environment state mismatches using a structured introspection workflow that performs contained recovery, resolving recoverable tool errors and file state mismatches without immediate human escalation.

When should I use a structured self-debugging workflow for AI agents?

Use a structured self-debugging workflow for AI agents when runs hit repeated tool failures, encounter context overflow, reach maximum tool call limits, or experience recoverable tool errors that block forward progress and waste tokens.

What is the best way to diagnose AI agent failures without human escalation?

The best way to diagnose AI agent failures without human escalation is using a 4-phase introspection workflow that captures the failure, matches it against a curated lookup table of frequent failure scenarios, and executes contained recovery.