[BUG] Windows startup Run registry value is written with escaped quotes, crashing Task Manager
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Claude desktop app on Windows writes its auto-start entry to
HKCU\Software\Microsoft\Windows\CurrentVersion\Run with an extra layer of quoting
and backslash-escaped inner quotes. Windows Task Manager's Startup-page parser
chokes on that value and dies with an access violation.
The actual value written (REG_SZ, 71 chars):
"\"C:\Users\<USER>\AppData\Local\AnthropicClaude\claude.exe\" --startup"
Because expanding Task Manager ("More details") initializes the Startup page,
Task Manager crashes instantly and is unusable in expanded mode for as long as
the entry exists. It is 100% reproducible, not intermittent.
Faulting stack from the minidump (%LOCALAPPDATA%\CrashDumps\Taskmgr.exe.*.dmp,
public symbols):
Taskmgr!WdcApplicationsMonitor::Update
-> Taskmgr!WdcStartupMonitor::DoEnumeration
-> Taskmgr!WdcStartupMonitor::_LoadStartupItems
-> Taskmgr!WdcStartupMonitor::LoadRegistryList
-> Taskmgr!WdcStartupMonitor::SetData
-> Taskmgr!TmGetDetailsFromCrudeCmdLine+0x56d <-- c0000005
TmGetDetailsFromCrudeCmdLine sees a leading quote, scans for the matching close
quote, and finds it two characters in (the \ and " of the leading "\"). The
resulting token offset/length is wrong and the following read goes out of bounds.
All 116 modules loaded in the crashed process are under C:\Windows -- no
third-party DLL is involved, so this is purely the registry data being fed to
the parser.
What Should Happen?
The Run value should be the raw command line, with quoting applied only to the
executable path -- matching every other entry in the same registry key
(OneDrive, Steam, etc.):
"C:\Users\<USER>\AppData\Local\AnthropicClaude\claude.exe" --startup
Task Manager should open and expand normally with Claude installed.
Error Messages/Logs
Faulting application name: taskmgr.exe, version: 10.0.19041.6280, time stamp: 0x805ae783
Faulting module name: taskmgr.exe, version: 10.0.19041.6280, time stamp: 0x805ae783
Exception code: 0xc0000005
Fault offset: 0x00000000000748a1
Faulting application path: C:\Windows\system32\taskmgr.exe
Report ID: 12d23d99-c847-493a-af68-4de68fec7a7e
Registry value in question (HKCU\Software\Microsoft\Windows\CurrentVersion\Run):
Claude = "\"C:\Users\<USER>\AppData\Local\AnthropicClaude\claude.exe\" --startup" <-- malformed
compared with its neighbours in the same key:
OneDrive = "C:\Program Files\Microsoft OneDrive\OneDrive.exe" /background
Steam = "E:\...\steam.exe" -silent
Steps to Reproduce
- Install the Claude desktop app on Windows 10 (this creates the malformed
"Claude" value under HKCU\Software\Microsoft\Windows\CurrentVersion\Run).
- Open Task Manager (Ctrl+Shift+Esc).
- Click "More details", or switch to the Startup tab.
- Task Manager crashes immediately with 0xc0000005. Repeats every single time.
Confirmed cause and fix: rewriting the value to the correctly-quoted form, or
deleting it, makes Task Manager work normally again. Uninstalling the app also
removes the value and Task Manager recovers.
Timeline evidence: 31 taskmgr crashes are recorded in the Application event log.
The earliest is ~25 minutes after the app was first installed, with zero
occurrences at any point before that.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude desktop app 1.24012.1 (installed at %LOCALAPPDATA%\AnthropicClaude)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
This is a bug in the Windows desktop app's installer/auto-start logic, not in
the CLI -- the template is CLI-oriented, so some dropdowns above don't really
apply.
Environment:
- Claude desktop 1.24012.1, install location %LOCALAPPDATA%\AnthropicClaude
- Windows 10 Pro 22H2, build 10.0.19045, x64, locale zh-CN (2052)
- taskmgr.exe 10.0.19041.6280
Suggested fix: when persisting the auto-start command to the registry, write the
raw command line rather than a JSON/shell-escaped string -- drop the outer quote
pair and the \" escaping. It would also be worth checking whether toggling
"launch at startup" in settings, or an app update, rewrites the bad value (users
who apply the manual fix will want to know if it comes back).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗