Sort Claude Code tool failures by cause and file the real bugs

A developer counted 3,450 failed tool calls in their Claude Code logs, had Claude Code sort the causes, and found 37 of 41 fixable findings were in their own hooks. Claude also filed the two real bugs on GitHub.

Done withClaude CodeinGitHub· Nov 20, 2026

What they did

Murooka, writing on dev.to (first published on Zenn), was tired of adding more lines to CLAUDE.md every time the same failure came back. They wrote a script that reads every Claude Code conversation record left on one Windows PC and lists each call that a hook stopped or that failed, grouped, with counts, dates and how often it was retried right away. Claude Code then went through that list one entry at a time, opened the original records, decided where each cause sat (the user's own hooks, settings, scripts and VS Code extension, or Claude Code itself), and proposed fixes limited to hooks, settings and scripts. It was told not to change anything until the author picked a fix. For the two causes it put on Claude Code, Claude wrote up reproduction steps and impact counts and posted them to GitHub.

How it went

A full run on 2026-11-14 gave 42 findings and 457 exclusions. Of the 41 still present four days later, 37 were in the author's own setup and 4 in Claude Code. The top failure, 854 "file has not been read yet" errors, mixed a Claude Code bug after resuming a subagent with subagents reading files via cat. The author reproduced both Claude Code bugs by hand; one became a new issue and the other a comment on an existing report, and both got repro labels. They shipped several fixes to their extension in a day. They have not measured whether failures dropped, or the miss rate.

Worth knowing

Counting cost about $0.12 and analysing 7 entries about $0.53 and 108 seconds; cost grows with the number of entries. Claude Code deletes conversation records after 30 days by default, and a hook that never fires leaves no trace, so absence in the logs is not a reason to remove one. The "wait for my choice" rule is only an instruction. The author published it as the transcript-failure-scan plugin.

Try it

With Claude Code· 2 parts to fill in

Read the Claude Code conversation records in [path to my transcripts folder]. List every tool call that was blocked by a hook or failed in two or more conversations, grouped by identical cause, with count, number of conversations, dates and how often it was retried right after. Then go through the list one entry at a time, open the original records, and decide whether the cause is in [my hooks, settings, scripts or extensions] or in Claude Code itself. Skip intended blocks and things already fixed. For each real finding, propose fixes only as changes to hooks, settings or scripts, with pros and cons. Do not edit anything or file any issue until I choose.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related