Skip to content

v0.10.1 — Fix UI freeze on wake from sleep

Choose a tag to compare

@ZeuLeg ZeuLeg released this 04 Jun 04:45
· 47 commits to main since this release

Bug fix

Tray menu unresponsive after wake from sleep — fixed.

After waking from a long sleep, the OAuth token is always expired. The token refresh code (claude auth status → claude update) used a synchronous WaitForExit call that blocked the WinForms UI thread for up to 75 seconds. During this time the tray menu appeared to open but clicks were silently queued and never processed. Closing and reopening the app resolved it because the token had been refreshed.

Root cause: TokenRefresher.RunClaudeAsync called the blocking proc.WaitForExit(timeoutMs) from the UI thread (timer callback path). No await yielded control back to the message loop during that wait.

Fix: Replaced WaitForExit with await proc.WaitForExitAsync(linkedCts.Token), using a CancellationTokenSource.CancelAfter for the timeout. Both stdout and stderr pipes are drained concurrently so child processes never stall on a full buffer. On timeout, Kill(entireProcessTree: true) cleans up any spawned child processes.

Also warms up ClaudeCodeInfo.Version off the UI thread at startup, eliminating a secondary 3-second block on the very first poll.