[BUG] Claude Desktop: primary working directory locked to a different folder than the one selected when opening a session

Resolved 💬 3 comments Opened May 6, 2026 by CkodSa Closed May 10, 2026

What's Wrong?

In Claude Desktop (macOS), there is no way to set the primary working directory of a new session to the folder I actually want to work in. When I try to open a session for one project folder, a different folder is forced as the primary cwd, and the folder I selected ends up only as an "additional working directory" — visible to tools, but not the real cwd.

In my case the symptom is: I want to open a session in ~/Documents/sites/peugeot, but every new session opens with ~/Documents/admin-module as the primary cwd and ~/Documents/sites/peugeot only attached as an additional working directory. The session's environment header confirms this:

Primary working directory: /Users/.../Documents/admin-module
Additional working directories:
  - /Users/.../Documents/sites/peugeot

The user-facing problem is that the primary cwd cannot be changed from the UI. Tools that key off cwd (e.g. Claude Preview's preview_start, which reads .claude/launch.json from the primary cwd, and any model behavior that pivots on the primary directory) end up operating on the wrong project. From inside a session there is no way to fix it — --add-dir-style "additional directories" exist but there is no equivalent mechanism for changing the primary cwd, and the Desktop UI does not appear to expose one either.

I have two related project folders (a template and a per-site instance copied from it). Once Desktop has decided one is "the" project, opening the other from the picker keeps the first as primary.

What Should Happen?

When I pick a folder in Claude Desktop's project picker / "Open Folder" / new-session flow, that folder should become the primary working directory of the new session. Other folders should only be attached as additional working directories if I explicitly add them.

At minimum, the UI should let me see and change the primary cwd before/at session start, so I'm not stuck with the wrong one.

Steps to Reproduce

  1. Have two project folders on disk, e.g. ~/projA and ~/projB. (projB being a copy/derivative of projA may or may not matter — needs verification.)
  2. Open projA in Claude Desktop and use it for a while (so it becomes the "remembered" project).
  3. From Claude Desktop, try to open a new session in projB (via the project picker / open folder UI).
  4. In the new session, ask the assistant or check the env header for the primary working directory.
  5. Observed: primary cwd is projA; projB is attached as an additional working directory.
  6. Expected: primary cwd is projB.

I have not yet been able to find a UI control that changes the primary cwd, hence the report.

Environment

  • Claude Desktop (macOS) — Claude.app 1.6259.1
  • Bundled claude-code: 2.1.128
  • macOS: Darwin 25.4.0 (arm64)
  • Entry point: claude-desktop (per session metadata in ~/.claude/sessions/*.json)

Notes / Workarounds tried

  • Cleaning up cross-project references in .claude/launch.json files so neither project's launch config cds into the other folder. This avoids one source of cross-pollution but does not fix the underlying Desktop bug — the primary cwd is still forced to the wrong folder when opening a new session from the picker.
  • The only reliable workaround is launching the bundled CLI directly from a terminal with cd <correct folder> && claude, bypassing the Desktop project picker entirely. This is not discoverable for users who installed Claude via the Desktop app, since no claude binary is placed on PATH by default.

View original on GitHub ↗

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