Claude Code writes one JSONL record per content block. A single assistant message
reappears several times, each copy carrying the same usage block and one
tool_use. This cluster holds 4,578 assistant records for 2,372 real model
requests, a ratio of 1.93. Two bugs in ~/.claude/skills/session-audit/analyze.py
followed from that, and both shipped into the published page:
analyze.py:60 summed usage once per record, inflating every token figure by about 2.4x.analyze.py:65 tested len(tools) > 1 per record. A split record cannot hold two
calls, so the batching rate was pinned at 0% by construction.Both are fixed. Re-run over the 30 most recent sessions the batching rate reads 12%.
checked The standing memory gate cites "0.0% across 359 turns" from
2026-07-19. Remeasured with the corrected method, those sessions hold up:
ed2c6a7c 1.6%, b3fb51a9 0.0%, add5d5c7 2.4%. Their records
barely split at all, at 1.00 to 1.02 records per tool turn, so the old script was accurate on them.
The split ratio rises to 1.93 in this cluster precisely because a message carrying
three parallel calls is written as three records. The bug therefore grew in step with the batching
it was measuring, and it reported 0% for a cluster that had improved to 13.3%.
| Published in revision 1 | Measured | Cause of the error |
|---|---|---|
| 4,661,686 output tokens | 1,947,086 | usage summed once per split record |
| 1,646,223,440 context tokens | 921,340,039 processed | same double count |
| context framed as paid spend | 108,508,947 base-equiv | 99.1% of input is cache read, priced at 0.1x |
| 493,513,569 context-bloat tax | 33,160,810 base-equiv | now threshold-relative and cache-priced |
| 83,757,498 spent sleeping | 8,564,895 base-equiv | cache composition of the idle turns |
| 0% batching on 2,360 calls | 318 of 2,394 batched | the per-record bug above |
| 427 repeated bash commands | 148, of which 146 are sleeps | exact-string count, not normalized |
| gp_swap rebuild fired 20 times | 273 gp_swap calls | undercounted, and wrong in kind |
| 22.0 turns per prompt | 13.9 requests per prompt | record count over a wrong prompt count |
| 80 hours | 81.6 wall, 13.9 active | wall clock is not work |
| the skill was written last | withdrawn | a timestamp cannot prove counterfactual prevention |
| the spend bought no closure | withdrawn | the cluster produced substantive discovery |
confirmed unchanged 6 sessions, 166 idle turns, 42 tool errors, 30 duplicate reads, peak context 997,206.
| Kind | Tokens | Share | Price vs base input |
|---|---|---|---|
| Uncached fresh input | 5,951 | 0.0% | 1.0x |
| Cache creation | 8,615,572 | 0.9% | 1.25x at 5 min, 2.0x at 1 hour |
| Cache read | 912,718,516 | 99.1% | 0.1x |
| Base-input-equivalent | 108,508,947 | 11.8% | of raw processed |
Processed and paid differ by a factor of 8.5 here. Any figure quoted as raw processed tokens overstates cost by roughly that much, which is what revision 1 did.
| Session | First prompt | Output | Processed | Base-equiv | Peak ctx | Requests | Calls | Batched | Idle | Errs | Wall / active h |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0cf2ca1c | is it fraud, do all the appleseed cast songs | 189,840 | 48,890,079 | 7,185,182 | 406,360 | 190 | 190 | 36 | 1 | 12 | 4.9 / 1.2 |
| 665cdd96 | Finish the appleseed cast chats here | 329,414 | 153,972,095 | 18,719,813 | 599,734 | 439 | 452 | 83 | 9 | 6 | 38.1 / 2.6 |
| d4624b2a | resume Apple Seed Cast chat review and fix the skill | 299,210 | 133,738,651 | 17,050,340 | 572,046 | 368 | 346 | 20 | 1 | 5 | 4.5 / 1.9 |
| 242ef1ad | kilgore trout, pop out finder window | 63,485 | 6,612,440 | 948,159 | 181,381 | 50 | 56 | 23 | 0 | 2 | 0.5 / 0.3 |
| 758ba450 | make a skill from Impossible guitar parts | 244,752 | 90,215,977 | 10,780,749 | 535,736 | 275 | 303 | 80 | 0 | 10 | 3.6 / 1.2 |
| 81d2b7bf | still seeing impossible guitar parts | 820,385 | 487,910,797 | 53,824,704 | 997,206 | 1,050 | 1,047 | 76 | 155 | 7 | 30.0 / 6.7 |
| TOTAL | 1,947,086 | 921,340,039 | 108,508,947 | 2,372 | 2,394 | 318 | 166 | 42 | 81.6 / 13.9 |
Active hours count only gaps of 5 minutes or less between records, so 13.9 is a floor and 81.6 is an unrelated ceiling.
171 user prompts produced 2,372 model requests. Session 81d2b7bf ran 1,050 requests
on its own. This is the clearest signature in the data, and it describes the failure better than
any token figure: the agent stayed inside local correction loops rather than stopping to
consolidate state, freeze a regression fixture, and move to the next falsifiable hypothesis.
| Script | Invocations | What it is |
|---|---|---|
| queue.py | 61 | honesty-gate bookkeeping |
| anti_ai_voice_gate.py | 52 | voice gate |
| impossible_gate.py | 51 | the validator under development |
| session_fraud_check.py | 39 | fraud gate |
| refret_capo.py | 30 | fretting fix |
| retime_for_gp.py | 25 | timing fix |
| verify_allparts.py | 21 | part verifier |
| test_refret.py | 18 | fretting test |
| verify_refret.py | 16 | fretting verifier |
152 of those runs are compliance tooling rather than defect work. The fretting cluster
(refret_capo 30, test_refret 18, verify_refret 16,
refret_gpif 13) is 77 runs of tweak-and-recheck on one subsystem.
gp_swap appears in 273 bash calls, 217 of them in
81d2b7bf. Only 11 non-sleep commands in the entire cluster are exact duplicates,
so this is the same tool re-run with shifting arguments, which is the expensive shape.
| Session | Idle turns | Processed | Cache read | Base-equiv |
|---|---|---|---|---|
| 81d2b7bf | 155 | 80,494,480 | ~80.4M | ~8.2M |
| 665cdd96 | 9 | 2,859,740 | ||
| 0cf2ca1c | 1 | 207,824 | ||
| d4624b2a | 1 | 195,454 | ||
| TOTAL | 166 | 83,757,804 | 83,658,109 | 8,564,895 |
Every one was a turn whose only action was sleep N; echo waited. That is
7.9% of the cluster's input spend for no analytical work. The /loop
was authorized, so no policy was broken. The orchestration failure stands on its own: 42
ScheduleWakeup calls and 166 empty round trips is an agent waiting in a loop
instead of ending a turn.
| Session | Excess above 300K (processed) | Base-equiv | Share of that session |
|---|---|---|---|
| 0cf2ca1c | 3,953,353 | 637,830 | 9% |
| 665cdd96 | 38,450,658 | 4,569,380 | 24% |
| d4624b2a | 33,475,865 | 4,019,227 | 24% |
| 242ef1ad | 0 | 0 | 0% |
| 758ba450 | 19,801,048 | 2,380,261 | 22% |
| 81d2b7bf | 199,933,590 | 21,554,112 | 40% |
| TOTAL | 295,614,514 | 33,160,810 | 30.6% |
At a 200K threshold the excess is 469,237,421 processed, 50.9% of everything read.
300K is a threshold I chose. Nothing in the data measures the minimum context each
decision actually required. Accumulated context held real state: the checkpoint, prior findings,
regression history. This figure counts excess processing above an assumed bounded working set, and
it makes no claim that the money was provably wasted.
81d2b7bf at 997,206 tokens across 30 hours is past arguing about, since 40% of its
input spend sat above the threshold.
318 calls went out in messages carrying two or more tool calls. A conservative eligibility test
examined adjacent single-call turns where both calls were read-only and the second call's input
shared no 8-character token with the first call's result, so no dependency could be proven. Only
23 calls failed that test. Measured over calls provably eligible, batching runs
93.3%. The remaining 2,053 single-call turns are mostly python3 and
heredoc bash the test declines to classify, so they are neither proven batchable nor proven serial.
The honest statement is that batching is 13.3% of all calls, the provable misses are few, and the
0% accusation was an artifact of the meter.
The discovery was real. All of it is now encoded in
~/.claude/skills/impossible-guitar-parts/, which is where the grep counts land:
depanning errors, falsely shared note definitions, capo failures, octave corruption, tie semantics,
open-string hand teleporting, same-string collisions, tuning-order data loss, and the need for
explicit hand state. SKILL.md mentions ties 57 times, capo 14 times, tuning 14 times,
panning 18 times.
The skill also is not a finished answer. Session 758ba450 was still live during
this audit and had rewritten impossible_gate.py 26 times and
SKILL.md 20 times, with
.bak-before-kilgore-rules-2026-08-12 copies of both on disk. The validator developed
its own failures while being expanded. Its creation timestamp of 2026-08-12 18:03 proves only that
the earlier sessions had no consolidated validator to run. It does not prove that writing it sooner
would have prevented the later rework.
The cluster's last two user messages are "still seeing impossible guitar parts" and "why did yo stop". The defect is open.
analyze.py now dedupes usage and merges
tool blocks per message. The batching gate's July figures survive remeasurement, so keep the gate.
Credit the improvement to 13.3% that the broken meter was hiding, and read the batching rate off the
fixed script from here on.usage records in ~/.claude/projects/-Users-drwu/*.jsonl, read directly81d2b7bf ran at high context, so their cost sits largely inside that
session's 21,554,112 excess figure81d2b7bf and 758ba450 were both live during the audit, so their counts are floors