Skip to content

Troubleshooting

This page covers Claude Code usage issues. For installation and authentication issues, consult the official Claude Code documentation.


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:

Terminal window
exit
claude

Symptoms: Errors about context length, dropped messages, incomplete responses.

Solutions:

> /compact

If that doesn’t help, start a fresh session with a summary:

Terminal window
exit
claude "continuing: [brief summary of task]"
  • Use /compact frequently 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:

Terminal window
npx ccusage
  1. Check your network/VPN connection
  2. Try Haiku: /model claude-haiku-4-5
  3. Reduce active MCP servers: /mcp
  4. Check if context is bloated: /compact

Claude needs permission to run certain commands. Check your config:

Terminal window
cat ~/.claude/settings.json

You can auto-approve safe commands:

{
"permissions": {
"allow": ["Bash(git *)", "Bash(npm *)", "Read(*)", "Write(*)"]
}
}
  • 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)
Terminal window
# Check server status
claude mcp status
# Restart a specific server
claude mcp restart <name>
# Remove and re-add
claude mcp remove <name>
claude mcp add <name> -- <command>

Try disabling the problematic server temporarily:

> /mcp

Then toggle off the server causing issues.

Check your current model:

> /model

Switch to Haiku (most cost-effective):

> /model claude-haiku-4-5

For complex tasks, temporarily use Sonnet:

> /model claude-sonnet-4-5

For supported models and pricing, see the official Claude documentation.

  1. Usage issues with Claude Code: Check official Claude Code docs
  2. Installation & auth issues: See Claude Code installation guide
  3. Still stuck? Visit the Claude Code GitHub discussions