Troubleshooting
This page covers Claude Code usage issues. For installation and authentication issues, consult the official Claude Code documentation.
Context & Memory Issues
Section titled “Context & Memory Issues”Claude Forgets Context
Section titled “Claude Forgets Context”Symptoms: Asks questions already answered, contradicts itself, loses track of the task.
Solutions:
> /compact # Compress context to essential info> /clear # Start fresh (loses all context)Or start a new session:
exitclaudeContext Window Errors
Section titled “Context Window Errors”Symptoms: Errors about context length, dropped messages, incomplete responses.
Solutions:
> /compactIf that doesn’t help, start a fresh session with a summary:
exitclaude "continuing: [brief summary of task]"Performance Issues
Section titled “Performance Issues”High Token Usage
Section titled “High Token Usage”- Use
/compactfrequently during long sessions - Start new sessions for unrelated tasks
- Be specific to reduce back-and-forth
- Use Haiku for simple tasks, Sonnet only when needed
Check your spending with ccusage:
npx ccusageSlow Responses
Section titled “Slow Responses”- Check your network/VPN connection
- Try Haiku:
/model claude-haiku-4-5 - Reduce active MCP servers:
/mcp - Check if context is bloated:
/compact
Permission Issues
Section titled “Permission Issues”Claude Won’t Execute Commands
Section titled “Claude Won’t Execute Commands”Claude needs permission to run certain commands. Check your config:
cat ~/.claude/settings.jsonYou can auto-approve safe commands:
{ "permissions": { "allow": ["Bash(git *)", "Bash(npm *)", "Read(*)", "Write(*)"] }}Claude Can’t Access Files
Section titled “Claude Can’t Access Files”- Check file permissions:
ls -la filename - Verify you own the files:
sudo chown -R $USER:$USER ./project - Check if file is in
.gitignore(Claude may skip ignored files by default)
MCP Server Issues
Section titled “MCP Server Issues”MCP Server Won’t Connect
Section titled “MCP Server Won’t Connect”# Check server statusclaude mcp status
# Restart a specific serverclaude mcp restart <name>
# Remove and re-addclaude mcp remove <name>claude mcp add <name> -- <command>MCP Server Causes Errors
Section titled “MCP Server Causes Errors”Try disabling the problematic server temporarily:
> /mcpThen toggle off the server causing issues.
Model Issues
Section titled “Model Issues”Wrong Model / Unexpected Costs
Section titled “Wrong Model / Unexpected Costs”Check your current model:
> /modelSwitch to Haiku (most cost-effective):
> /model claude-haiku-4-5For complex tasks, temporarily use Sonnet:
> /model claude-sonnet-4-5For supported models and pricing, see the official Claude documentation.
Getting More Help
Section titled “Getting More Help”- Usage issues with Claude Code: Check official Claude Code docs
- Installation & auth issues: See Claude Code installation guide
- Still stuck? Visit the Claude Code GitHub discussions