CC 2.1.219+ ships autoCompactWindow: a user-settings integer
(100k..1M, schema verified in the 2.1.227 binary) that arms CC's native precomputed
compaction. ork's four-hook compaction layer approximated the same idea with home-grown token
accounting, and #3321's verification showed how that went: the imitation's key branches
never fired once. This PR documents the native offer and deletes the parts proven dead.
| what | why it could not fire |
|---|---|
prompt/context-exhaustion-warner (whole hook) | its bridge file has had zero writers since 2026-03-29 (#1194 deleted the writer, no replacement); every run since was a silent no-op. Confirmed three independent ways. |
cache-heat machinery (evaluateCacheHeat, recordCacheTokens, warm-cache messages in 2 hooks) | CC's SubagentStop payload sends neither cache token field (verified in the binary), so the sole writer's zero-check always returned early; 0 of 93 real state files ever non-zero. |
| 3 closed-loop tests | hand-built fixtures with cacheReadTokens values no writer could produce, asserting phrasing only impossible input could trigger — the same disease as the TeammateIdle duration tests. |
net: -910 lines (27 files, +555 / -1,465)
autoCompactWindow joins ENABLE_TOOL_SEARCH and friends as an
info-level OFFER: real, useful, optional. ork cannot ship it — a plugin settings.json is not a
settings scope CC reads (binary-proven at 2.1.226) — so the doctor recommends and never sets.
The gate has never fired (0 of 2,246 recorded invocations since it landed), but deleting it would ENABLE a compaction blocker that has never run in production — a behavior change to be measured on its own, not a cleanup to ride along. Same reasoning for the estimatedTokens unit mismatch (a subset-counter checked against a whole-window threshold): recalibration is a design decision, recorded on the issue.
typecheck exit 0 hook TS suite 310 files · 7588 passed · 2 skipped hooks + plugin build exit 0 counts validate-counts.sh exit 0 (warner was a dispatcher stage, no hooks.json entry, so no restamp due)
Theme of the week, fifth instance. #3411's shell_cwd, #3410's worktree
layouts, the payload keys, the closed-loop tests, and now a warner reading a file whose writer was
deleted five months ago: ork keeps holding beliefs about its environment that nothing checks
against the environment. The native autoCompactWindow needs no belief — CC enforces
its own contract.