Repository navigation
Wait 90 s before closing a silent turn - #190
Merged
Merged
Conversation
Claude Code announces a retry after a stalled API connection at about the 60 s mark, and on the maintainer's machine 7 of 51 stream timeout closes came 0 to 2 s before that announcement could hold the watchdog. The default goes to 90 s; CLAUDE_CODE_RESULT_FALLBACK_MS still overrides it (h #g318).
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.
The wire-inactivity watchdog now waits 90 s instead of 60 before closing a turn whose CLI went silent after producing output (h #g318).
Why
v0.73.4 made the watchdog wait out a retry Claude Code announces, but only when the announcement arrives before the window runs out. Measured on the maintainer's machine (opencode.db plus both config dirs' Claude Code transcripts, September to today):
stream timeoutnote, about four a week.api_errorrecord: the CLI gave up on a stalled connection (Connection error., 288 of 292 such records) at about the moment the 60 s window ran out, so a turn that would have retried was cut off.A stalled connection is not machine-specific (VPN, Wi-Fi, proxies), so the default changes for everyone. The cost: a CLI that is alive but wedged is closed 30 s later.
Change
resolveResultFallbackMsdefaults to 90,000 ms.CLAUDE_CODE_RESULT_FALLBACK_MSstill overrides it, so no new option.test/result-fallback.test.tspins the default and the override.Not covered
The other 40 closes had no retry behind them and are not diagnosed yet.
Checks
npm run typecheck,npm test(2,323 pass),npm run build.