Windows Desktop App: File → Open Folder doesn't switch the working directory for new chat sessions

Resolved 💬 3 comments Opened Apr 22, 2026 by hkgq88-oss Closed Apr 26, 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?

Environment

OS: Windows 11 Pro
Claude Code Desktop App version: [fill in — check Help → About in the app]
Two project roots: D:\ProjectAlpha and D:\ProjectBeta, each with its own CLAUDE.md
Steps to reproduce

Launch the Claude Code Desktop App with project A loaded (D:\ProjectAlpha).
Without closing the app, use File → Open Folder and pick a different project (D:\ProjectBeta).
Start a new chat / session.
Expected

Primary working directory = D:\ProjectBeta
Only D:\ProjectBeta\CLAUDE.md auto-loads
Memory loads from C:\Users\<user>\.claude\projects\D--ProjectBeta\memory\
Actual

Primary working directory stays pinned to D:\ProjectAlpha
D:\ProjectAlpha\CLAUDE.md and its memory folder auto-load into the new chat
D:\ProjectBeta only appears as an additional working directory, not the primary
Workarounds tried (none worked)

Fully closing the app window and relaunching
Picking Open Folder before starting a new chat
/exit and Ctrl+D do nothing in the app's chat input
Impact

Can't cleanly switch between projects. Old project's CLAUDE.md + memory "leak" into the new project's context, which is confusing and wastes tokens. Particularly bad when each project has strict scope rules about which folder can be written to.

What Should Happen?

Proposed correct behavior

When a user picks File → Open Folder and then starts a new chat, the app should treat that folder as the primary working directory for that new session. Specifically:

Primary working directory
The new session's "Primary working directory" (shown in the environment block / status area) = the folder just opened.
Any previously opened folders drop off, or at most get demoted to "Additional working directories" the user can explicitly re-add.
CLAUDE.md loading
Only the CLAUDE.md at the root of the newly opened folder is auto-loaded.
CLAUDE.md files from previously opened projects do not leak into the new session.
Memory folder
Memory auto-loads from C:\Users\<user>\.claude\projects\<hash-of-new-folder>\memory\.
The old project's memory index (MEMORY.md) and its referenced memory files are not loaded.
UI clarity
The app's title bar or status area clearly shows the active primary folder's name/path, so a user can confirm at a glance which project is loaded.
If the user wants to keep a secondary folder accessible (read-only reference to another project), there should be an obvious way to add it as an "additional working directory" — but that should be opt-in, not the default.
Existing chats are unaffected
Switching folders applies only to new chats going forward. Any open chat that was started in the old folder keeps its original primary directory (so in-progress work isn't disrupted).
Session handoff clarity
If the user picks Open Folder while a chat is active, the app could show a prompt: "This will apply to your next chat. Start a new chat now?" — making the behavior explicit rather than silent.

Error Messages/Logs

No error messages

Steps to Reproduce

Prerequisites

Windows 11 with the Claude Code Desktop App installed.
Create two separate project folders, each with a distinctive CLAUDE.md:
D:\ProjectAlpha\CLAUDE.md — contains a line like # PROJECT ALPHA — this should load when ProjectAlpha is active
D:\ProjectBeta\CLAUDE.md — contains a line like # PROJECT BETA — this should load when ProjectBeta is active
Confirm each folder has its own memory directory already in use:
C:\Users\<user>\.claude\projects\D--ProjectAlpha\memory\MEMORY.md
C:\Users\<user>\.claude\projects\D--ProjectBeta\memory\MEMORY.md
Reproduction

Launch the Claude Code Desktop App from a cold start (no existing session). The app opens with D:\ProjectAlpha as the primary working directory (this was the last-used project).
Start a new chat. Ask the agent something like "What CLAUDE.md and memory files are currently loaded?" — confirm it lists D:\ProjectAlpha\CLAUDE.md and the ProjectAlpha memory folder. This is correct.
Without closing the app or exiting the chat, go to File → Open Folder and select D:\ProjectBeta.
Observe that the app's window content updates to show D:\ProjectBeta in the file tree / sidebar.
Start a new chat (click New Chat or equivalent).
In the new chat, ask "What is your primary working directory? Which CLAUDE.md and memory files are loaded?"
Observed result

The agent reports primary working directory = D:\ProjectAlpha (the OLD folder).
It says D:\ProjectAlpha\CLAUDE.md is loaded.
It says the ProjectAlpha memory folder is loaded.
D:\ProjectBeta shows up only as an additional working directory, not the primary.
Expected result

Primary working directory = D:\ProjectBeta.
Only D:\ProjectBeta\CLAUDE.md is auto-loaded.
Memory auto-loads from the D--ProjectBeta folder.
D:\ProjectAlpha is not referenced at all.
Additional attempts that also fail

  1. Fully close the app (including any tray icon), relaunch, pick File → Open Folder → D:\ProjectBeta before starting any chat, then start a new chat. Same wrong result — ProjectAlpha still loads as primary.
  2. Typing /exit or pressing Ctrl+D in the chat input does nothing (doesn't close the chat or allow a clean session restart).

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Prerequisites Windows 11 with the Claude Code Desktop App installed. Create two separate project folders, each with a distinctive CLAUDE.md: D:\ProjectAlpha\CLAUDE.md — contains a line like # PROJECT ALPHA — this should load when ProjectAlpha is active D:\ProjectBeta\CLAUDE.md — contains a line like # PROJECT BETA — this should load when ProjectBeta is active Confirm each folder has its own memory directory already in use: C:\Users\<user>\.claude\projects\D--ProjectAlpha\memory\MEMORY.md C:\Users\<user>\.claude\projects\D--ProjectBeta\memory\MEMORY.md Reproduction Launch the Claude Code Desktop App from a cold start (no existing session). The app opens with D:\ProjectAlpha as the primary working directory (this was the last-used project). Start a new chat. Ask the agent something like "What CLAUDE.md and memory files are currently loaded?" — confirm it lists D:\ProjectAlpha\CLAUDE.md and the ProjectAlpha memory folder. This is correct. Without closing the app or exiting the chat, go to File → Open Folder and select D:\ProjectBeta. Observe that the app's window content updates to show D:\ProjectBeta in the file tree / sidebar. Start a new chat (click New Chat or equivalent). In the new chat, ask "What is your primary working directory? Which CLAUDE.md and memory files are loaded?" Observed result The agent reports primary working directory = D:\ProjectAlpha (the OLD folder). It says D:\ProjectAlpha\CLAUDE.md is loaded. It says the ProjectAlpha memory folder is loaded. D:\ProjectBeta shows up only as an additional working directory, not the primary. Expected result Primary working directory = D:\ProjectBeta. Only D:\ProjectBeta\CLAUDE.md is auto-loaded. Memory auto-loads from the D--ProjectBeta folder. D:\ProjectAlpha is not referenced at all. Additional attempts that also fail 7. Fully close the app (including any tray icon), relaunch, pick File → Open Folder → D:\ProjectBeta before starting any chat, then start a new chat. Same wrong result — ProjectAlpha still loads as primary. 8. Typing /exit or pressing Ctrl+D in the chat input does nothing (doesn't close the chat or allow a clean session restart).

Platform

Other

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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