Agent Fail Spend — Development skill for Claude Code
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

**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
Related Skills
Agent Clinic
Diagnostic plugins for Claude Code and Codex: why a session went wrong, and whether a proposed change is too m
Verdict
End the cross-examination and render the verdict. PASSED only if every objection was resolved; otherwise FAILE
Negative Keyword Sweep
Find wasted spend in Google Ads search terms and add negatives at the right scope (account list, campaign, or
Google Ads Skills
A pack of 20 production-ready Claude Skills that help agencies, freelancers, and in-house performance marketer
Optimaizr
Spend fewer tokens on the same work. A local CLI that finds wasted tokens in Claude Code, Codex and your own A
Noise Budget
Cut wasted token spend without skipping real bugs. Distinguish IMPOSSIBLE work (tech-mismatch CVEs, encoded re
Related Agents
Media Planner
Media and channel planner. Use to split a budget across channels, phase a campaign, plan a launch calendar, or
Google Ads Manager
Runs Google Ads work end to end - audits, wasted spend, search terms, keywords, bids, budgets, structure, and
Budget Optimizer
Finds wasted spend and winners across platforms, then reallocates budget by ROAS, tunes bids, and kills losers