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

Resolved 💬 3 comments Opened Jan 26, 2026 by PjotrPjotr Closed Jan 30, 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?

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

  1. Opening Claude Code in Claude Desktop and connecting to a local folder
  2. Asking any question results in endless "thinking" state
  3. Asking additional questions triggers "Failed to load session" error
  4. Even the simplest prompts do not work
  5. "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

2. Kill All Processes

pkill -f Claude
  • Result: ❌ No change

3. 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

4. Clear All App Data

rm -rf ~/Library/Application\ Support/Claude/
  • Result: ❌ No change

5. Complete Reinstall

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

6. 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

7. macOS Permissions

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

8. Clear VM Bundle

rm -rf ~/Library/Application\ Support/Claude/claude-code-vm/
  • Result: ❌ App stuck on "Downloading dependencies"

9. CLI Test

cd ~/Documents/ai\ projekt
claude
  • Result: ✅ Works perfectly - can ask questions and work with local files

Observations

  1. Multiple "claude" entries in macOS Files & Folders permissions (CLI versions + Desktop)
  2. Status page shows "Increased rate of errors for Opus 4.5" incident on 2026-01-25
  3. Log error specifically mentions "Operation not permitted" for git operations
  4. 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:

  1. Why the Desktop app cannot perform git operations locally while CLI can
  2. The "Downloading dependencies" stuck state after clearing claude-code-vm
  3. 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_

View original on GitHub ↗

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