fix: raise the proxy idle timeout above Bun's 10s default - #9
Open
pocharlies wants to merge 1 commit into
Open
Conversation
Bun.serve defaults to a 10-second idle timeout. Claude Agent SDK turns routinely take longer than that — a cold start alone can spend more, between spawning the CLI and the model's first token — so the connection is dropped mid-turn. The failure is quiet from the host's side: the request ends without an error the caller can attribute to a timeout, which makes it look like the turn simply died. 255s is Bun's maximum for this option.
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.
Bun.servedefaults to a 10-second idle timeout. Claude Agent SDK turnsroutinely take longer than that — a cold start alone can exceed it between
spawning the CLI and the model's first token — so the connection is dropped
mid-turn.
The failure is quiet from the host's side: the request ends without an error
the caller can attribute to a timeout, so it reads as the turn simply dying.
That made it hard to spot; I only found it after patching the installed
dist/by hand and watching long turns stop failing.255s is Bun's maximum for this option.
Three lines, no behaviour change other than the timeout.
bun testpasses andtscis clean on this branch.