anthropics / anthropics/claude-code

[Bug] Claude Desktop loses Local environment after Windows reboot

Open
#95,498 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:desktop bug platform:windows
Dominant language
TypeScript
Stars
146k
Forks
23.8k
PR merge metrics
PR metrics pending

Description

**Bug Description**
# [Windows] Claude Desktop loses the Local environment after every reboot; Code tab falls back to the web surface and asks me to download Claude Desktop

## Preflight Checklist

- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Desktop / Claude Code

## Summary

After every reboot (or full quit and relaunch), the Claude Desktop app on Windows starts in a broken state. The Code tab renders the `claude.ai/code` web surface instead of the native local UI:

- **Local** is either missing from the environment picker or greyed out as `Download` / `Desktop only`. The desktop app tells me to download the desktop app I am running.
- Only **Remote Control** (a session registered from another machine) and **Cloud** can be selected.
- Local sessions do not appear in the list.

A clean reinstall restores Local. **The next reboot breaks it again.** Reproduced on every reboot since at least 2026-09-10, most recently 2026-09-18.

## Reproduction

1. Clean-install Claude Desktop (MSIX package `Claude_pzs8sxrjxfjjc`).
2. Launch it. Code tab → environment picker → **Local** is available, and local sessions are listed. ✅
3. Reboot Windows, or fully quit the app from the tray and relaunch.
4. Code tab → environment picker → **Local is absent or shows `Download`.** Only Remote Control and Cloud remain. ❌

Reproducibility: 100%, on every reboot.

## Expected

Local stays available across restarts, the same as it is right after installing.

## Observations

- **Session data survives on disk.** The local sessions are still under `~/.claude/projects`, and `claude --resume` in the CLI recovers them. The app just stops offering Local after a restart.
- **Remote Control is unaffected.** RC sessions from another machine (a WSL2 box) stay reachable in the broken state. Only features that need the app's bundled local runtime fail.
- `%APPDATA%\Claude\claude-code-sessions` was missing in the broken state. The MSIX-virtualized store under `%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\` exists and holds recent writes.
- Sometimes the broken state also comes with repeated login prompts. Completing login opens a browser tab that tries to reconnect and then hangs.

## Workaround

Run local sessions from the terminal (`claude --resume`), then use `/rc` so they show up alongside remote sessions in the app's Remote Control list. The session drops when the terminal closes, so this is not a real substitute for Local.

## Environment

- OS: Windows 10 22H2
- Claude Desktop: MSIX `Claude_pzs8sxrjxfjjc`, version 1.49585.0.0 (unchanged since at least 2026-09-10)
- Claude Code CLI: 2.1.268
- Also in use: Remote Control session from a WSL2 machine

**Environment Info**
- Platform: win32
- Terminal: null
- Version: 2.1.268
- Feedback ID: b0f95c35-63ce-4333-a4dc-3f1171abb86f

**Errors**
```json
[]
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure from the Code tab after a Windows reboot or full tray quit, then compare the expected Local environment with the broken state. Inspect the mentioned session locations under %APPDATA%\Claude\claude-code-sessions and the MSIX LocalCache path, and use `claude --resume` to verify session data remains available. Done means Local stays available after restart and local sessions appear in the app without reinstalling.

Written by the indexing model from the issue text.

Assessment

Domain
cli, desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.