Closed bug report

Restart to update hangs on "Restarting...": the updater waits forever on Claude threads that aren't running a turn

Colby Knox · 12d ago ·closed by John Lauer

Versions: ah 1.0.678 (build 5092a3a9, dirty) to 1.0.683 (insiders) · ab 2.1.185 (installed by ah at 09:36:50) · adom/core 4.15.3 · Windows

What I did: woke the PC this morning, saw the banner "Restart to update (1.0.678 → 1.0.683)", and clicked it.

Expected: Hydrogen relaunches on 1.0.683 within seconds.

What happened: the banner says "Restarting..." and stays there; 15+ minutes so far. Hydrogen is still running 1.0.678 (/updater/status: current_version 1.0.678, staged: true, staged_version 1.0.683). The installer in Temp is complete and matches the published SHA-256 (857968e2…f0a0).

Cause, from the log (%APPDATA%\hydrogen-desktop\hydrogen-desktop.log, excerpt attached):

09:39:12.510 [ai-threads] hook event #405: SessionStart (claude)
09:39:14.543 [ai-threads] hook event #406: SessionStart (claude)
09:39:20.046 [wake-heal] reload: editor reloaded: the adom-vscode extension host restarted
09:39:25.933 updater_install invoked (banner/UI)
09:39:26.560 [updater] staged installer for 1.0.680 failed its re-check (...): downloading again instead of running it
09:39:26.561 Downloading installer .../1.0.683/Adom.Hydrogen_1.0.683_x64-setup.exe -> ...\Temp\Adom.Hydrogen_1.0.683_x64-setup.exe
09:39:26.727 Staging installer .../1.0.683/Adom.Hydrogen_1.0.683_x64-setup.exe -> ...\Temp\Adom.Hydrogen_1.0.683_x64-setup.exe
09:39:27.233 SHA256 verified (857968e2...)
09:39:27.244 [updater] auto-install waiting: claude be6d5ed2; claude a5715cff (checks every minute)
09:39:27.377 Update 1.0.683 staged + verified, ready for instant apply
(then only heartbeats: no further [updater] line in 15+ minutes)
  1. The click is gated by the auto-install "wait for busy Claude threads" rule. The wait names two threads, and neither was running a turn. The editor's reload at wake restored this thread's panel (be6d5ed2: idle, no prompt until 09:54:26, when I started it after clicking update) and opened an empty one (a5715cff: no transcript, never prompted). Both counted as busy because a SessionStart with no Stop after it looks like a turn in progress. An empty panel never sends Stop, so the wait can never end.
  2. No feedback. The banner shows "Restarting..." with no reason, no thread names, and no "Restart anyway". The log promises "checks every minute" but never logs a re-check.
  3. Race (minor): the click's download_and_install and the background stager downloaded 1.0.683 to the same temp file at the same time (09:39:26.561 and .727). It verified this time, but two writers on one path can corrupt the installer.
  4. Possibly related: [cdp-gate] ai_tabs::spawn_ai_threads_sweeper held the gate for 53030s at 09:38:40 (overnight sleep). If the busy check reads thread state through that gate, a stuck holder could also keep it waiting.

Suggested fixes:

  • Busy means a turn in progress. Count a thread as busy only between a UserPromptSubmit and its Stop, not after a bare SessionStart. Also cap the wait, or re-check against the live tab list: a5715cff isn't even in /ai-threads.
  • A click is consent. Restart now, or at least turn the banner into "Waiting for 2 AI threads to finish: · Restart anyway".
  • Log each re-check of the wait.
  • Serialize the two downloads, or give them separate temp paths.

Workaround: quit Hydrogen from the tray and reopen it. The staged 1.0.683 applies on the next launch.

h-update-log.txt

3 Replies

Colby Knox · 12d ago

Update: now on 1.0.683, but the workaround I gave above was wrong.

What happened: quitting and reopening Hydrogen did not apply the staged update on launch:

09:58:08 === Hydrogen Desktop started ===        (still 1.0.678)
09:58:29.277 Staging installer .../1.0.683/... -> ...\Temp\Adom.Hydrogen_1.0.683_x64-setup.exe
09:58:29.987 Update 1.0.683 staged + verified, ready for instant apply
09:58:34.682 updater_install invoked (banner/UI)  (Colby clicked the banner again)
09:58:34.879 Applying staged update 1.0.683 ...
09:58:40.046 [exit] updater: applying staged update 1.0.683 and relaunching (hydrogen#70)
09:58:48 === Hydrogen Desktop started ===        (1.0.683)

Two follow-ups:

  • No apply on launch. The skill (and the banner's promise) says a staged update auto-applies on the next launch. Here 1.0.678 started normally and staged 1.0.683 a second time. It re-downloaded even though the verified installer from 09:39 was still in Temp, and it waited for another click.
  • The second click worked in 6 s. Right after a fresh start, no thread was counted as busy. That supports the cause above: the first click was stuck only on the "busy" threads that the wake reload had restored, which were not running a turn.
John Lauer · 10d ago

Colby, thanks for the log, it showed exactly where it hung. Two things were wrong:

  • Pressing Restart to update went through the same wait as an automatic update, which holds off while Claude is working. A click now restarts right away.
  • That wait also counted idle Claude panels as busy: a panel that had only started a session (restored after a reload, or a new empty tab) looked like a running turn forever. Now only a running turn counts, and only until it ends.

Both are in 1.0.688 and 1.0.689 (insiders now), with a test that pins your case. I'll close this once the build is public.

John Lauer · 9d ago

Both fixes are now public in Hydrogen 1.0.701: Restart to update applies right away when you press it, and idle Claude panels no longer count as busy for automatic updates. Everything else in this release: What's new in 1.0.701. Closing as promised.

John Lauer closed this · 9d ago

Log in to reply.