claude-code - 💡(How to fix) Fix [BUG] Claude desktop on Windows autorun incorrect registry entry [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51693Fetched 2026-04-22 07:55:24
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2unlabeled ×1

Error Message

Claude Desktop for Windows is writing incorrect data to the Windows registry, preventing it from autorunning at startup. It's creating invalid data in the following location: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run in the Claude entry, it's adding the following data: "\"C:\Users\John Doe\AppData\Local\AnthropicClaude\claude.exe\" --startup" Maybe because there's a space in the account name? If the error is not corrected, not only does Claude not autorun at startup, but worse, it prevents access to any App settings in ALL Windows App!

Error Messages/Logs

Root Cause

Claude Desktop for Windows is writing incorrect data to the Windows registry, preventing it from autorunning at startup. It's creating invalid data in the following location: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run in the Claude entry, it's adding the following data: "\"C:\Users\John Doe\AppData\Local\AnthropicClaude\claude.exe\" --startup" Maybe because there's a space in the account name? If the error is not corrected, not only does Claude not autorun at startup, but worse, it prevents access to any App settings in ALL Windows App!

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Desktop for Windows is writing incorrect data to the Windows registry, preventing it from autorunning at startup. It's creating invalid data in the following location: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run in the Claude entry, it's adding the following data: "\"C:\Users\John Doe\AppData\Local\AnthropicClaude\claude.exe\" --startup" Maybe because there's a space in the account name? If the error is not corrected, not only does Claude not autorun at startup, but worse, it prevents access to any App settings in ALL Windows App!

What Should Happen?

The correct data should be: "C:\Users\John Doe\AppData\Local\AnthropicClaude\claude.exe" --startup

Error Messages/Logs

Steps to Reproduce

On Windows, log in to an account that has spaces in the user name (it may still work without spaces in the user name), for example, John Doe. Enable the "Run on startup" option in File -> Settings -> General, if it's already enabled, disable it, then re-enable it, then restart Windows.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude for Windows v1.3561.0 (fbc74b)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

No response

extent analysis

TL;DR

The issue can likely be fixed by properly escaping or quoting the path to the executable in the Windows registry entry to handle spaces in the user name.

Guidance

  • Verify that the issue is indeed caused by the space in the user name by testing with an account that has no spaces in its name.
  • Check the code responsible for writing to the Windows registry to ensure it correctly handles paths with spaces, potentially by using proper quoting or escaping.
  • Consider using the Windows API to write to the registry instead of manually constructing the registry path to avoid such issues.
  • Test the fix by disabling and re-enabling the "Run on startup" option and then restarting Windows to see if Claude correctly autoruns.

Example

No specific code example can be provided without knowing the exact codebase, but ensuring that paths are properly quoted or escaped when writing to the registry is key. For example, using "\"C:\\Users\\John Doe\\AppData\\Local\\AnthropicClaude\\claude.exe\" --startup" might help, but the actual solution depends on how the string is being used and interpreted.

Notes

The issue seems to be related to how the path is written to the registry, specifically how spaces in the path are handled. Without access to the code, it's difficult to provide a precise fix, but ensuring proper path handling should resolve the issue.

Recommendation

Apply a workaround by manually correcting the registry entry to properly quote the path, as this is a regression and the previous version worked correctly. This will at least provide a temporary solution until the underlying code issue can be addressed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Claude desktop on Windows autorun incorrect registry entry [1 participants]