fix(compaction): raise summarization wall-clock budget to 15 minutes - #1070
Open
leeseunguk wants to merge 1 commit into
Open
fix(compaction): raise summarization wall-clock budget to 15 minutes#1070leeseunguk wants to merge 1 commit into
leeseunguk wants to merge 1 commit into
Conversation
120s aborted still-live large-session summaries (observed: 257k tokens on Grok 4.6) and left the session above the compaction threshold. Idle timeout still kills a silent connection. Fixes code-yeongyu#1068
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
DEFAULT_SUMMARIZATION_MAX_DURATION_MSwas 120s. A 257k-token session summarizing on Grok 4.6 was still streaming when the cap fired, so compact was rejected and the session stayed above the threshold.Keep a wall-clock budget, but size it for large-session summarization (900s). The 300s idle timeout still kills a silent connection.
Fixes #1068
Test plan
bun test test/compaction/summarization-duration-constant.test.tssummarization-wall-clock-budget.test.tsstill expects the exported constant (now 900_000). Full file needspackages/aiinstalled; the new constant test does not.Summary by cubic
Raises the summarization wall-clock budget from 120s to 15 minutes so large-session compaction can complete. Previously, we aborted still-live summaries and left sessions above the compaction threshold; now large summaries can finish while the 300s idle timeout still ends silent connections.
DEFAULT_SUMMARIZATION_MAX_DURATION_MSis now900_000ms inpackages/coding-agent/src/core/compaction/stream-watchdog.tsand applies per attempt viaretryAssistantCall.DEFAULT_SUMMARIZATION_IDLE_TIMEOUT_MS = 300_000ms; silence still terminates hung streams.summarization-duration-constant.test.ts; updatedsummarization-wall-clock-budget.test.tsto assert the new constant.Written for commit 1fb922d. Summary will update on new commits.