Repository navigation
fix: correct Opus compaction budgeting in 0.1.24 - #90
Merged
Merged
Conversation
added 2 commits
October 23, 2026 20:38
Keep verified Opus 5.5 compaction at medium effort with a 64000-token total unless the caller supplies a limit. Adaptive thinking has no hard thinking budget, so the old 40192 total could be exhausted before the handoff summary completed. Stream routed Anthropic v1 summarization internally while preserving the external JSON history, shared memory bounds, cancellation, and incomplete-summary rejection.
pavelhov
marked this pull request as ready for review
October 24, 2026 00:40
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.
Opus 5.5 context compaction now uses a bounded maintenance budget instead of inheriting maximum-effort implementation settings. Two post-0.1.23 compactions reached exactly 40,192 output tokens and stopped with
max_output_tokens; the adapter had treated a heuristic thinking allowance as though it reserved space for summary text, while adaptive thinking shares the entire output limit.For fresh compactions on the verified Opus 5.5 model at Anthropic's canonical API, effective effort is at most medium and an omitted output limit becomes 64,000 tokens. The budget policy preserves explicit limits and lower efforts, and leaves ordinary work, other models, and custom destinations unchanged. Both compact endpoints reject partial summaries without installing them or automatically retrying. The older endpoint now streams routed Anthropic generation internally, retaining its client JSON contract while allowing long summaries to receive pings beyond the connection-header deadline. This is bounded headroom, not a guarantee that every history can be summarized within the limit; Anthropic documents adaptive thinking and the model's 128K maximum.
Regression validation first reproduced the old
40192/maxwire policy with 20 failing cases, then passed all 120 focused tests through the real adapter and both endpoints. Typecheck, privacy scan, GUI lint/i18n/tests/build, documentation build, and macOS core/UI checks passed. The GUI runner recovered one existing timing-test file with its automatic focused retry. The first full backend run passed all 633 files after a focused appcast-test retry. Independent Opus review identified the v1 timeout risk; its follow-up confirmed the streaming fix with 117 passing focused tests and no remaining findings. The final backend run isolated one older integration fixture that still returned non-streaming JSON; updating that fake to honorstream: truepreserved every client-history assertion, and rerunning onlytests/server-auth.test.tspassed all 70 tests. The remaining 632 files passed in the full run. Required CI then passed the complete final commit, including the full suite, in 5m42s.Release security review: the existing external Ed25519 key pair and installed trust anchor match, and Sparkle tool hashes match the pinned 2.9.6 release. The patch changes no credential handling, destinations, release scripts, signing policy, or updater trust. Version 0.1.24 will use immutable archives and the existing authenticated feed, with isolated installed-app qualification plus downloaded-draft and public-byte verification before completion. The universal macOS app remains an ad-hoc signed, unnotarized preview.