Step-by-step solutions for the most common Claude Code problems. From installation issues to authentication errors to performance problems—find your fix here.
To fix Claude Code not working, first run claude --version to check your installation, then claude doctor to diagnose issues. The most common fixes are: update Node.js to v18+, reinstall with npm install -g @anthropic-ai/claude-code, or reauthenticate with claude auth.
Find your specific problem below and follow the step-by-step solution.
Quick Diagnostic
Run claude doctor from your terminal. It checks your installation, configuration, and connections, then reports any issues it finds. You can also use the --verbose flag for detailed logging or --mcp-debug to diagnose MCP server configuration issues.
Installation Problems
"claude: command not found"
Your terminal can't find the Claude Code command. This usually means Node.js isn't installed or the global npm package isn't in your PATH.
Solution
- Check if Node.js is installed:
node --version
Should show v18 or higher. If not, install from nodejs.org - Reinstall Claude Code:
npm install -g @anthropic-ai/claude-code - Close and reopen your terminal (this refreshes PATH)
- Try again:
claude
"Permission denied" when installing
npm doesn't have permission to install global packages.
Solution (Mac/Linux)
- Don't use sudo. Instead, fix npm permissions:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global' - Add to your shell config (~/.zshrc or ~/.bashrc):
export PATH=~/.npm-global/bin:$PATH - Reload:
source ~/.zshrc(or restart terminal) - Reinstall:
npm install -g @anthropic-ai/claude-code
"Node.js version too old"
Claude Code requires Node.js 18 or higher.
Solution
- Check your version:
node --version - If it's below v18, update Node.js from nodejs.org
- Or use nvm to manage versions:
nvm install 20
nvm use 20
Authentication Problems
"Authentication failed" or "Invalid API key"
Claude can't verify your identity or your API key isn't working.
Solution
- Run
claude authto reauthenticate - If using API directly, check your environment variable:
echo $ANTHROPIC_API_KEY - Verify your account has credits at console.anthropic.com
- If key was recently created, wait a few minutes for propagation
"Rate limit exceeded"
You've hit your usage limits.
Solution
- Run
/usageto see your current limits - Wait for your rate limit to reset (usually 1 minute for short-term limits)
- If hitting daily limits, consider upgrading your plan
- Use
/model haikufor simpler tasks—it has higher limits
Performance Problems
Claude is responding very slowly
Long conversations use more context, which slows responses. The model you're using also affects speed.
Solution
- Check context usage:
/cost - If context is high, compact it:
/compact - Or start fresh:
/clear - For simple tasks, switch to a faster model:
/model haiku(Haiku 4.5 is the fastest) - If using Opus 4.6, expect slower responses -- it's the most capable but also the most thorough
- Check status.anthropic.com -- high traffic periods can cause slowdowns
Claude forgets things from earlier in the conversation
The context window is full and older messages are being compressed or dropped.
Solution
- Use
/compactwith instructions about what to keep:
/compact Keep the implementation approach, summarize exploration - Put important persistent information in your CLAUDE.md file
- For complex tasks, break into shorter sessions
File and Configuration Problems
Claude isn't reading my CLAUDE.md file
The file might be named wrong or in the wrong location.
Solution
- Check the filename is exactly
CLAUDE.md(case-sensitive) - Verify location: project root or
~/.claude/CLAUDE.md - Run
/memoryto see what files Claude has loaded - Restart Claude Code after creating the file
Claude ignores instructions in my CLAUDE.md
The file might be too long, causing important instructions to get lost.
Solution
- Shorten your CLAUDE.md—aim for 1-2 screens max
- Put the most important instructions at the top
- Use emphasis: ALL CAPS or "IMPORTANT:" for critical rules
- Remove anything Claude would do anyway
My custom slash command or skill doesn't appear
The skill might be in the wrong location or named incorrectly. Note that the older .claude/commands/ system has been merged into skills.
Solution
- For skills: verify folder structure is
.claude/skills/skill-name/SKILL.md(project-level) or~/.claude/skills/skill-name/SKILL.md(global) - For legacy commands: files should be in
.claude/commands/(they still work) - Folder name must be lowercase with hyphens (no spaces)
- Run
/helpto see all available commands including custom ones - Restart Claude Code to pick up new skills
MCP server not connecting
Model Context Protocol (MCP) servers extend Claude Code with external tools and data sources, but connection issues are common.
Solution
- Run Claude Code with
--mcp-debugflag for detailed MCP diagnostics - Check your MCP server configuration in
.claude/settings.json - Verify the MCP server process is running and accessible
- Check that the server URL and authentication are correct
- Try restarting both the MCP server and Claude Code
Permission Problems
Claude keeps asking permission for everything
This is the default safety behavior. You can change it.
Solution
- Press
Shift+Tabto enter Auto-Accept Mode - Or configure trusted directories in settings
- Run
/configto open settings
Claude won't edit files / is in read-only mode
You might be in Plan Mode, which is read-only.
Solution
- Check if "plan mode on" appears in your terminal
- Press
Shift+Tabto cycle back to Normal Mode - If using CLI flags, remove
--permission-mode plan
Connection Problems
"Network error" or "Connection failed"
Claude Code can't reach Anthropic's servers.
Solution
- Check your internet connection
- If using VPN, try disabling it temporarily
- Check status.anthropic.com for outages
- If behind corporate firewall, you may need proxy configuration
Diagnostic Commands
Use these commands to diagnose issues:
| Command | What It Shows |
|---|---|
claude doctor |
Full health check of your installation (run from terminal) |
/status |
Version, model, account info |
/memory |
Which CLAUDE.md files are loaded |
/cost |
Token usage and costs for current session |
/usage |
Rate limits and plan usage |
/model |
Current model and option to switch (Opus 4.6, Sonnet 4.5, Haiku 4.5) |
/help |
All available commands including custom skills |
For deeper debugging, you can also use these terminal flags:
claude --verbose-- detailed logging for all operationsclaude --mcp-debug-- debug MCP server connections
Model-Specific Issues
Getting unexpected results or lower quality output
You might be using a less capable model for a complex task.
Solution
- Check which model you're using:
/model - For complex tasks, switch to Sonnet 4.5 or Opus 4.6:
/model sonnetor/model opus - Haiku 4.5 is fast and cheap but less capable for complex reasoning
- Break complex tasks into smaller steps if using a lighter model
Still Not Working?
If none of these solutions helped:
- Update Claude Code:
npm update -g @anthropic-ai/claude-code - Check for known issues: GitHub Issues
- Check Anthropic status: status.anthropic.com for service outages
- Report a bug: If you found a new issue, report it on GitHub
When reporting issues: Include the output of claude doctor and /status, your operating system, Node.js version, and the exact error message you're seeing.
Related Guides
- How to Install Claude Code — fresh installation guide
- How to Use CLAUDE.md Files — configuration setup
- Slash Commands — all available commands
Like Claude Code? Meet Your Chief AI Officer
Once you've fixed the issue, watch our free training to see Claude Code in action.
Get the Free Blueprint href="/blueprint">Watch the Free Setup Video →rarr;