Repository navigation
fix(compaction): keep growth latch after under-threshold folds - #1315
Merged
TheGreatAxios merged 1 commit intoOct 5, 2026
Merged
TheGreatAxios merged 1 commit into
TheGreatAxios merged 1 commit into
Conversation
A fold that only lands just under 60% used to clear the latch, so the next 60% crossing compacted again. The 20% resume gap already exists for still-over folds; it now applies after every compact.
TheGreatAxios
commented
Oct 4, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review · Approve
After every compact the growth latch stays set, so a fold that only lands just under 60% cannot immediately re-arm at the next 60% crossing. Deep folds still re-arm at 60%; overflow still fires while latched.
Findings
No findings.
git diff origin/main...HEAD --stat is four files, no binaries. bun test src/agent/compaction.test.ts src/provider/context-window-thresholds.test.ts pass (exit 0). Occupancy fixture is unchanged on this branch (40,144 live tokens with thinking) — expected; fold depth is #1316.
TheGreatAxios
deleted the
cl-9902-keep-compaction-growth-latch-after-under-threshold-folds
branch
October 5, 2026 01:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
bun run lint,bun run typecheck,bun run check:dead-exports, andbun run buildpassbun run test— 8315 pass, 0 failbun test src/agent/compaction.test.ts— 66 pass, including overflow-while-under-threshold-latchFixes CL-9902