claude-code - 💡(How to fix) Fix [BUG] Run on startup never works on Windows: HKCU\...\Run\Claude value is double-quoted

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…

On Windows, the "Run on startup" toggle in Claude Desktop never works. The toggle appears to flip back to off after a restart, Claude does not launch at boot, and the app does not appear in Task Manager → Startup apps (not even as Disabled).

Error Message

Error Messages/Logs

Root Cause

Root cause (confirmed via registry inspection)

The app writes a malformed value to HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Claude.

Fix Action

Workaround

Manually rewrite the Run value with correct quoting via PowerShell:

Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'Claude' -Value '"C:\Users\<user>\AppData\Local\AnthropicClaude\claude.exe" --startup' -Type String

After this fix, Claude appears in Task Manager Startup and launches at next boot. However, toggling the setting in Claude's UI rewrites the broken value, so the fix must be re-applied after any toggle interaction.

Code Example

"\"C:\Users\<user>\AppData\Local\AnthropicClaude\claude.exe\" --startup"

---

"C:\Users\<user>\AppData\Local\AnthropicClaude\claude.exe" --startup

---

Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'Claude' -Value '"C:\Users\<user>\AppData\Local\AnthropicClaude\claude.exe" --startup' -Type String

---

Claude  : "\"C:\Users\Imri\AppData\Local\AnthropicClaude\claude.exe\" --startup"
Discord : "C:\Users\Imri\AppData\Local\Discord\Update.exe" --processStart Discord.exe --process-start-args --start-minimized

---
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?

Summary

On Windows, the "Run on startup" toggle in Claude Desktop never works. The toggle appears to flip back to off after a restart, Claude does not launch at boot, and the app does not appear in Task Manager → Startup apps (not even as Disabled).

Root cause (confirmed via registry inspection)

The app writes a malformed value to HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Claude.

Actual stored value:

"\"C:\Users\<user>\AppData\Local\AnthropicClaude\claude.exe\" --startup"

Expected value (compare to Discord, Steam, etc., in the same key, which work):

"C:\Users\<user>\AppData\Local\AnthropicClaude\claude.exe" --startup

The entire command is wrapped in an outer pair of "...", with the path's own quotes backslash-escaped (\") inside. The registry stores these as literal characters — backslash escapes are not unescaped at parse time. When Windows uses CreateProcess to launch the Run entry, it reads the first quoted segment as the executable, which resolves to literally \ (the two characters between the opening " and the next "). That fails silently — no event log entry, no Task Manager listing, no launch.

This looks like an Electron app.setLoginItemSettings() quoting bug — path plus args containing the path again, or similar — but I haven't dug into the app source.

Workaround

Manually rewrite the Run value with correct quoting via PowerShell:

Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'Claude' -Value '"C:\Users\<user>\AppData\Local\AnthropicClaude\claude.exe" --startup' -Type String

After this fix, Claude appears in Task Manager Startup and launches at next boot. However, toggling the setting in Claude's UI rewrites the broken value, so the fix must be re-applied after any toggle interaction.

Environment

  • OS: Windows 11 (build 26100)
  • Claude Desktop version: 1.7196.1
  • Architecture: x64

Evidence

PowerShell output comparing the broken Claude entry to a working Discord entry:

Claude  : "\"C:\Users\Imri\AppData\Local\AnthropicClaude\claude.exe\" --startup"
Discord : "C:\Users\Imri\AppData\Local\Discord\Update.exe" --processStart Discord.exe --process-start-args --start-minimized

What Should Happen?

Expected behavior

  • Run key value written without the outer quotes and without backslash escaping (matching the format Discord, Steam, etc. use).
  • Claude appears in Task Manager → Startup apps.
  • Claude launches at boot.
  • Toggle state persists across restarts.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

  1. Fresh Windows 11 install of Claude Desktop.
  2. Settings → General → toggle "Run on startup" on.
  3. Open regedit or run Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' -Name Claude — observe the value is wrapped in extra quotes with \" escaping.
  4. Open Task Manager → Startup apps — Claude is absent from the list entirely.
  5. Restart PC — Claude does not launch.
  6. Reopen Claude — the toggle in Settings now appears off.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

1.7196.1

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

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…

FAQ

Expected behavior

  • Run key value written without the outer quotes and without backslash escaping (matching the format Discord, Steam, etc. use).
  • Claude appears in Task Manager → Startup apps.
  • Claude launches at boot.
  • Toggle state persists across restarts.

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] Run on startup never works on Windows: HKCU\...\Run\Claude value is double-quoted