[BUG] Code mode 403 error only with local folders (GitHub repos work fine) - Windows 11
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?
Preflight Checklist
I have searched existing issues and this hasn't been reported yet
This is a single bug report
I am using the latest version of Claude Code
What's Wrong?
Code mode in Claude Desktop shows a persistent 403 authentication error only when selecting local folders. GitHub repositories work perfectly fine, confirming this is a local filesystem access issue rather than general authentication.
Environment:
Claude Desktop: 1.0.3218 (8679c9)
Claude Code: 2.1.7
OS: Windows 11 Pro
Account: Claude Pro (paid subscription)
Docker: 29.1.3 (verified working)
Git Bash: Installed and in PATH
Error:
API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}} · Please run /login
What Works:
✅ Web version (claude.ai) Code mode works perfectly
✅ Claude Desktop Code mode works with GitHub repositories
✅ Docker verified working (docker run hello-world succeeds)
✅ OAuth authentication successful (claude setup-token completed)
✅ All network endpoints accessible
What Doesn't Work:
❌ Claude Desktop Code mode fails only with local folders
❌ Error occurs immediately after folder selection
❌ Happens with any local path (C:, C:\AI_Project, Desktop, etc.)
Critical Observation:
The fact that GitHub repositories work proves:
Authentication is valid
Docker integration works
Claude Code binary functions correctly
The issue is specifically with local filesystem access/permissions in Claude Desktop on Windows
Extensive Troubleshooting Completed:
✅ Installed Git Bash (required dependency)
✅ Docker Desktop with C:\ file sharing enabled
✅ OAuth token generated and set in environment variables
✅ Updated to Claude Code 2.1.7
✅ Verified no ANTHROPIC_API_KEY conflicts
✅ Tested folders in multiple locations
✅ Ran as Administrator
✅ Multiple re-logins and reinstalls
✅ Verified network connectivity to all Anthropic endpoints
Why This Matters:
I'm setting up Personal AI Infrastructure (https://github.com/danielmiessler/Personal_AI_Infrastructure) which requires direct local filesystem access for Docker volumes and configuration files. GitHub repository mode cannot be used as a workaround for this use case.
Logs:
2026-01-13 23:23:42 [info] Using Claude Code binary at: C:\Users\Admin\AppData\Roaming\Claude\claude-code\2.1.5\claude.exe
2026-01-13 23:23:42 [error] Session local_9cd9f1cb-3f4f-495b-acd6-7de45e96f41b query error: Claude Code process exited with code 1
Related Issues:
This appears related to #10776 and #8747, both reporting 403 errors on Windows, but neither specifies the GitHub vs local folder distinction.
Questions:
Does local folder mode use different authentication than GitHub repository mode?
Is there a Windows-specific permission or Docker configuration for local folders?
Could this be related to how Claude Desktop passes folder paths to Claude Code on Windows?
What Should Happen?
Local folder mode should work the same as GitHub repository mode since both use the same Docker backend and authentication.
Error Messages/Logs
API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}} · Please run /login
Steps to Reproduce
Steps to Reproduce:
Prerequisites:
Install Claude Desktop (version 1.0.3218 or later) on Windows 11
Install Docker Desktop and ensure it's running
Install Git for Windows (Git Bash)
Have an active Claude Pro subscription
Log into Claude Desktop with your Pro account
Setup test environment:
- Create a test folder: C:\TestProject
- Ensure Docker Desktop is running with C:\ drive file sharing enabled
- Verify Docker works: open PowerShell and run
docker run hello-world
Reproduce the error with local folder:
Open Claude Desktop
Click "New Chat"
Enable "Code" mode (toggle at bottom of chat input)
When prompted, select "Local folder"
Browse and select C:\TestProject
Type any message (e.g., "hello")
Expected: Code session starts normally
Actual: Error appears: API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}} · Please run /login
Verify GitHub repositories work (for comparison):
Open Claude Desktop
Click "New Chat"
Enable "Code" mode
When prompted, select "GitHub repository"
Enter any accessible GitHub repo (e.g., your own public repo)
Type any message (e.g., "hello")
Result: Works without errors
Additional verification:
Try different local folder locations:
Desktop: C:\Users\[Username]\Desktop\TestFolder
Root: C:\Projects
Documents: C:\Users\[Username]\Documents\TestFolder
All local folders produce the same 403 error
All GitHub repositories work fine
Minimal reproduction:
No specific files or code needed - the error occurs immediately upon folder selection before any code execution.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
1.0.3218 (8679c9)
Claude Code Version
Version 1.0.3218 (8679c9)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Terminal.app (macOS)
Additional Information
Using Claude Desktop GUI application, not CLI. The issue occurs in the Desktop app's Code mode interface.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗