capture-failure

capture-failure is a skill for Claude Code, Codex from jiangkoumo/agenttape. It costs 50 tokens per session (517 once invoked), scanned A, original, MIT.

A workflow for turning a recorded Codex tool failure into reviewed evidence and an offline regression test. AgentTape is a record of supported local tool events.

In plain words
What is it for?
Use it to inspect a captured failed run, change a supported failure condition such as a timeout or malformed JSON, and save a test for CI.
Why use it?
It helps preserve a real failure and check that it stays fixed without making new model or live-tool calls during the test setup.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

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.

agentmods
npx agentmods add skills/jiangkoumo/agenttape/capture-failure
Any agent
npx skills add jiangkoumo/agenttape --skill capture-failure
Clone the repo
git clone --depth 1 https://github.com/jiangkoumo/agenttape

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 capture-failure

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiangkoumo/agenttape/capture-failure.svg)](https://agentmods.dev/skills/jiangkoumo/agenttape/capture-failure)
Your own site
<a href="https://agentmods.dev/skills/jiangkoumo/agenttape/capture-failure"><img src="https://agentmods.dev/badge/skills/jiangkoumo/agenttape/capture-failure.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00050 $0.00517
Opus 5 $0.00025 $0.00259
Sonnet 5 $0.00010 $0.00103
Haiku 4.5 $0.00005 $0.00052

Measured 6d ago against content hash 2899f9feb3b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

capture-failure 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 6d 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.

plugins/agenttape/skills/capture-failure/SKILL.md · 27 lines

How it starts

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

Capture a Codex failure with AgentTape

AgentTape hooks record supported local Codex tool events into the current project's .agent-tape/ directory after the plugin hooks have been reviewed and trusted.

Workflow

  1. Use list_tapes to find captures in the active project. If none exists, explain that recording starts in a new Codex task after the plugin and its hooks are trusted. Do not invent a run.
  2. Use inspect_tape on the latest failed capture. Report the first explicit failure, redaction status, replay confidence, and recorded coverage limitations before proposing a fork.
  3. Choose one supported condition to change: permission_denied, timeout, rate_limited, malformed_json, or truncated_response. Use fork_run at a recorded boundary and confirm that it made zero model calls and zero live tool calls.
  4. Ask for confirmation only if the intended assertion or injection is materially ambiguous. Otherwise use save_regression with at least one meaningful assertion and a descriptive .tape filename. It writes under tests/agenttape/ and does not overwrite by default.
  5. Resolve ../../dist/agenttape-cli.mjs relative to this SKILL.md. From the user's project directory, run node <absolute-cli-path> test tests/agenttape so every saved regression executes exactly as CI will execute it. The bundled CLI is self-contained; do not invoke source scripts from an installed plugin cache.
  6. Report the saved relative path, assertions executed, pass/fail result, and the structural replay limitations.

If the user only wants the raw captured artifact, resolve the same bundled CLI and run node <absolute-cli-path> export latest --output <path> instead of creating a structural regression.

Boundaries

  • Treat the tape as redacted structural evidence, not bit-exact replay.
  • Never claim that hosted tools were captured. Phase 1 covers tool paths delivered through Codex local hooks.
  • Never include .agent-tape/runtime/ in a commit. Commit only reviewed artifacts under tests/agenttape/.
  • Do not modify the captured tape by hand. Re-run or export it again if the source evidence changes.

Read the full file on GitHub · 27 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. 6d ago First seen · 27 lines · 50 tokens per session scan A 2899f9feb3b7

Subscribe to this mod's changes

capture-failure is a skill published in the GitHub repository jiangkoumo/agenttape (1 stars, last pushed 7d ago), licensed MIT. It adds 50 tokens to every session and 517 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

test-flakiness

Detect non-deterministic (flaky) tests by reading CI run logs or test result history. Aggregates pass rates per test, identifies intermittent failures, recommends quarantine or fix, and maintains a flaky test registry. Best run during Polish phase or after multiple CI runs.

frabcd/codex-ai-game-studio · 59 tokens

evidence-first-debugging

Use when debugging a crash, lỗi, failing game, tool, build, service, script, or reproducible local code failure requires repro or reproduction, giả thuyết or ranked hypotheses, instrumentation, root-cause isolation, a minimal fix, regression proof, and a regression test.

hoatv2211/GameStudio-CodexKIT · 63 tokens

resilireplay

Capture a supported coding-agent tool failure as bounded, sanitized evidence and generate an executable deterministic regression. Use when a user asks to capture, explain, reproduce, or prevent recurrence of a Claude Code, Codex, Hermes, or MCP tool failure, or to validate a ResiliReplay adapter or campaign.

aliengineering-byte/resilireplay · 65 tokens

investigating-ci-failures

Investigates a specific CI failure to a verdict: whose fault, which commit, who wrote it, and whether it's fixed. Use for "who broke master", "why did this test fail in CI", "is this failure my PR's fault or everyone's", "is this test flaky or actually broken", "when did this failure start". Works from the…

PostHog/ai-plugin · 148 tokens

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