Mahgal

Agent Fail Spend — Development skill for Claude Code

Development community

How much of your coding-agent spend went to runs that failed.

How to install Agent Fail Spend

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Mahgal/agent-fail-spend and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Fail Spend does

How much of your coding-agent spend went to runs that failed? Split Claude Code transcript spend by run outcome — passed, failed, timeout, unknown — and show the dollars wasted. Inspired by Runta FrontierHarness v1.1 (64.5% of spend to non-passing runs).

Alternatives in Development

  • Timeout Fix — テスト実行のタイムアウト問題を分析し、テストの高速化または適切な分離を行います 974 ★
  • Tare — Diagnose Claude Code usage — where tokens went and why 256 ★
  • Citation Verifier — Round-trip every citation and quoted phrase in a legal output against the source document 72 ★

README

agent-fail-spend

![demo](demo.png)

**Your coding agent spent $3.24 on four sessions. $1.87 of it died on runs that never passed. This tool shows you that split, session by session, in 0.05 seconds.**

It reads your Claude Code session transcripts (or any generic JSONL run log) and reports spend by run outcome: passed, failed, timeout, unknown. The headline is the wasted share. On the bundled synthetic fixtures, 57.7% of known spend went to failed runs. Those fixtures are labelled test data, not real spend, and the figure exists to show what the report looks like, not what your bill says.

Why now

Runta published FrontierHarness Eval v1.1 on 2026-11-17, and it topped Hacker News on 2026-11-21. The study ran 27,280 coding-agent runs across 22 harnesses, 5 models, and 62 tasks, burning 83B tokens. Two findings matter here.

First, 64.5% of list-price cost went to trials that did not pass: 52.7% failures plus 11.8% timeouts. Second, 68–82% of failed runs ended with a confident final answer, not a timeout, and higher cost did not predict higher pass rates. The money is going somewhere, and the runs that eat it look finished when they fail.

Most developers only ever see one monthly total. That total hides the split. This tool makes the split visible, per session, from files already on your disk.

Source: [Runta — Introducing FrontierHarness Eval](https://runta.com/blog/introducing-frontierharness-eval)

Quick start (30 seconds)

git clone https://github.com/Mahgal/agent-fail-spend.git
cd agent-fail-spend
python3 agent_fail_spend.py --demo        # bundled synthetic fixtures

No pip installs, no dependencies, Python 3 only. Point it at your own transcripts:

python3 agent_fail_spend.py --dir ~/.claude/projects
python3 agent_fail_spend.py --file session.jsonl --json
python3 agent_fail_spend.py --dir ~/.claude/projects --prices examples/prices-example.json
python3 agent_fail_spend.py --format generic --file runs.jsonl

Verified from a clea