Systematically debug failing AI agents with capture, diagnosis, recovery, and reports.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "agent-introspection-debugging" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/agent-introspection-debugging/SKILL.md 2. Save it as ~/.claude/skills/agent-introspection-debugging/SKILL.md 3. Reload skills and tell me it's ready
Use the agent-introspection-debugging workflow to analyze this failed run: the agent keeps calling the same tool with no progress. Output in the order of failure capture, root-cause diagnosis, contained recovery, and debug report, and check whether the last N tool calls repeat or the goal has drifted.
A structured debugging result describing the loop pattern, likely causes, the smallest reversible recovery action, and a human-readable report.
Use agent-introspection-debugging to inspect the current agent run: the context keeps growing, output quality is degrading, and plans are repeating. First capture the failure state, then determine whether there are duplicated notes, oversized logs, or goal drift, and provide a recovery suggestion after reducing context.
A debug report with context-pressure analysis, problem classification, a compact recovery plan, and next-step recommendations.
Analyze this error with the agent-introspection-debugging workflow: after writing a file, the system says the file does not exist. Capture the error, verify cwd, branch, file path, and actual file state, determine whether it is a path issue, branch drift, or environment mismatch, and propose a contained recovery action.
A diagnosis focused on environment and file state, including minimal repair steps and a structured report.
Developers or researchers can use this skill when an agent keeps retrying without progress. It helps capture the failure state, identify the failure pattern, and decide whether to recover or escalate to a human.
When an agent's reasoning degrades because of repeated plans, oversized logs, or prompt drift, this skill helps inspect context pressure and propose smaller, more controlled recovery actions.
For issues like connection refusal, timeouts, quota exhaustion, or file-state mismatches, this skill supports structured diagnosis of service health, ports, paths, and environment assumptions before applying a contained fix.
The document describes a workflow skill for debugging failing AI agents. It is intended for repeated loops, retries without progress, context growth, prompt drift, environment mismatches, and some recoverable tool failures. It explains when to activate the skill, when not to use it, and outlines the debugging loop: first capture the failure state precisely, then diagnose root causes using common failure patterns before attempting contained recovery and producing a structured report.
Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.
This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.
Activate this skill for:
Do not use this skill as the primary source for:
verification-loopBefore trying to recover, record the failure precisely.
Capture:
Minimum capture template:
## Failure Capture
- Session / task:
- Goal in progress:
- Error:
- Last successful step:
- Last failed tool / command:
- Repeated pattern seen:
- Environment assumptions to verify:
Match the failure to a known pattern before changing anything.
| Pattern | Likely Cause | Check |
|---|---|---|
| Maximum tool calls / repeated same command | loop or no-exit observer path | inspect the last N tool calls for repetition |
| Context overflow / degraded reasoning | unbounded notes, repeated plans, oversized logs | inspect recent context for duplication and low-signal bulk |
ECONNREFUSED / timeout | service unavailable or wrong port | verify service health, URL, and port assumptions |
429 / quota exhaustion | retry storm or missing backoff | count repeated calls and inspect retry spacing |
| file missing after write / stale diff | race, wrong cwd, or branch drift | re-check path, cwd, git status, and actual file existence |
| tests still failing after “fix” | wrong hypothesis | isolate the exact failing test and re-derive the bug |
Diagnosis questions:
Recover with the smallest action that changes the diagnosis surface.
Safe recovery actions:
Do not claim unsupported auto-healing actions like “reset agent state” or “update harness config” unless you are actually doing them through real tools in the current environment.
Contained recovery checklist:
## Recovery Action
- Diagnosis chosen:
- Smallest action taken:
- Why this is safe:
- What evidence would prove the fix worked:
…
It is a structured self-debugging workflow for AI agent failures, not a hidden runtime. It focuses on capturing the failure, diagnosing root cause, applying contained recovery, and producing a human-readable debug report.
You should activate it for maximum tool-call or loop-limit failures, repeated retries with no progress, context growth or prompt drift, environment-state mismatches, and tool failures that may be recoverable.
It is mainly for diagnosing and recovering from agent-specific failures, not for feature verification after code changes. The document also notes that feature verification should use verification-loop, and narrower framework-specific debugging skills should be preferred when available.
Learn robust error-handling patterns across TypeScript, Python, and Go applications.
Manage carrier portfolios, negotiate freight rates, and evaluate carrier performance.
Design and implement robust F# unit, property, and integration tests
Apply test-driven development to Quarkus 3.x features, fixes, and refactors.
Generate images, videos, and audio with one unified AI media workflow.
Run a pre-release verification loop for Quarkus builds, tests, scans, and reviews.
Analyze AI agent traces to diagnose failures and recommend actionable improvements.
Generate metacognitive reflection prompts to inspect reasoning blind spots and quality.
Analyze JSONL debug logs to explain chat agent issues and behavior.
Validate AI agent behavior contracts and detect regressions through baseline comparisons.
Get deterministic safe next-step decisions after failed API or agent actions.
Profile AI agents locally to trace costs, behavior issues, and config fixes.