agent-introspection-debugging

Capture failure state, classify root causes, and generate recovery reports.

2|Updated Jul 1, 2026
One-click install
npx skills add https://github.com/CDO-07-New/TF4-AIO-03-foresight-lens-final --skill agent-introspection-debugging-cdo-07-new
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-introspection-debugging
Source: https://github.com/CDO-07-New/TF4-AIO-03-foresight-lens-final/tree/main/.agents/skills/agent-introspection-debugging
Command: npx skills add https://github.com/CDO-07-New/TF4-AIO-03-foresight-lens-final --skill agent-introspection-debugging-cdo-07-new

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps an AI agent stop repeating the same failure, understand what went wrong, and recover with a smaller, safer next step instead of wasting more context and tokens.

Core Features & Use Cases

  • Failure Capture: Records the error, the last successful action, the failed step, and the environment assumptions so the real problem is visible.
  • Root-Cause Diagnosis: Classifies common agent failure patterns such as loops, context drift, missing files, timeouts, and stale state.
  • Contained Recovery: Narrows the scope, verifies the actual world state, and chooses the smallest reversible corrective action.
  • Introspection Reporting: Produces a structured report that makes the failure, recovery, and follow-up clear for the next agent or human.
  • Use Case: An agent keeps retrying the same command during a tool loop, and this Skill helps it pause, diagnose the loop, and exit with a concise recovery plan.

Quick Start

Use the agent-introspection-debugging skill to capture the failure, identify the root cause, and produce a structured recovery report before trying again.

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 looping on the same failed tool call?

To stop an AI agent from looping on the same failed tool call, capture the failure state and classify the root cause to break the cycle. This skill diagnoses the loop pattern and guides a contained recovery using a smaller, reversible corrective action.

What is agent introspection and how does it help with debugging?

Agent introspection is the process of recording the error, last successful action, and environment assumptions to make the real problem visible. It helps debugging by classifying failure patterns like context drift and producing a structured recovery report.

How do I diagnose repeated AI agent failures and context drift?

You diagnose repeated AI agent failures and context drift by capturing the failed step and verifying the actual world state. This skill classifies the root cause and narrows the scope to choose the smallest corrective action for safe recovery.

When should I use a structured recovery process for agent failures?

You should use a structured recovery process for agent failures when encountering execution breakdowns like tool loops, repeated retries, or environment mismatches. It helps pause execution, diagnose the root cause, and exit with a concise recovery plan.

What is the best way to recover from AI agent execution breakdowns without wasting tokens?

The best way to recover from AI agent execution breakdowns without wasting tokens is to apply contained recovery. This method narrows the scope, verifies the actual world state, and executes the smallest reversible corrective action instead of blind retries.