Skip to content
Back to skills

Agent Failure Introspection

ASecurity

Diagnose failed or unreliable agent workflows by classifying bad assumptions, missing observations, tool misuse, wrapper failures, hidden repair loops, incomplete validation, handoff gaps, and repeated failure patterns. Use after a failed harness run, flaky agent output, or confusing validation loop.

  • 3 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 12, 2026
tools

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add pax-k/pax-fullstack-harness --skill agent-failure-introspection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Failure Introspection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Failure Introspection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pax-k-agent-failure-introspection/badge)](https://www.skillsdirectory.com/skills/pax-k-agent-failure-introspection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-failure-introspection
description: Diagnose failed or unreliable agent workflows by classifying bad assumptions, missing observations, tool misuse, wrapper failures, hidden repair loops, incomplete validation, handoff gaps, and repeated failure patterns. Use after a failed harness run, flaky agent output, or confusing validation loop.
---

# Agent Failure Introspection

## Purpose

Turn an agent failure into evidence, a likely failure class, and the smallest durable fix to the harness or project workflow.

## Inspect First

- failing command output, browser logs, review findings, task plan, changed files, and validation evidence
- `PROGRESS.md`, `DECISIONS.md`, feature state, termination evidence, and sprint/task traces when present
- scripts or wrappers involved in the failure

## Procedure

1. Capture the failure.
   - Record expected behavior, actual behavior, commands run, files inspected, and the first observed failure.
   - Avoid rewriting history with post-hoc assumptions.

2. Classify the failure.
   - Run `scripts/diagnose_agent_failure.py <repo-or-report> --json` when available.
   - Check for missing inspection, wrong tool use, stale instructions, skipped validation, wrapper no-ops, hidden retries, unrecorded assumptions, weak handoff, or premature completion.
   - Use `$trajectory-risk-supervisor` when the failure is a repeated trajectory pattern, such as edit-before-inspection, repeated failures, or finalization without validation.

3. Decide the durable response.
   - Fix project code only when the root cause is project behavior.
   - Promote repeated process failures through `$review-feedback-promoter`.
   - Add missing evidence gates through `$pre-edit-investigation-gate`, `$termination-gatekeeper`, or `$skill-compliance-auditor`.

4. Write a concise report when useful.
   - Use `assets/templates/agent-failure-report.md.tmpl`.
   - Include reproduction, likely cause, evidence, and next validation commands.

## Validation

- Confirm diagnosis cites observed logs, files, or command output.
- Confirm the proposed fix maps to code, docs, tests, scripts, or skill guidance.
- Run the smallest command that proves the failure no longer reproduces, or record the blocker.

## Completion Criteria

- The failure is classified with evidence and a clear next action.
- Repeated failures are promoted into durable harness checks instead of handled as one-off memory.

Files in this skill

  • SKILL.md2.4 KB
  • agents/openai.yaml244 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.