{
 "measurement": "What installing ponytail costs in startup context on Claude Code 2.1.243",
 "claude_code_version": "2.1.243",
 "trial_date": "2026-08-25",
 "subject": {
  "repo": "DietrichGebert/ponytail",
  "commit": "2ed6c52",
  "version": "4.9.0",
  "why": "Trending at 944 stars on 2026-08-25. It injects a standing ruleset through a SessionStart hook, so it is paid on every session.",
  "payload_utf16_units": 5229,
  "payload_bytes": 5252,
  "under_the_10000_unit_cap": true,
  "cap_reference": "/hook-unit-2-1-238.json"
 },
 "headline": "The arms do not overlap: every run with the hook (23,854 to 24,302) cost more than every run without it (22,885 to 23,027). The paired per-round difference ranges 831 to 1,109 tokens.",
 "method": {
  "arms": "baseline: empty project, no settings file. ponytail: same, with .claude/settings.json registering hooks/ponytail-activate.js on SessionStart.",
  "prompt": "Reply with only: OK",
  "isolation": "--setting-sources project asserted onto the command line on every run.",
  "tokens": "inputTokens + cacheCreationInputTokens + cacheReadInputTokens from modelUsage.",
  "estimator": "RANGE and full histogram, plus a non-overlap check. No point estimate: the baseline arm is bimodal on this machine, and a mode over a bimodal cell describes neither cluster.",
  "population": "Every repetition, two per round across eight rounds, pooled. 16 per cell.",
  "controls": {
   "arrival": "Each round also asked, with the hook installed, which ponytail level was active. 16 of 16 replies named a level, so the payload reached the model. A zero difference would otherwise be indistinguishable from a hook that never ran.",
   "settings_presence": "Asserted in code that the settings file exists on the ponytail arm and does not exist on the baseline arm.",
   "empty_sandbox": "Each run starts in a fresh temp directory asserted empty before setup.",
   "usable": "result_guard rejects a run whose modelUsage is empty or which reports an error."
  }
 },
 "results": {
  "baseline": {
   "n": 16,
   "min": 22885,
   "max": 23027,
   "histogram": {
    "22885": 1,
    "22887": 1,
    "22889": 1,
    "23021": 1,
    "23023": 5,
    "23025": 5,
    "23027": 2
   }
  },
  "ponytail": {
   "n": 16,
   "min": 23854,
   "max": 24302,
   "histogram": {
    "23854": 1,
    "23990": 2,
    "23992": 4,
    "23994": 4,
    "23996": 4,
    "24302": 1
   }
  },
  "arms_overlap": false,
  "paired_differences": {
   "n": 8,
   "min": 831,
   "max": 1109,
   "values": [
    831,
    965,
    967,
    969,
    971,
    971,
    1103,
    1109
   ],
   "histogram": {
    "831": 1,
    "965": 1,
    "967": 1,
    "969": 1,
    "971": 2,
    "1103": 1,
    "1109": 1
   }
  },
  "arrival_control": {
   "replies_naming_a_level": 16,
   "of": 16,
   "distinct_replies": [
    "full"
   ]
  },
  "runs_excluded": 0
 },
 "known_limits": {
  "the_baseline_is_bimodal_and_the_difference_inherits_it": "The baseline splits into two clusters about 138 tokens apart, three readings low and thirteen high. Both of the largest paired differences (1,103 and 1,109) are exactly the rounds whose baseline sat in the LOW cluster. So the spread in the difference is largely the baseline's own intermittency, not variation in what the hook costs. This is why a range is published and a single number is not.",
  "not_a_per_byte_rate_and_not_adjudicated": "Dividing the difference by the payload size gives roughly 0.18 to 0.21 tokens per byte, which sits BELOW the 0.26 to 0.42 range this site published for markdown-structured CLAUDE.md files. That comparison is NOT made here as a finding: the two are different delivery paths, the content is not matched, and nothing in this trial was designed to adjudicate them. It is recorded because a reader would otherwise compute it themselves.",
  "one_machine_one_release": "Claude Code 2.1.243, one machine, project scope only, mode 'full'.",
  "session_cost_not_turn_cost": "This is the SessionStart injection, paid once per session. ponytail also registers a UserPromptSubmit hook, but its ruleset injection there is gated to Qoder, so on Claude Code it does not re-inject per turn. Verified by reading hooks/ponytail-runtime.js.",
  "no_behaviour_measured": "Nothing here tests whether ponytail changes what the model writes. Its claim is about producing less code; this trial measures only what it costs to load."
 },
 "runs": [
  {
   "cell": "baseline",
   "round": 0,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    22887,
    22885
   ],
   "min": 22885,
   "noise": 2,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 0,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23994,
    23996
   ],
   "min": 23994,
   "noise": 2,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 0,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    24004,
    24004
   ],
   "min": 24004,
   "noise": 0,
   "replies": [
    "full",
    "full"
   ]
  },
  {
   "cell": "baseline",
   "round": 1,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    23025,
    23025
   ],
   "min": 23025,
   "noise": 0,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 1,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23996,
    23996
   ],
   "min": 23996,
   "noise": 0,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 1,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    24312,
    24000
   ],
   "min": 24000,
   "noise": 312,
   "replies": [
    "full",
    "full"
   ]
  },
  {
   "cell": "baseline",
   "round": 2,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    23023,
    23023
   ],
   "min": 23023,
   "noise": 0,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 2,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23992,
    23994
   ],
   "min": 23992,
   "noise": 2,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 2,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    24006,
    24002
   ],
   "min": 24002,
   "noise": 4,
   "replies": [
    "full",
    "full"
   ]
  },
  {
   "cell": "baseline",
   "round": 3,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    23023,
    23027
   ],
   "min": 23023,
   "noise": 4,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 3,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23994,
    23854
   ],
   "min": 23854,
   "noise": 140,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 3,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    24006,
    24002
   ],
   "min": 24002,
   "noise": 4,
   "replies": [
    "full",
    "full"
   ]
  },
  {
   "cell": "baseline",
   "round": 0,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    23023,
    23027
   ],
   "min": 23023,
   "noise": 4,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 0,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23990,
    23996
   ],
   "min": 23990,
   "noise": 6,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 0,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    24004,
    24004
   ],
   "min": 24004,
   "noise": 0,
   "replies": [
    "full",
    "full"
   ]
  },
  {
   "cell": "baseline",
   "round": 1,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    23021,
    23023
   ],
   "min": 23021,
   "noise": 2,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 1,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23992,
    24302
   ],
   "min": 23992,
   "noise": 310,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 1,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    23864,
    24006
   ],
   "min": 23864,
   "noise": 142,
   "replies": [
    "full",
    "full"
   ]
  },
  {
   "cell": "baseline",
   "round": 2,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    23025,
    23025
   ],
   "min": 23025,
   "noise": 0,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 2,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23990,
    23992
   ],
   "min": 23990,
   "noise": 2,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 2,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    23864,
    24002
   ],
   "min": 23864,
   "noise": 138,
   "replies": [
    "full",
    "full"
   ]
  },
  {
   "cell": "baseline",
   "round": 3,
   "status": "ok",
   "hook_installed": false,
   "prompt": "Reply with only: OK",
   "tokens": [
    22889,
    23025
   ],
   "min": 22889,
   "noise": 136,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "ponytail",
   "round": 3,
   "status": "ok",
   "hook_installed": true,
   "prompt": "Reply with only: OK",
   "tokens": [
    23992,
    23994
   ],
   "min": 23992,
   "noise": 2,
   "replies": [
    "OK",
    "OK"
   ]
  },
  {
   "cell": "arrival",
   "round": 3,
   "status": "ok",
   "hook_installed": true,
   "prompt": "What ponytail mode level is active? Reply with only the level word.",
   "tokens": [
    24006,
    24002
   ],
   "min": 24002,
   "noise": 4,
   "replies": [
    "full",
    "full"
   ]
  }
 ]
}