altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

feat: liveness signal for wedged provider streams (5min chunk timeout hides stalls)

Open anandgupta42 opened this issue 5 months ago • 2 comments

Found during the v0.8.8 release review (Chaos Gremlin / on-call SRE, P2 deferred).

#844 raised DEFAULT_CHUNK_TIMEOUT from 2min to 5min. The watchdog (wrapSSE in provider.ts) only fires when a chunk fails to arrive within the window, so a genuinely wedged provider stream (connection alive, no data) now hangs a user for ~5 minutes before the timeout aborts — up from ~2. Errors are surfaced, not silent, but the user-visible stall doubled.

This was an intentional tradeoff (slow warehouse/LLM streams were tripping the 2min watchdog), so it is deferred. Possible follow-up: a separate, shorter "no first byte" / liveness signal distinct from the steady-state chunk timeout, or surfacing a "still waiting…" indicator past N seconds so a wedged stream is visible before the hard timeout.

anandgupta42 avatar Jun 19 '26 05:06 anandgupta42

Makes sense. Feels like we're using one timeout to solve two different problems here. A separate liveness/first-activity check might let us keep the 5-minute chunk timeout without making wedged streams wait the full duration. I'll dig into the current implementation.

rohitmannur007 avatar Jun 19 '26 09:06 rohitmannur007

Consolidated into #1674, which tracks this together with related issues. The original report here stays linked from that tracker.

anandgupta42 avatar Nov 05 '26 21:11 anandgupta42