[BUG] Claude Code in Claude Desktop fails to work with local projects (macos)

Status Closed — not planned
Maintainer reply None cached
Activity 7 comments · opened Apr 2, 2026 · closed Jun 12, 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?

What's Wrong?
Bug Report: Claude Code in Claude Desktop - Failed to Load Session (Local Sessions)
Summary

Claude Code in Claude Desktop fails to work with local projects. Sessions get stuck on "Starting Claude..." or "Failed to load session". The issue is specific to local file access - GitHub integration via web works fine, and CLI version works fine.
Environment

Platform: macOS (Darwin)
Device: MacBook Pro
Claude Desktop: Reinstalled fresh on 2026-01-26
Claude Code CLI: v2.1.19 (works correctly)
Account: Claude Max subscription

Problem Description

Opening Claude Code in Claude Desktop and connecting to a local folder
Asking any question results in endless "thinking" state
Asking additional questions triggers "Failed to load session" error
Even the simplest prompts do not work
"Downloading dependencies" gets stuck indefinitely

What works:

Claude Desktop (regular chat) - ✅ Works
Claude Code via web browser (claude.ai/code) - ✅ Works
Claude Code with GitHub integration - ✅ Works
Claude Code CLI locally - ✅ Works

What doesn't work:

Claude Code in Desktop app with local folders - ❌ Fails

Error from Logs

~/Library/Logs/Claude/main.log:

2026-01-26 19:02:38 [error] [LocalSessionManager] Error getting git diff: Error: /Applications/Claude.app/Contents/Helpers/disclaimer exited with code 128: fatal: Unable to read current working directory: Operation not permitted

2026-01-26 19:02:38 [error] Session local_4168b3d9-579e-4899-b8cd-43ca82fcaa33 query error: Claude Code process exited with code 1

Troubleshooting Steps Attempted

  1. Basic Restart

Restarted Claude Desktop multiple times
Result: ❌ No change

  1. Kill All Processes

pkill -f Claude

Result: ❌ No change

  1. Clear Session Storage

rm -rf ~/Library/Application\ Support/Claude/Session\ Storage/
rm -rf ~/Library/Application\ Support/Claude/claude-code-sessions/
rm -rf ~/Library/Application\ Support/Claude/local-agent-mode-sessions/

Result: ❌ No change

  1. Clear All App Data

rm -rf ~/Library/Application\ Support/Claude/

Result: ❌ No change

  1. Complete Reinstall

Deleted ~/Library/Application Support/Claude/
Moved Claude.app to trash
Downloaded fresh from claude.ai/download
Reinstalled
Result: ❌ No change

  1. Network Tests

curl -I https://api.anthropic.com

Result: HTTP/2 404 (expected)

curl -I https://statsig.anthropic.com

Result: HTTP/2 403

No VPN in use
Regular internet works fine

  1. macOS Permissions

Checked Files & Folders permissions - Claude had access
Added Claude to Full Disk Access
Restarted app after permission changes
Result: ❌ No change

  1. Clear VM Bundle

rm -rf ~/Library/Application\ Support/Claude/claude-code-vm/

Result: ❌ App stuck on "Downloading dependencies"

  1. CLI Test

cd ~/Documents/ai\ projekt
claude

Result: ✅ Works perfectly - can ask questions and work with local files

Observations

Multiple "claude" entries in macOS Files & Folders permissions (CLI versions + Desktop)
Status page shows "Increased rate of errors for Opus 4.5" incident on 2026-01-25
Log error specifically mentions "Operation not permitted" for git operations
The issue persists despite Full Disk Access being granted

Suspected Cause

The Claude Desktop app cannot access local directories for git operations, despite having:

Files & Folders permissions
Full Disk Access

The error "Operation not permitted" suggests a deeper macOS sandboxing or entitlement issue within the Electron app that is not present in the CLI version.
Workaround

Use Claude Code CLI instead:

claude

This works correctly with local files.
Request

Please investigate:

Why the Desktop app cannot perform git operations locally while CLI can
The "Downloading dependencies" stuck state after clearing claude-code-vm
Potential macOS sandboxing/entitlement issues in the Electron app

Additional Info

User location: Helsingborg, Sweden
Date: 2026-01-26
Willing to provide additional logs or information if needed

What Should Happen?

Claude code should respond to my questions
Error Messages/Logs

Steps to Reproduce

se above
Claude Model

Opus
Is this a regression?

Yes, this worked in a previous version
Last Working Version

latest version
Claude Code Version

latest version
Platform

Other
Operating System

macOS
Terminal/Shell

Other
Additional Information

No response``

What Should Happen?

Claude code should respond to my questions

Error Messages/Logs

2026-04-01 23:51:46 [error] [REACT_QUERY_CLIENT] QueryClient error: Error: Not found
2026-04-01 23:51:48 [warn] ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.
2026-04-01 23:55:32 [error] [LOCAL_SESSION] Failed to send message [object Object]
2026-04-01 23:56:34 [error] [LOCAL_SESSION] Failed to send message [object Object]

Steps to Reproduce

see above

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude 1.2.234 (2d1855) 2026-04-01T07:58:22.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

7 Comments

skudjon · 4 months ago

Hey there @dfw-ai .

this helped me and it is working since the latest update. Cleares the cache and settings so check after your preferred settings.

npm uninstall -g @anthropic-ai/claude-code
rm ~/.claude.json
rm -rf ~/.claude/
curl -fsSL https://claude.ai/install.sh | bash # macOS/Linux

dstyvsky · 4 months ago

dfw-ai issue is still present for me. skudjon fix did not work for me. Since latest Claude update, instead of no response, I do get an error back from Claude Code in the Desktop Application, "Claude Code process exited with code 1"

MCanMan · 4 months ago

+1 — same issue on macOS, confirmed resolved by full reinstall including TCC cleanup.

Environment

  • macOS (Apple Silicon)
  • Claude Desktop: affected version 2.1.104 → 2.1.111 (broken, showed as partially installed with grey icon)
  • Claude Code CLI: worked fine throughout
  • VS Code extension: worked fine throughout
  • Account: Claude Max

Symptoms

  • Code mode in Desktop app stuck on "Thinking..." indefinitely (timer counts up, no response)
  • Happened for every prompt, every project, every model
  • CLI and VS Code extension on same machine: fully functional
  • Issue started right after an auto-update on 2026-04-16

Root cause (in my case)
Multiple stale Claude installations + leftover TCC permission entries:

  • Two Claude.app versions on disk (current + orphaned update backup in Applications)
  • Three separate Claude entries in System Settings → Privacy & Security → Files & Folders (two lowercase "claude", one uppercase "Claude")
  • Orphaned app could not be deleted via Finder — required sudo rm -rf after ownership was blocked by SIP on signed bundle files

Fix that worked

  1. Quit all Claude processes (pkill -9 -f Claude)
  2. Delete Claude.app from /Applications and any stale copies
  3. Remove ~/Library/Application Support/Claude, ~/Library/Caches/com.anthropic.claudefordesktop, related plist and logs
  4. Manually remove all Claude entries from Privacy & Security → Full Disk Access + Files & Folders
  5. Reboot (critical — TCC daemon needs to reload)
  6. Fresh install from https://claude.ai/download
  7. Re-grant permissions on first launch

Suggestion for Anthropic
The updater appears to leave behind orphaned app bundles that accumulate TCC entries. Each update seems to register a new "claude" permission entry instead of reusing the existing one, which eventually creates conflicts. A cleaner update mechanism or a built-in "reset permissions" option in the app would help.

mmmmmmmadman · 3 months ago
  • macOS: 26.4.1
  • Claude Code CLI: 2.1.141
  • Terminal: Terminal.app
  • Project path: under ~/Documents/

Symptom

Bash subprocess fails with fatal: Unable to read current working directory: Operation not permitted (exit 128) on any command requiring getcwd() — git, etc. Commands that bypass getcwd() (cat by absolute path, ls -d) succeed. Folder-trust prompt no longer appears on new sessions.

Failure persists even when running from /tmp:

This indicates TCC authorization state of the running Terminal process is corrupted, not a per-path issue.

Workaround

System Settings → Privacy & Security → Files and Folders (or Full Disk Access) → Terminal → toggle OFF, then ON.

macOS displays a restart prompt but restart is not required. tccd reloads state live; getcwd() works immediately in existing shells and active Claude Code sessions.

Likely cause

TCC state drift in Terminal process, possibly triggered by sandbox/Seatbelt changes in CLI 2.1.128–2.1.141. Rewriting the TCC entry forces tccd to push fresh state to running processes.

github-actions[bot] · 2 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

Torasian · 2 months ago

Same issue here!

kova-plus · 1 month ago

I encountered the same issue on macOS:

  • Claude Code CLI worked normally
  • Claude Code inside Claude Desktop failed to access folders under ~/Documents
  • The Desktop app showed Claude Code process exited with code 1
  • The log contained Unable to read current working directory: Operation not permitted and EPERM
  • Reinstalling Claude Desktop, granting Full Disk Access, and resetting permissions for com.anthropic.claudefordesktop did not resolve it

The issue was resolved by resetting macOS TCC permissions for the embedded Claude Code process, whose bundle identifier is com.anthropic.claude-code:

tccutil reset SystemPolicyDocumentsFolder com.anthropic.claude-code
tccutil reset All com.anthropic.claude-code

After quitting and reopening Claude Desktop, local sessions under ~/Documents worked again.

It appears that the relevant permission identity is the embedded Claude Code process (com.anthropic.claude-code), not only the Claude Desktop host app (com.anthropic.claudefordesktop).