Claude Code Installer Downloads the Executable Twice
A Juejin analysis reports that Claude Code’s installation script first downloads the executable with curl, then invokes its install subcommand, which downloads the complete package again. The article cites anthropics/claude-code issue #106436, where a reported 120KB/s DSL connection caused the second download to hit the installer’s hard deadline, and says the issue remained open on November 1, 2026. It recommends downloading and reviewing the script first, then manually retrieving the executable with resumable transfers, proxy settings, or an offline package as appropriate.
The report identifies a concrete installation failure affecting Claude Code deployments on slow or constrained networks and provides ways to make package retrieval resumable or otherwise controlled.
脚本把同一个文件下了两遍
顺着这条报错去看安装脚本,机制并不复杂,反直觉的恰恰在这一步。脚本先用 curl 把 Claude Code 的可执行体下到本机的 binary_path,然后执行 "$binary_path" install。坑藏在这个 install 子命令里:它会把刚下过的整包再下一遍。也就是说一次安装,网络要完整地传同一个文件 2 遍。
这段机制有据可查。经本地复核 anthropics/claude-code 的 issue #106436:报障人 2026-10-31 18:02 提交,正文标注 Claude Code 版本 v2.1.314,截至 2026-11-01 状态仍 open。他复现用的是一条 120KB/s 的 DSL 慢线——第一遍下完,第二遍整包撞上脚本内置的 hard deadline,安装当场失败。按这条带宽算,同一个可执行体完整传 2 遍,下载时间直接 ×2;而脚本的 total deadline 是按「快速」网络设定的,慢线上第二遍根本到不了终点,超时是必然而非偶然。
这条 bug 的来龙去脉能凑齐 3 个 issue 印证同一根因。据 @mkbrewer 在 #89262 的评论(2026-10-31 22:47),它连更新都会触发,不止首次安装;再往前,同类的「安装超时」#88834 已于 2026-10-15 10:20 被以「另开 issue」关掉。三个 issue、横跨 16 天,指向的始终是同一个设计:第二次整包下载。