[BUG] Pointless timeout prevents updates over slow internet connections
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When trying to update Claude Code on a slow[^1] but otherwise functioning internet connection, the update will time out due to a pointless 10-minute timeout applied to the time it takes to download the binary.
What Should Happen?
There shouldn't be a timeout on the download itself. So long as bytes are flowing, that means it will eventually manage to download the thing and there is no reason to abort the download just because it's slow. The only timeout should be for cases when there's no progress _at all_, which would suggest something is wrong.
Error Messages/Logs
$ claude update
Current version: 2.1.237
Checking for updates to latest version...
Updating to 2.1.241...
Error: Failed to install native update
TelemetrySafeError: Download timed out: exceeded the total deadline
Try running "claude doctor" for diagnostics
Steps to Reproduce
- Be on a slightly outdated Claude Code version.
- Have a sufficiently slow[^1] internet connection, i.e. much less than is required to download the new binary within 10 minutes.
- Run
claude update, thus starting the download. - Wait 10 minutes for the download to time out.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.237
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
NOTE: I checked "I am using the latest version of Claude Code" despite being on a slightly older one (2.1.237), because I obviously can't test its update functionality if I'm on the latest version already! Given the lack of other issues about this, I'm just going to assume this hasn't been fixed in more recent versions either.
Workarounds
- Claude found out that setting the
CLAUDE_CODE_DOWNLOAD_DEADLINE_MS_FOR_TESTINGenv var to a sufficiently large value (e.g.3600000= one hour, enough time to download the 2.1.241 340 MB binary over a ~0.75 Mbit/s connection) lets the update proceed. - As the name implies, this is clearly a testing/debug feature and not meant for end users, can be removed at any time etc. Hence no replacement for actually removing the timeout.
Related issues and why this isn't a duplicate of them
- https://github.com/anthropics/claude-code/issues/86970
- Same underlying issue but they frame it from the perspective of not wasting metered bandwidth and are also asking for more features like resume functionality or whatever. Whereas I'm just asking for the pointless time limit to be removed.
- https://github.com/anthropics/claude-code/issues/88834
- Similar issue for the installer. I haven't looked into it but given that there is such a timeout on the update download, it's not unreasonable to believe that the installer has it too. And the original installation was in fact timing out for me as well until I switched to a faster internet connection, so that's probably it.
- https://github.com/anthropics/claude-code/issues/78435
- Kind of the same underlying issue; the connection speeds shown in the screenshot are above the threshold determined in this issue, but see my comment for how this might come about anyway.
- However, that ticket is framed in terms of constant retries. Whereas I don't care if it keeps retrying e.g. if the connection is in fact flaky, all I care about in this ticket is that it finishes the download on slow-but-not-flaky connections.
- https://github.com/anthropics/claude-code/issues/79942
- Is about multiple simultaneous downloads similar to #78435, asks for a lock which is already implemented but buggy; see my comment for details.
- https://github.com/anthropics/claude-code/issues/66751
- Is about the same underlying phenomenon and mentions the timeout, but again has all kinds of other issues and feature requests mixed together. Still probably incorrectly closed.
- https://github.com/anthropics/claude-code/issues/85046
- Same underlying issue, asks for different things as fixes.
Footnotes
[^1]: The exact threshold depends on the current binary size: at version 2.1.241, the binary download was ~340 MB, so with the 10 minute timeout the minimum required bandwidth was ~558 KB/s ≈ 4.5 Mbit/s. The binary size has been reduced to ~75 MB in 2.1.243, so it's now lower. But the basic issue itself still exists.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗