You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Infinite API socket hangs bypass fallback system #29470
If an LLM provider API (like GitHub Copilot) accepts the HTTP connection but infinitely hangs without sending any data (a socket hang), no TimeoutError is thrown by the underlying fetch client. Because no error is thrown, the request remains permanently 'pending' and entirely bypasses the fallback/retry chain.
In tests, a background task sat completely stale for over 8 minutes without triggering a fallback until it was manually aborted.
Expected Behavior
The streamText execution (e.g. in src/session/llm.ts) should configure a strict idle/time-to-first-byte timeout so that infinitely hanging sockets are cleanly terminated with a TimeoutError, allowing the fallback chain to catch the failure and gracefully switch to the next model.
Related Issues
This is a sibling edge case to #29054 (which handles completed but empty text responses) and #29143, but specifically addresses hangs where the request never completes or throws a native HTTP error.
This issue might be a duplicate of existing issues. Please check:
OpenAI stream intermittently freezes in working state with high CPU and idle HTTPS socket #29129: Describes the same symptom — an established HTTPS socket that sits idle with no data arriving, causing the stream to hang indefinitely without timeout or recovery. That issue also documents the stall occurring after an LLM stream starts, with no further log activity for several minutes.
The issues #29054 (empty task output) and #29143 (infinite retry loop on provider failure) are related siblings but address different failure modes.
If you believe this was flagged incorrectly, please let a maintainer know.
Activity
github-actions commentedon May 27, 2026
This issue might be a duplicate of existing issues. Please check:
The issues #29054 (empty task output) and #29143 (infinite retry loop on provider failure) are related siblings but address different failure modes.
If you believe this was flagged incorrectly, please let a maintainer know.
niStee commentedon May 27, 2026
Good catch by the bot! Closing this as a duplicate of #29129.