Skip to content

fix(windows): restart_claude_desktop — remove duplicate pre-lookup taskkill#140

Merged
iret77 merged 1 commit into
mainfrom
fix/windows-restart-claude-order
Jun 5, 2026
Merged

fix(windows): restart_claude_desktop — remove duplicate pre-lookup taskkill#140
iret77 merged 1 commit into
mainfrom
fix/windows-restart-claude-order

Conversation

@iret77

@iret77 iret77 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Codex audit of v0.4.40 → v0.4.46 flagged a regression in restart_claude_desktop: a duplicate taskkill /IM Claude.exe was added above the sysinfo-based path lookup at some point between v0.4.40 and v0.4.46. That kills Claude before sysinfo can read its executable path, so the lookup returns None and resolution silently falls back to the hardcoded %LOCALAPPDATA% candidates — defeating exactly the MSIX / Store / custom-install coverage we added in PR #128.

Removed the duplicate; the single post-lookup taskkill (with its "after capture" ordering comment) remains. New top-of-block comment records the regression so the duplicate can't slip back in.

Why now

Tester is waiting on a fresh NSIS. Without this fix, every Restart-Claude-Desktop click on a Store-installed Claude (or any custom path) falls back to "Claude Desktop nicht gefunden" — even though sysinfo would have seen the right path if the order were preserved.

Test plan

  • cargo check / clippy -D warnings / test --lib (98/98) — clean on macOS arm64
  • CI green on macOS arm64 + Windows x86_64
  • Windows tester: Restart-Claude-Desktop button now actually relaunches the Claude install they have, regardless of NSIS / Store / custom path

🤖 Generated with Claude Code

…skkill

Codex audit of v0.4.40 → v0.4.46 flagged a regression in
`restart_claude_desktop`: a second `taskkill /IM Claude.exe` call has
been duplicated *above* the sysinfo lookup that captures the running
binary's path. By the time the sysinfo branch ran, Claude was already
gone, the lookup returned `None`, and resolution fell through to the
hardcoded `%LOCALAPPDATA%` candidates — defeating exactly the MSIX /
Store / custom-install coverage we added in PR #128.

Fix: drop the leading taskkill block. The post-lookup taskkill that we
explicitly placed "after capture" remains, with its existing comment
spelling out the ordering contract. A new comment at the top of the
block records the history so this regression can't slip back in
unnoticed.

Verification (macOS arm64): cargo check / clippy `-D warnings` /
test --lib (98/98), all clean. No backend behaviour change on Mac.

Codex finding reference: SCOPE B / NICE-TO-HAVE / lib.rs:510.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@iret77 iret77 merged commit 147e8c6 into main Jun 5, 2026
3 checks passed
@iret77 iret77 deleted the fix/windows-restart-claude-order branch June 5, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant