Skip to content

fix: correct Opus compaction budgeting in 0.1.24 - #90

Merged
pavelhov merged 2 commits into
developmentfrom
codex/fix-opus-compaction-output
Oct 24, 2026
Merged

pavelhov merged 2 commits into
developmentfrom
codex/fix-opus-compaction-output

Conversation

@pavelhov

@pavelhov pavelhov commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

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/max wire 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 honor stream: true preserved every client-history assertion, and rerunning only tests/server-auth.test.ts passed 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.

pavelhov 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 pavelhov changed the title codex/fix opus compaction output fix: prevent Opus compaction budget exhaustion in 0.1.24 Oct 24, 2026
@pavelhov pavelhov changed the title fix: prevent Opus compaction budget exhaustion in 0.1.24 fix: correct Opus compaction budgeting in 0.1.24 Oct 24, 2026
@pavelhov
pavelhov marked this pull request as ready for review October 24, 2026 00:40
@pavelhov
pavelhov merged commit 76bcb45 into development Oct 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant