Native updater hangs on subsequent runs after install_failed leaves 0-byte staged version file — no cleanup or validation of corrupt state

Status Open
Reported on v2.1.226
Maintainer reply None cached
Activity 0 comments · opened Aug 11, 2026

Summary

A failed native update (install_failed) leaves corrupt state on disk — a 0-byte staged version file in ~/.local/share/claude/versions/ and a partial download in ~/.claude/downloads/ — and every subsequent claude update run then hangs indefinitely instead of detecting the corrupt leftovers, cleaning them up, and retrying. Manually deleting the two files immediately fixes it: the next claude update completes normally in under a minute.

Related to #77094 (no stall timeout on the download itself), but this is a distinct failure mode: it's not the network stalling — it's the updater never recovering from its own failed prior attempt.

Environment

  • Claude Code 2.1.226 updating to 2.1.227, native install (~/.local/bin/claude~/.local/share/claude/versions/…)
  • Linux x64 (kernel 7.0.0-28-generic)
  • 100+ GB free disk, no proxy
  • Auto-updates enabled, channel: latest

What happened

  1. An update attempt to 2.1.227 failed. claude doctor reported: Last update attempt: failed (install_failed) — 2026-08-11
  2. It left behind:
  • ~/.local/share/claude/versions/2.1.2270 bytes (a real install is ~300 MB; 2.1.226 alongside it is 297 MB)
  • ~/.claude/downloads/claude-2.1.227-linux-x641.3 MB partial download
  1. From then on, claude update hung with no progress, no timeout, and no error message. claude doctor reported "No installation issues found" despite the corrupt staged file.

Workaround

rm ~/.local/share/claude/versions/2.1.227          # 0-byte staged file
rm ~/.claude/downloads/claude-2.1.227-linux-x64    # partial download
claude update                                       # now succeeds

After cleanup, the same claude update completed the full ~304 MB download and installed 2.1.227 successfully on the first try.

Expected behavior

  • The updater should validate staged version files (a 0-byte file for a ~300 MB binary is trivially detectable) and discard/redownload rather than hanging.
  • A failed install should clean up its staged file and partial download, or the next attempt should treat them as invalid.
  • claude doctor should flag a 0-byte file in versions/ as an installation issue instead of reporting "No installation issues found".

View original on GitHub ↗