Scope
This only affects Relay's optional response cache when an Anthropic request enables server-side compaction or carries a prior compaction block. Ordinary Anthropic traffic is out of scope, and the first live SSE stream is forwarded correctly.
The data-loss edge case occurs when a streamed request actually triggers compaction: cached replay cannot currently reproduce the native compaction_delta lifecycle. Related cache keys also omit the Anthropic beta/version headers, and replay must preserve missing versus explicit-null fields.
#1035 fixes the separate stream-aggregation bug.
Resolution
Until native replay and header-aware keys are implemented, bypass response caching for compaction-enabled and continuation requests. Partial, malformed, or legacy compaction entries must always miss and run live.
Anthropic compaction documentation
Scope
This only affects Relay's optional response cache when an Anthropic request enables server-side compaction or carries a prior compaction block. Ordinary Anthropic traffic is out of scope, and the first live SSE stream is forwarded correctly.
The data-loss edge case occurs when a streamed request actually triggers compaction: cached replay cannot currently reproduce the native
compaction_deltalifecycle. Related cache keys also omit the Anthropic beta/version headers, and replay must preserve missing versus explicit-null fields.#1035 fixes the separate stream-aggregation bug.
Resolution
Until native replay and header-aware keys are implemented, bypass response caching for compaction-enabled and continuation requests. Partial, malformed, or legacy compaction entries must always miss and run live.
Anthropic compaction documentation