Repository navigation
fix(tui): disable Bun fetch's 5-min idle timeout on long turns and SSE (MET-610) - #602
Merged
Merged
Conversation
…d SSE stream (MET-610) The forge binary is compiled with Bun, whose fetch silently ignores the undici dispatcher (so the MET-590 45-min timeout never applied) and aborts any connection idle for 300s with 'The operation timed out.' — exactly what a synchronous turn POST looks like. Pass Bun's timeout:false on the turn POST and the SSE stream, keep the AbortSignal ceiling + Node dispatcher, and raise the client idle watchdog to 10 min (the codex lane streams no tokens, so long model calls are legitimately silent). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
send: The operation timed out.failure on long chat turns (kitchen-shelf threadab85747f, monitor-build before it): the forge binary is compiled withbun build --compile, and Bun's fetch ignores the undicidispatcher— the 45-min timeout Agent from MET-590 never applied at runtime. Bun instead applies its own default 5-minute idle timeout (oven-sh/bun#6217): a synchronous turn POST receives zero response bytes until the turn settles, so Bun aborts at ~300s with the exact observed error string. Verified against live timestamps: turn start 07:29:44Z, client abort 07:35:06Z (~322s), while the server-side session capture shows the agent mid-work at 07:35:00.timeout: falseopt-out on the long-turn POST and the thread SSE stream (Node's fetch ignores the unknown option; the undici dispatcher stays for Node dev runs, and the 45-minAbortSignal.timeoutceiling still applies — that API works under Bun).Test plan
npm run typecheckcleannpm test91/91, including two new regression tests pinningtimeout: falseonsendMessage(plus dispatcher + ceiling signal retained) and onstreamThreadnpm run bundle:bincompiles; binary installed locally for live soak on the next long CAD turn🤖 Generated with Claude Code