Dataset Viewer
Auto-converted to Parquet Duplicate
condition
stringclasses
7 values
run
int64
1
5
input_tokens
int64
7.86k
700k
cache_read_tokens
int64
1.92k
622k
output_tokens
int64
4.32k
17.4k
api_cost_usd
float64
0.12
0.95
seconds
int64
37
236
tool_calls
int64
1
6
subagent_tool_calls
int64
0
11
used_subagent
bool
2 classes
used_skill
bool
2 classes
file_chars
int64
7.34k
19.8k
works
bool
1 class
tools
stringlengths
12
51
subagent_tools
stringclasses
6 values
default
1
78,140
51,772
6,907
0.359
58
1
0
false
false
12,467
true
{"Write": 1}
{}
default
2
78,829
51,772
7,438
0.376
60
1
0
false
false
13,375
true
{"Write": 1}
{}
default
3
78,723
58,793
7,364
0.318
236
1
0
false
false
13,599
true
{"Write": 1}
{}
default
4
78,713
51,772
7,323
0.372
61
1
0
false
false
11,251
true
{"Write": 1}
{}
default
5
79,861
51,772
8,496
0.405
77
1
0
false
false
13,517
true
{"Write": 1}
{}
safemode
1
48,172
37,681
4,891
0.189
42
1
0
false
false
8,510
true
{"Write": 1}
{}
safemode
2
47,818
39,510
4,658
0.168
42
1
0
false
false
7,872
true
{"Write": 1}
{}
safemode
3
47,863
39,510
4,604
0.167
37
1
0
false
false
7,921
true
{"Write": 1}
{}
safemode
4
73,923
65,421
4,718
0.175
38
2
0
false
false
7,738
true
{"Edit": 1, "Write": 1}
{}
safemode
5
48,063
39,510
4,791
0.172
38
1
0
false
false
8,321
true
{"Write": 1}
{}
minimal
1
8,218
1,915
4,676
0.144
41
1
0
false
false
7,964
true
{"Write": 1}
{}
minimal
2
8,214
3,439
4,691
0.133
45
1
0
false
false
7,904
true
{"Write": 1}
{}
minimal
3
7,857
3,439
4,320
0.122
65
1
0
false
false
7,338
true
{"Write": 1}
{}
minimal
4
9,209
3,439
5,963
0.166
50
1
0
false
false
9,895
true
{"Write": 1}
{}
minimal
5
7,979
3,439
4,457
0.126
42
1
0
false
false
7,550
true
{"Write": 1}
{}
subagent
1
402,166
324,909
14,934
0.85
205
3
5
true
false
19,761
true
{"Agent": 1, "Bash": 1, "Read": 1}
{"Bash": 3, "PowerShell": 1, "Write": 1}
subagent
2
507,286
442,656
13,604
0.75
135
2
9
true
false
16,658
true
{"Agent": 1, "Bash": 1}
{"Bash": 4, "PowerShell": 3, "Write": 2}
subagent
3
646,540
579,390
15,486
0.829
157
3
11
true
false
18,313
true
{"Agent": 1, "Bash": 2}
{"Bash": 6, "PowerShell": 3, "Write": 2}
subagent
4
699,803
622,012
17,142
0.953
191
6
10
true
false
15,867
true
{"Agent": 1, "Bash": 3, "PowerShell": 1, "Read": 1}
{"Bash": 4, "PowerShell": 3, "Write": 3}
subagent
5
534,125
465,928
17,444
0.85
178
2
10
true
false
17,900
true
{"Agent": 1, "Glob": 1}
{"Bash": 5, "PowerShell": 1, "Read": 1, "Write": 3}
plan
1
206,047
176,144
8,298
0.44
74
4
0
false
false
10,994
true
{"Bash": 1, "Edit": 1, "Write": 2}
{}
plan
2
246,736
215,860
9,315
0.476
85
4
0
false
false
12,082
true
{"Bash": 1, "Glob": 1, "Write": 2}
{}
plan
3
245,562
214,983
9,013
0.468
84
4
0
false
false
12,493
true
{"Bash": 1, "Glob": 1, "Write": 2}
{}
plan
4
248,072
216,461
10,119
0.499
97
4
0
false
false
13,066
true
{"Bash": 1, "Glob": 1, "Write": 2}
{}
plan
5
159,787
131,176
7,233
0.4
75
2
0
false
false
9,774
true
{"Write": 2}
{}
skill
1
158,195
131,068
6,719
0.378
55
3
0
false
true
11,240
true
{"Bash": 1, "Skill": 1, "Write": 1}
{}
skill
2
158,450
131,214
6,828
0.381
60
3
0
false
true
11,601
true
{"Bash": 1, "Skill": 1, "Write": 1}
{}
skill
3
158,393
131,027
6,740
0.38
55
4
0
false
true
11,143
true
{"Bash": 1, "Edit": 1, "Skill": 1, "Write": 1}
{}
skill
4
158,828
131,232
7,150
0.39
89
4
0
false
true
11,282
true
{"Bash": 1, "Edit": 1, "Skill": 1, "Write": 1}
{}
skill
5
157,819
130,885
6,483
0.371
55
3
0
false
true
10,982
true
{"Bash": 1, "Skill": 1, "Write": 1}
{}
hook
1
117,910
92,608
5,486
0.331
56
2
0
false
false
9,046
true
{"Bash": 1, "Write": 1}
{}
hook
2
165,208
137,429
7,675
0.403
65
4
0
false
false
11,935
true
{"Bash": 1, "Edit": 2, "Write": 1}
{}
hook
3
121,403
94,076
7,393
0.385
65
3
0
false
false
12,013
true
{"Bash": 1, "Edit": 1, "Write": 1}
{}
hook
4
123,617
95,390
8,453
0.414
71
2
0
false
false
13,036
true
{"Bash": 1, "Write": 1}
{}
hook
5
121,553
94,431
7,379
0.383
66
2
0
false
false
12,866
true
{"Bash": 1, "Write": 1}
{}

What the Claude Code harness costs: plugins, subagents, plan mode, skills and hooks on the same task

The same small coding task (a brick-breaker game in one HTML file) run five times each under seven Claude Code settings: default, safe mode, a minimal harness, a subagent, plan mode, a project skill and a hook (35 runs). Input and output tokens, cache reads, API cost, time, tool calls and whether the game worked.

Headline: most of what Claude Code sends to the model is its own harness, not your task. The median run used 78,723 input tokens in a default setup and 8,214 with a one-line system prompt and two tools (−90%); every game still worked. Delegating the task to a subagent cost 128% more, and installed plugins added cost even when none was used.

Key findings

  • The harness is about 90% of the input. With the system prompt and tool descriptions replaced by one sentence and two tools (Write and Read), the median run used 8,214 input tokens instead of 78,723 and cost $0.13 instead of $0.37 (−64%). The games were also shorter (median 7,904 characters against 13,375), so part of the saving is output.
  • Installed plugins cost tokens even when unused. The laptop has 35 plugins installed (376 skills and 19 agents listed to the model). --safe-mode loaded 3 plugins, 19 skills and 5 agents with the same 27 tools; no run used a plugin, yet safe mode cut the median input by 39% (30,660 tokens per task) and the cost by 54%. The games came out shorter here too (4,718 output tokens against 7,364), so not all of the cost drop is input.
  • A subagent is the most expensive way to do a small task: 534,125 input tokens (+578%), $0.85 (+128%) and 178 seconds instead of 61. Claude Code delegated in all 5 runs.
  • Plan mode, then build (two calls): 245,562 input tokens (+212%) but only +26% in cost, because most of the extra input is read from the prompt cache.
  • A project skill (1.9 KB, used in all 5 runs) raised input +101% and cost +2%; a PostToolUse hook raised input +54% and cost +3%.
  • All 35 games loaded and responded to keyboard and mouse in a headless browser without script errors.
  • Earlier TokenSave Claude Code datasets were measured on the same laptop with the same plugins, so their absolute Claude Code numbers include this plugin overhead; comparisons inside each dataset are unaffected.

Files

  • claude-code-harness-cost.csv: one row per run with condition, run, input_tokens, cache_read_tokens, output_tokens, api_cost_usd, seconds, tool_calls, subagent_tool_calls, used_subagent, used_skill, file_chars, works, tools, subagent_tools
  • claude-code-harness-cost.json: the same data plus the prompts and the settings

Results

Setting Input tokens (median) vs default of which cache reads Output tokens API cost (median) vs default Time Game size (chars) Game works
Default 78,723 – 51,772 7,364 $0.37 – 61 s 13,375 5 / 5
Safe mode (no personal plugins) 48,063 −39% 39,510 4,718 $0.17 −54% 38 s 7,921 5 / 5
Minimal harness (1-line system prompt, Write and Read) 8,214 −90% 3,439 4,676 $0.13 −64% 45 s 7,904 5 / 5
+ PostToolUse hook 121,553 +54% 94,431 7,393 $0.39 +3% 65 s 12,013 5 / 5
+ one project skill 158,393 +101% 131,068 6,740 $0.38 +2% 55 s 11,240 5 / 5
Plan mode, then build 245,562 +212% 214,983 9,013 $0.47 +26% 84 s 12,082 5 / 5
Delegated to a subagent 534,125 +578% 465,928 15,486 $0.85 +128% 178 s 17,900 5 / 5

Method

  1. Claude Code 2.1.295 with Opus 5.5 on one Windows laptop, effort medium, no MCP servers (--strict-mcp-config with an empty config), each run in its own empty folder, prompt sent through standard input; seven settings run in turn, five rounds, on 2026-10-19.
  2. Default: claude -p --effort medium --output-format stream-json --verbose --permission-mode acceptEdits. Safe mode adds --safe-mode. Minimal: --system-prompt "You are a coding agent. Use your tools to complete the user's task." --tools Write,Read. Subagent: one more sentence in the prompt asking to delegate with the Agent tool. Plan: --permission-mode plan, then claude -c with "Go ahead and implement your plan." (both calls added). Skill: .claude/skills/html-canvas-games/SKILL.md in the working folder. Hook: a PostToolUse hook on Write and Edit returning a reminder to check the requirements.
  3. Tokens and cost from modelUsage and total_cost_usd in the final result event (input = input + cache reads + cache writes); tools, skills, plugins and agents from the system/init event.
  4. "Game works": loaded in headless Chromium with a canvas, took mouse clicks and arrow keys for about two seconds, no script errors.

Task prompt: "Make a brick-breaker game that runs in the browser as a single file named index.html in the current folder. It needs 2 levels, a score display and 3 lives, and it must be playable with the keyboard and the mouse. Write the file and finish."

Limitations

  • One small task and five runs per setting; on larger tasks a skill, a plan or a subagent may save rework this task never needed.
  • The plugin overhead depends on what is installed; 35 plugins is a heavy setup.
  • The minimal harness has no shell, search or edit tools; it measures overhead and is not a recommended setup.
  • Cost figures are API list-price estimates; subscription plans are not billed per token.

Citation

TokenSave (2026). What the Claude Code harness costs: plugins, subagents, plan mode, skills and hooks on the same task [Data set]. Zenodo. https://doi.org/10.5281/zenodo.23465633

Check your own Claude Code usage at tokensave.app.

Downloads last month
17