-
compact: retain newest ~20% of context; refactor startup into internal/app
released this
2026-06-25 06:59:21 +00:00 | 1 commits to master since this release- Replace fixed 6-message compact retention with ratio-based logic:
retain ~20% of compactable estimated tokens, with a 6-message floor
and user-turn boundary alignment - Add compactRetainedTokenBudget, compactRecentStart, compactTurnBoundary
helpers in internal/agent/agent.go - Add TestAgentCompactKeepsTwentyPercentRecentContext
- Move startup/session/repl/bootstrap logic from root into internal/app
so main.go is a thin binary entry point (15 lines) - Update /compact docs in README.md
Downloads
- Replace fixed 6-message compact retention with ratio-based logic: