claude-code - 💡(How to fix) Fix Desktop app loses default working directory between sessions [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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…
GitHub stats
anthropics/claude-code#46176Fetched 2026-04-11 06:27:07
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3cross-referenced ×2commented ×1

The Claude Code desktop app no longer remembers the working directory between sessions. Previously (as of April 9, 2026), opening a new conversation in the desktop app would default to the last-used project folder. After an update, it now defaults back to the home directory (~).

Root Cause

The Claude Code desktop app no longer remembers the working directory between sessions. Previously (as of April 9, 2026), opening a new conversation in the desktop app would default to the last-used project folder. After an update, it now defaults back to the home directory (~).

Fix Action

Fix / Workaround

  • localAgentModeTrustedFolders and dispatchTrustedCodeWorkspaces are set in claude_desktop_config.json but don't influence the default working directory
  • window-state.json stores window geometry but no working directory
  • Session data in claude-code-sessions/ appears to store per-session paths, but this doesn't persist across app restarts/updates
RAW_BUFFERClick to expand / collapse

Description

The Claude Code desktop app no longer remembers the working directory between sessions. Previously (as of April 9, 2026), opening a new conversation in the desktop app would default to the last-used project folder. After an update, it now defaults back to the home directory (~).

Expected behavior

The desktop app should remember the last-used working directory (or allow setting a default project folder) so users don't have to re-select it every time they start a new conversation.

Current behavior

Every new conversation starts at ~ (home directory), requiring manual folder selection via the UI each time.

Configuration context

  • localAgentModeTrustedFolders and dispatchTrustedCodeWorkspaces are set in claude_desktop_config.json but don't influence the default working directory
  • window-state.json stores window geometry but no working directory
  • Session data in claude-code-sessions/ appears to store per-session paths, but this doesn't persist across app restarts/updates

Environment

  • macOS (Darwin 25.3.0)
  • Claude Code desktop app (latest as of April 10, 2026)
  • CLI version works correctly (inherits cwd from terminal)

Suggestion

Either persist the last-used working directory across sessions, or add a defaultWorkingDirectory config key to claude_desktop_config.json.

extent analysis

TL;DR

The most likely fix is to modify the Claude Code desktop app to persist the last-used working directory across sessions or add a configuration option for a default working directory.

Guidance

  • Investigate the claude-code-sessions/ directory to determine why the per-session paths do not persist across app restarts or updates.
  • Consider adding a defaultWorkingDirectory key to claude_desktop_config.json to allow users to set a default project folder.
  • Review the code responsible for setting the initial working directory in new conversations to understand why it defaults to the home directory (~) instead of the last-used project folder.
  • Check if there are any existing issues or pull requests related to persisting the working directory across sessions.

Example

No code snippet is provided due to lack of specific implementation details.

Notes

The solution may require modifications to the Claude Code desktop app's configuration handling or session management code. The localAgentModeTrustedFolders and dispatchTrustedCodeWorkspaces settings do not appear to influence the default working directory.

Recommendation

Apply a workaround by adding a defaultWorkingDirectory key to claude_desktop_config.json to allow users to set a default project folder, as this is a simpler change that can be implemented while a more permanent solution is developed.

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

The desktop app should remember the last-used working directory (or allow setting a default project folder) so users don't have to re-select it every time they start a new conversation.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING