diagnose-failed-run

diagnose-failed-run is a skill for Claude Code, Codex from adrianco/retort. It costs 109 tokens per session (1,768 once invoked), scanned A, original, Apache-2.0.

A failure-investigation workflow for Retort runs, where Retort evaluates generated projects with automated tests and scoring gates.

In plain words
What is it for?
Running tests, inspecting workspaces and agent logs, and classifying failures as infrastructure false-fails, model misses, or environment problems.
Why use it?
A failed gate only shows that scoring tests did not run or pass; this workflow checks direct evidence before deciding whether the code, environment, or test setup caused the failure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions OpenCode.

Good fit Running tests, inspecting workspaces and agent logs, and classifying failures as infrastructure false-fails, model misses, or environment problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adrianco/retort/diagnose-failed-run
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add adrianco/retort --skill diagnose-failed-run
Clone the repo
git clone --depth 1 https://github.com/adrianco/retort

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnose-failed-run

README.md
[![agentmods](https://agentmods.dev/badge/skills/adrianco/retort/diagnose-failed-run/github.svg)](https://agentmods.dev/skills/adrianco/retort/diagnose-failed-run)
Your own site
<a href="https://agentmods.dev/skills/adrianco/retort/diagnose-failed-run"><img src="https://agentmods.dev/badge/skills/adrianco/retort/diagnose-failed-run/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnose-failed-run

Your own site · 80×15
<a href="https://agentmods.dev/skills/adrianco/retort/diagnose-failed-run"><img src="https://agentmods.dev/badge/skills/adrianco/retort/diagnose-failed-run.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,768 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.01768
Opus 5 $0.00055 $0.00884
Sonnet 5 $0.00022 $0.00354
Haiku 4.5 $0.00011 $0.00177

Measured 9d ago against content hash 20016484ed1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

diagnose-failed-run scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/diagnose-failed-run/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diagnose a Failed Retort Run

Overview

A run failing the mechanical gate (test_coverage=0 → all metrics zeroed → status=failed) says only that the tests didn't run/pass under the scorernot that the model produced bad code. Historically most "failures" in this repo were harness/measurement artifacts, not model defects. This skill is the judgment layer on top of retort diagnose: it establishes the real cause with direct evidence before anyone attributes, reports, or gates on it.

It exists because we repeatedly drew wrong conclusions by inferring from a signature ("flaky", "concurrency", a wrong env var, a wrong tool-permission fix) that end-to-end checks later overturned. The cost of guessing here is hours and bad decisions.

Cardinal rules

  1. Ground-truth before concluding. Run the tests yourself, inspect the workspace, read the agent logs. Never attribute a cause from the gate verdict, a duration, or a single log line alone.
  2. Label every claim [DIRECT] (observed: command output, file state, a reproduced result) vs [HYPOTHESIS] (inferred, not yet tested). Don't ship a hypothesis as a cause. If a cause is unconfirmed, say so and name the experiment that would confirm it.
  3. Read the DB and the agent logs. The recorded scores/session show which tool or step failed; the agent stderr shows why (the permission type, the error). You usually need both — e.g. the session said "read rejected", but only --print-logs stderr revealed the real permission was external_directory.
  4. Verify any fix end-to-end (through the harness), not just CLI/unit. A fix that passes a CLI probe can still fail in the runner (a wrong env var passed both).

Inputs in each runs/<cell>/repN/

File Use
TASK.md What the agent was asked to build
stack.json language / agent / model / tooling for this cell
scores.json recorded metrics (all 0 ⇒ gate-failed)
generated source what the agent actually produced — check it exists and where (subdirs/packages count)
_agent_stdout.log the agent's full --format json / --mode json event stream (tool calls + their status, errors, the final text)
_agent_stderr.log the agent's internal logs (permission evaluations, hangs, provider errors) — for opencode, requires --print-logs

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 115 lines · 109 tokens per session scan A 20016484ed1f

Subscribe to this mod's changes

diagnose-failed-run is a skill published in the GitHub repository adrianco/retort (203 stars, last pushed today), licensed Apache-2.0. It adds 109 tokens to every session and 1,768 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

4-phase root cause debugging: understand bugs before fixing.

NousResearch/hermes-agent · 16 tokens

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

davila7/claude-code-templates · 45 tokens

experimental-code-coverage-local-debugger

Runs code coverage locally via Universal Test Runner (UTR) or helper scripts, mimicking LUCI trybots. Activate when CQ tryjobs fail or underreport coverage, to test local GN/recipe repairs before uploading, or to debug hermetic crashes.

chromium/chromium · 59 tokens

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens