Skip to content

Compaction fails on a single transient stream drop (no retry) #6647

Description

@axelbaumlisto

Compaction runs one non-retried summarization call, so a single transient
mid-stream socket death fails the whole compaction:

Compaction failed: Summarization failed: terminated

Normal assistant turns already retry this class (isRetryableAssistantError
matches terminated), but the compaction path doesn't go through it.

completeSummarization() in packages/coding-agent/src/core/compaction/compaction.ts
does await streamFn(...).result() once; generateSummary() then throws on
stopReason === "error". Large sessions are the most exposed (longest stream),
so this is the failure users hit most.

Fix: bounded retry at completeSummarization (the shared choke point for
compaction, split-turn, and branch summary), gated on the existing
isRetryableAssistantError so deterministic errors still fail fast. I have a
patch + regression test and would like to implement it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions