anthropics / anthropics/claude-code
Desktop app shows "process already open elsewhere" and quits — single-instance lock false positive
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
**Environment**
- OS: Windows 11 Pro 10.0.26200
- Claude Desktop version: 1.52386.6 (Electron 44.2.0)
- Install source: Microsoft Store (MSIX package, Claude_...pzs8sxrjxfjjc)
- Reproduced independently on 2 separate Windows machines
**Description**
The desktop app frequently shows an error along the lines of "this process is already
open somewhere else" (seen localized in pt-BR as "esse processo está sendo aberto em
outro lugar") and then quits, even when no other instance is actually running. This
happens repeatedly throughout normal use, on two different machines with the same
Store build.
**Expected behavior**
Electron's standard single-instance lock (`app.requestSingleInstanceLock()`) should
silently focus the existing window on a second launch attempt, not show a user-facing
error and quit.
**Diagnosis already ruled out on my end**
- No duplicate autostart: no Claude entry in HKCU Run key, Startup folder, or Task
Scheduler that could cause a double launch at boot.
- No orphaned/zombie processes: at the time of the error, all ~13 `claude.exe`
processes traced back to a single root process (launched once by explorer.exe),
with children matching normal Electron architecture (crashpad-handler, gpu-process,
network utility, 2 renderers, several node.mojom.NodeService utility processes for
Claude Code sessions, audio, video-capture). No second independent process tree.
- `%APPDATA%\Claude\lockfile` exists and is being rewritten on each launch/close cycle.
This points to the single-instance lock check itself producing a false positive
(possibly a race between the lock file being released on the previous exit and a new
launch attempt checking it), rather than an actual second instance or a
misconfiguration on the user's machine.
**Frequency**
Occurs often enough to be disruptive — multiple times per day on both machines.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with the Windows 11 Microsoft Store build, then inspect the Electron single-instance lock behavior and the %APPDATA%\Claude\lockfile across launch and close cycles. Compare the observed process tree with the app.requestSingleInstanceLock() expectation. Done means repeated normal launches no longer produce a false-positive error or quit when no independent instance is running.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100