Claude Code Not Working? 5 Fixes That Solve 90% of Problems
Command not found, invalid API key, 503 errors, slow responses. Run these 5 Claude Code checks in order and you're back to coding fast.
Claude Code not working? Here's the fix: 90% of issues are solved by these five quick checks. Run them in order, and you'll be back to coding in minutes.
Quick diagnosis checklist:
If any command fails, jump to the matching section below for the exact fix.
Installation Problems
Error: "command not found: claude"
Your installation failed or PATH isn't configured. The native installer fixes this automatically:
See the native installer guide for details.
Error: "Node.js version not supported"
Claude Code requires Node.js 18+. Check your version:
Error: "EACCES permission denied"
Fix npm permissions on macOS/Linux:
For Windows, run Command Prompt as Administrator and retry installation.
Authentication Issues
Error: "Invalid API key"
Your API key is missing or incorrect. Set it properly:
Get your API key from console.anthropic.com and ensure no extra spaces.
Error: "Subscription not recognized"
Claude Max/Pro authentication problems:
- Log out of Claude completely in your browser
- Clear cookies and browser cache
- Use incognito/private mode to log back in
- Run
claude configto re-authenticate
Connection Problems
Error: "503 Service Unavailable"
This is a server-side issue, not your setup:
- Wait 2-5 minutes for Anthropic servers to recover
- Check status.anthropic.com for service updates
- Don't reinstall - this won't fix server problems
Claude Code starts but doesn't respond
Reset your session state:
If still unresponsive, check your internet connection and try again.
Performance Issues
Slow responses or hanging
Switch to a faster model and optimize context:
"Context window full" errors
Your conversation is too long. Reset or compress:
File Permission Errors
Error: "Permission denied on file operations"
Fix directory permissions:
Settings and Configuration Issues
Settings not applying as expected
When settings behave unexpectedly, the cause is almost always scope precedence. Settings follow this priority: Managed > Command line > Local > Project > User. A setting in .claude/settings.local.json overrides the same key in .claude/settings.json, which overrides ~/.claude/settings.json.
Managed settings overriding your preferences
If your IT team deployed managed-settings.json, those settings take highest priority and cannot be overridden. On macOS, managed settings live at /Library/Application Support/ClaudeCode/. On Linux/WSL, check /etc/claude-code/. On Windows, check C:\Program Files\ClaudeCode\. If a setting refuses to change, ask your admin whether a managed policy is enforcing it.
Settings autocomplete not working
Add the $schema line to the top of your settings.json for editor validation and autocomplete:
For a complete walkthrough of the scope system, see our configuration basics guide. For the full settings key reference, see the settings reference.
Sandbox and Security Issues
Error: "bubblewrap not installed" (Linux/WSL2)
Sandboxing on Linux requires the bubblewrap and socat packages. Install them and try again:
Watchman conflicts with sandbox
Facebook's Watchman file watcher is incompatible with Claude Code's sandbox. If you see errors related to watchman, disable it or exclude it from the sandbox. The sandbox isolates filesystem access, which conflicts with watchman's monitoring approach.
Docker commands failing inside sandbox
Docker needs to run outside the sandbox. Add it to excludedCommands in your settings.json:
For more on sandbox configuration, see our sandboxing guide.
Debug Environment Variables
When diagnosing persistent issues, these environment variables help isolate the problem:
| Variable | What It Does |
|---|---|
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | Disables auto-updates, telemetry, error reporting, and bug reports all at once. Useful for isolating network issues. |
DISABLE_AUTOUPDATER | Stops automatic updates only. Set to 1 if updates are causing problems. |
DISABLE_ERROR_REPORTING | Opts out of Sentry error reporting (set to 1). |
DISABLE_TELEMETRY | Opts out of Statsig telemetry (set to 1). |
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS | Disables all background task functionality (set to 1). |
If you suspect network or proxy issues, you can also set HTTP_PROXY or HTTPS_PROXY to route traffic through a proxy, or use NO_PROXY to bypass proxy for specific domains.
For the full environment variable reference, see configuration basics or the settings reference.
Advanced Fixes
Nothing else worked? Complete reset:
The native installer handles PATH configuration automatically and includes auto-updates.
Success Verification
After fixing issues, verify everything works:
Your Claude Code should now respond normally. If problems persist, the issue may be service-side - wait a few minutes and try again.
Next Steps
Now that Claude Code is working:
- Explore the complete guide for an overview of all features
- Set up your first project properly
- Learn context management to avoid future issues
- Configure optimal settings for your workflow
- Switch to the native installer for automatic updates
- Check our installation guide for platform-specific tips
- Review common errors to prevent future problems
Last updated on