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.
Compaction runs one non-retried summarization call, so a single transient
mid-stream socket death fails the whole compaction:
Normal assistant turns already retry this class (
isRetryableAssistantErrormatches
terminated), but the compaction path doesn't go through it.completeSummarization()inpackages/coding-agent/src/core/compaction/compaction.tsdoes
await streamFn(...).result()once;generateSummary()then throws onstopReason === "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 forcompaction, split-turn, and branch summary), gated on the existing
isRetryableAssistantErrorso deterministic errors still fail fast. I have apatch + regression test and would like to implement it.