Repository navigation
Conversation
The summary request inherited the session's reasoning variant. At max effort the model can spend the whole 32k summary output limit on reasoning and finish with reason "length", which surfaces as "Compaction summary reached the output token limit" even though the context window is far from full. When no compaction agent model is configured, resolve the model again without the variant so the summary uses the provider default reasoning. An explicit compaction agent model, native compaction, and a failed resolve keep their current behavior. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012f8hnxtEXXXiuwuWWpg7SA
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
This branch has not been deployed
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.
Issue for this PR
Closes #56766
Type of change
What does this PR do?
Compaction was failing with "Compaction summary reached the output token limit" on Haiku 5.5 at max effort, even with the context only half full.
The summary request reused the session's reasoning variant. At max effort the model can use up the whole 32K summary output limit on thinking and get cut off before writing the summary. Now, when no compaction agent model is configured, the summary resolves the model again without the variant, so it uses the provider's default reasoning. A configured compaction model and native compaction work as before.
How did you verify your code works?
Added a test in
session-compaction.test.tsthat sets the session variant tomaxand checks that compaction asks for the model without a variant. It fails without the change and passes with it. The existing compaction tests and thepackages/coretypecheck also pass. I haven't tried it against a live Haiku 5.5 session.Screenshots / recordings
Not a UI change.
Checklist