Claude Code Troubleshooting

This page covers non-error issues: Claude Code running slowly, refusing to start, producing wrong output, ignoring your instructions, or behaving unexpectedly. If you are looking for specific error codes and messages, see the Error Handling reference instead.

Every issue below links to a detailed troubleshooting guide with verified solutions.


Performance Issues

When Claude Code feels slow, the problem is usually token-heavy context, network latency, or suboptimal configuration. These guides help you identify and fix the bottleneck.


Installation Problems

Installation failures prevent Claude Code from running at all. These guides cover every platform and package manager.


CLAUDE.md Not Working

The most frustrating category: you wrote a CLAUDE.md but Claude Code ignores it, reads it partially, or applies conflicting rules.


Unexpected Behavior

Claude Code works but produces wrong output, modifies files you did not mention, or ignores your explicit instructions.


IDE Integration Issues

Problems specific to VS Code, JetBrains, Neovim, and other editors.


Authentication and Login Issues

Problems connecting Claude Code to your Anthropic account or API.


Skill and Tool Issues

Problems with Claude Code skills, custom commands, and tool integrations.


Docker and Container Issues

Troubleshooting Claude Code inside Docker containers, dev containers, and WSL.


Interactive Diagnostic Tool

For issues not covered above, use the Claude Code Diagnostic Tool. It walks you through a decision tree that identifies your problem category, narrows the root cause, and links to the specific fix.


Frequently Asked Questions

Why is Claude Code so slow?

Three common causes: oversized context (too many files loaded), network latency to the Anthropic API, and MCP server initialization overhead. Start by checking your CLAUDE.md size and excluding unnecessary directories. See Fix Claude Code Slow Response.

Claude Code says ‘command not found’ after I installed it. What do I do?

Your shell PATH does not include the Claude Code binary location. Run which claude to check, and add the npm global bin directory to your PATH. The fix differs between bash, zsh, and fish shells. See Fix ‘command not found’.

Why does Claude Code ignore my CLAUDE.md file?

Four common reasons: the file is in the wrong directory (must be in the project root or a parent directory), the file has a casing mismatch (must be CLAUDE.md, not claude.md), the file exceeds the token limit (split it), or a cached version is being used. See CLAUDE.md Not Loading.

Claude Code keeps modifying files I did not ask about. How do I stop it?

Add explicit scoping rules to your CLAUDE.md: “Only modify files I explicitly mention” and “Never touch files in /config, /migrations, or /generated.” The Surgical Changes guide covers this in depth.

How do I fix Claude Code in VS Code?

First, check that the extension is updated. Then verify your API key configuration. If Claude Code crashes the extension host, disable other extensions one-by-one to find conflicts. See Fix Claude Code Not Working in VS Code.

Can I use Claude Code on a headless server?

Yes. Claude Code supports headless authentication via API key environment variables. Set ANTHROPIC_API_KEY in your environment and use --dangerously-skip-permissions for non-interactive mode. See Headless Linux Auth.

Why does Claude Code keep suggesting the same broken solution?

Claude Code lacks persistent memory of failed attempts within a session context. Explicitly tell it “That approach failed because [reason]. Try a different approach.” Adding failure context to your prompt breaks the loop. See Keeps Suggesting Same Broken Solution.

How do I troubleshoot MCP server connections?

Check the server process status, verify transport configuration (stdio vs HTTP), test the connection independently, and review timeout settings. The MCP Server Incident Response Guide provides a complete diagnostic workflow.

Try our Diagnostic Tool → Run the diagnostic tool on your error

Beyond Troubleshooting

This page helps you fix what is broken. The Claude Code Mastery Playbook ($99) helps you build systems that rarely break in the first place, with 200 production-tested practices covering prevention, monitoring, and recovery.