Skip to content
context Artifact [09b6e6ee1a]
Login

Artifact [09b6e6ee1a]

Artifact 09b6e6ee1aefdacc671ee171a393292ab02bebbdefa247203652c5466aab6f1b:


{
 "name": "speed-quiet",
 "title": "Hooks and commands on a real archive",
 "section": "Speed",
 "order": 10,
 "date": "2026-11-15",
 "good_until": "2027-02-13",
 "commit": "eb38a24c3045",
 "command": "bench/speed.py --runs 7",
 "conditions": {
  "archive": "1.3 GB, about 490,000 turns",
  "machine": "14 cores, load average 9 while measuring",
  "runs": "7 each; the median is reported"
 },
 "summary": "How long an agent session waits for ctx. Hooks run on every session start, compaction and subagent start, so they are held to a 3-second limit and should take a small fraction of it.",
 "metrics": [
  {
   "label": "Session start: rules and archive note",
   "value": "5 ms",
   "note": "slowest 6 ms"
  },
  {
   "label": "Session start: open tickets",
   "value": "5 ms",
   "note": "slowest 6 ms"
  },
  {
   "label": "After a compaction: the brief",
   "value": "29 ms",
   "note": "slowest 62 ms"
  },
  {
   "label": "Subagent start: archive note",
   "value": "6 ms",
   "note": "slowest 6 ms"
  },
  {
   "label": "Prompt submitted: recall check",
   "value": "4 ms",
   "note": "slowest 4 ms"
  },
  {
   "label": "Before a search: the gate, session told",
   "value": "5 ms",
   "note": "slowest 5 ms"
  },
  {
   "label": "Before a command that is not a search: the gate",
   "value": "5 ms",
   "note": "slowest 5 ms"
  },
  {
   "label": "Status line",
   "value": "6 ms",
   "note": "slowest 7 ms"
  },
  {
   "label": "Search, two words",
   "value": "85 ms",
   "note": "slowest 223 ms"
  },
  {
   "label": "Read a turn with its neighbours",
   "value": "5 ms",
   "note": "slowest 11 ms"
  },
  {
   "label": "List decisions",
   "value": "278 ms",
   "note": "slowest 1190 ms"
  },
  {
   "label": "List published pages",
   "value": "334 ms",
   "note": "slowest 622 ms"
  }
 ],
 "bar": "every hook's slowest run under 1,000 ms",
 "verdict": "pass",
 "baseline": "the 3-second limit Claude Code gives a hook, and the 1-second bar set here",
 "meaning": "Every hook takes 4 to 30 ms at the median and none came near the bar; the slowest single run was the compaction brief at 62 ms. The brief used to take 0.4 to 1.2 s on its first run: to find the last landing the person reported it read the text of every typed turn in the archive. It now finds the session's own documents first and reads only their turns. The gate adds about 5 ms to a search or shell command, most of which is the cost of starting a process. The two listing commands are typed by a person, not run by a hook, and are slower."
}