agent-introspection-debugging

Capture and diagnose looping agent runs with repeated tool failures.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Maelwalser/claude-config --skill agent-introspection-debugging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-introspection-debugging
Source: https://github.com/Maelwalser/claude-config/tree/main/skills/agent-introspection-debugging
Command: npx skills add https://github.com/Maelwalser/claude-config --skill agent-introspection-debugging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps capture and diagnose agent runs that loop, consume excessive tokens, or fail repeatedly by guiding a systematic four-phase self-debugging workflow: failure capture, root-cause diagnosis, contained recovery, and an introspection report.

Core Features & Use Cases

  • Failure Capture: Record error details, last meaningful tool calls, environment assumptions, and context pressure before retrying.
  • Root-Cause Diagnosis: Classify failures into common patterns (looping tool calls, context overflow, network/quota errors, stale filesystem state) and derive a minimal hypothesis.
  • Contained Recovery: Apply the smallest safe corrective action such as trimming context, isolating a failing command, re-checking environment state, or stopping retry storms.
  • Introspection Reporting: Produce a structured, human-readable debug report that documents the failure, diagnosis, recovery action, evidence, and follow-up.
  • Use Case: Recover an autonomous agent stuck in repeated tool calls or drifting from its goal by capturing state, running a discriminating check, and producing a clear handoff for human review.

Quick Start

Run the agent-introspection-debugging workflow to capture the failure state, diagnose the root cause, perform a minimal contained recovery, and produce an introspection report.

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 autonomous agent stuck in a tool call loop?

To stop an autonomous agent stuck in a tool call loop, you capture the failure state, diagnose the root cause, apply a minimal contained recovery action, and generate an introspection report for review.

What is the best way to diagnose repeated tool failures in agent workflows?

Diagnosing repeated tool failures in agent workflows involves classifying failures into common patterns like context overflow, network errors, or stale filesystem state, then deriving a minimal hypothesis from the captured execution context.

How do I recover an agent run that is consuming excessive tokens?

Recovering an agent run consuming excessive tokens requires applying a contained recovery action, such as trimming context, isolating a failing command, re-checking environment state, or stopping retry storms.

What is agent introspection and when do I need it for troubleshooting?

Agent introspection is a systematic self-debugging workflow capturing error details and environment assumptions before retries. You need it for troubleshooting autonomous agents experiencing context drift or repeated execution failures.

Do I need agent tool call logs to debug context drift?

Yes, you need access to agent tool call logs and execution context including files, current working directory, and branch to effectively debug context drift and run minimal diagnostic checks.

Why does my autonomous agent keep failing when retrying tool calls?

Your autonomous agent keeps failing during tool call retries due to context drift, environment mismatches, or stale filesystem state, requiring a systematic root-cause diagnosis to apply a safe corrective action.