Streaming Watchdog Bug Chain
- Entity ID:
ent-20260419-92aa328d4fff - Type:
concept - Scope:
shared - Status:
active - Aliases: three streaming bugs, CLAUDE_ENABLE_STREAM_WATCHDOG bugs, watchdog compound failure
Description
A three-bug compound failure that caused the majority of observed stream hangs: (1) watchdog initializes AFTER the dangerous do-while phase and is disabled by default behind an undocumented env var CLAUDE_ENABLE_STREAM_WATCHDOG; (2) releaseStreamResources() aborts stream and streamResponse which are undefined during the initial connection phase — a no-op; (3) non-streaming fallback with fallback_cause="watchdog" telemetry only triggers during the for-await SSE phase, never the do-while phase where 100% of observed hangs occur. Had been shipping 5+ months unguarded.
Key claims
- Streaming watchdog fails because it initializes after the vulnerable phase
- releaseStreamResources is a no-op during the critical phase
- Equivalent streaming logic in Go would be ~30 lines
- One-line watchdog patch drops ESC aborts 8.7x
- Non-streaming fallback never triggers where needed
Relations
- Streaming Watchdog Bug Chain --[contained_in]--> print.ts
- Kolkov Watchdog Patch --[fixed]--> Streaming Watchdog Bug Chain