Skip to content

fix(compaction): raise summarization wall-clock budget to 15 minutes - #1070

Open
leeseunguk wants to merge 1 commit into
code-yeongyu:mainfrom
leeseunguk:fix/compaction-summarization-budget
Open

fix(compaction): raise summarization wall-clock budget to 15 minutes#1070
leeseunguk wants to merge 1 commit into
code-yeongyu:mainfrom
leeseunguk:fix/compaction-summarization-budget

Conversation

@leeseunguk

@leeseunguk leeseunguk commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

DEFAULT_SUMMARIZATION_MAX_DURATION_MS was 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.ts
  • Existing summarization-wall-clock-budget.test.ts still expects the exported constant (now 900_000). Full file needs packages/ai installed; 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_MS is now 900_000 ms in packages/coding-agent/src/core/compaction/stream-watchdog.ts and applies per attempt via retryAssistantCall.
  • Idle timeout remains DEFAULT_SUMMARIZATION_IDLE_TIMEOUT_MS = 300_000 ms; silence still terminates hung streams.
  • Tests: added summarization-duration-constant.test.ts; updated summarization-wall-clock-budget.test.ts to assert the new constant.

Written for commit 1fb922d. Summary will update on new commits.

Review in cubic

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
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.

Compaction summarization 120s wall-clock budget aborts large-session compact

1 participant