The hook that kept blocking us
ork · context-file-budget-guard · 2026-09-01 · why every handoff write in two lanes raised a permission dialog, and the two fixes
It was our own hook, not Claude Code. context-file-budget-guard projects the
post-write size of MEMORY.md and, when it crosses the 17 KB budget, answered ask in every
mode except bypass. Both indexes on the machine were over budget, both lanes ran in auto mode, and since
CC 2.1.211 a hook's ask wins over auto mode. Every handoff write asked.
Where the two indexes sat
Try it: what did the guard answer, before and after
Two fixes, both shipped
1. Compact the index (root cause). index-budget.mjs --entry-days 14 --handoff-days 5 --apply
demoted 53 aged entries to MEMORY-ARCHIVE.md: 24,202 to 17,346 B, 97 indexed + 210 archived, invariant OK
(0 missing, 0 duplicated, 0 dead links). The guard is silenced by making its claim false.
2. Downgrade the guard to advisory-only (structural). The opinion is "trim the index", which
the model can act on itself, so it now arrives as additionalContext merged by the write-edit dispatcher
and never as a dialog. isBypassMode and outputAsk leave the file. The probe, the dispatcher
verdict test, and the bypass-gate test moved with it; the bypass-gate file keeps the guard as a negative pin
so a revived ask path fails there instead of in every lane.
// before // after if (bypass) return advisory(...); return outputPreToolAdvisory( return outputAsk(reason); "not asking, advising: ... run /ork:dream");
Why it survived the purge
The #3835 purge deleted 16 of 29 blocking hooks and kept this one: the failure it guards is real (past the
ceiling the index degrades with no error). What it got wrong was the channel. An ask is only useful
when a human is the right decider; here the remedy is a script the model can run, and the dialog just taught
users to reach for bypass mode (the same lesson as the #3835 wave 2 ask storm).