[BUG] Run on startup never works on Windows: HKCU\...\Run\Claude value is double-quoted

Resolved 💬 2 comments Opened May 18, 2026 by PiKi42 Closed May 21, 2026

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?

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_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗