Documentation Index
Fetch the complete documentation index at: https://mintlify.com/VineeTagarwal-code/claude-code/llms.txt
Use this file to discover all available pages before exploring further.
Run diagnostics first
The/doctor command runs a comprehensive set of checks on your installation and configuration:
Authentication issues
API key not recognized
API key not recognized
Claude Code looks for your API key in this order:Verify it’s set:
ANTHROPIC_API_KEYenvironment variable- Keychain / credential store (set via
/login) - Project or user settings
/login to re-authenticate, or export the key in your shell:Login fails or OAuth error
Login fails or OAuth error
If the browser-based OAuth flow fails:
- Make sure you have an active claude.ai or Anthropic Console account
- Try
/logoutthen/loginto restart the flow - As a fallback, set
ANTHROPIC_API_KEYdirectly in your shell environment
403 or 401 errors from the API
403 or 401 errors from the API
These indicate the key is present but invalid or expired.
- Rotate your API key in the Anthropic Console
- Re-run
/loginor update theANTHROPIC_API_KEYenv var - Check that
ANTHROPIC_BASE_URLis not set to an incorrect endpoint
Installation problems
'claude' command not found after install
'claude' command not found after install
Your shell’s PATH may not include the npm global bin directory.Find where npm installs global binaries:Add that path to your shell config (Reload your shell:
~/.bashrc, ~/.zshrc, or ~/.profile):Node.js version too old
Node.js version too old
Claude Code requires a recent version of Node.js. Check your version:If it’s below v18, upgrade Node.js using your package manager or nvm:
Native installer lock file error
Native installer lock file error
If you see a message about a lock file or in-progress installation, another install may be running. Wait a moment and retry. If the issue persists, remove the lock file manually:Then re-run the install command.
Permission denied during install
Permission denied during install
Avoid using Then install again without
sudo with npm. Instead, configure npm to use a user-owned directory:sudo:Performance issues
Responses are slow
Responses are slow
- Check your network connection and API status
- Large context windows slow down responses — use
/compactto summarize the conversation - Use
/effortto reduce reasoning effort for simple tasks: - Use
/fastto switch to a faster model for the current session
Context window full errors
Context window full errors
Claude Code has a finite context window. When it fills up:
- Use
/compactto compress the conversation history into a summary - Start a fresh session with
/clearfor unrelated tasks - Use
/add-dirsparingly — avoid adding large directories unnecessarily
High token costs
High token costs
- Use
/costto see token usage for the current session - Use
/usagefor a summary of recent spending - Use
/effort lowfor straightforward tasks - Avoid repeatedly reading large files — Claude caches file reads within a session
IDE integration issues
IDE extension not connecting
IDE extension not connecting
Run
/ide to check the current IDE connection status and attempt reconnection.Make sure the Claude Code extension is installed in your IDE:- VS Code: Install “Claude Code” from the Extensions marketplace
- JetBrains: Install “Claude Code” from the JetBrains Plugin Marketplace
Diffs not showing in IDE
Diffs not showing in IDE
The diff view requires the IDE extension to be connected. If
/ide shows no connection:- Open your IDE with the current project
- Ensure the Claude Code extension is enabled
- Run
/ideagain inside Claude Code
MCP server issues
MCP server fails to connect
MCP server fails to connect
Check the server configuration in your settings:Common causes:
- Wrong command path: Ensure the
commandin your MCP config is a valid executable on your PATH - Missing dependencies: The MCP server process may require its own dependencies installed
- Environment variables: Some MCP servers need env vars (set them in the
envconfig field)
MCP tools not appearing
MCP tools not appearing
After adding a new MCP server, restart Claude Code. MCP connections are initialized on startup.Verify the server is listed and enabled:If it shows as disabled, toggle it on with the interactive menu.
Tool permission issues
Claude keeps asking permission for the same tool
Claude keeps asking permission for the same tool
To permanently allow a tool, respond with “Always allow” when the permission prompt appears. This adds the tool to your
allowedTools list in settings.You can also add it manually in your settings file or via /permissions.Tool was denied and now Claude won't use it
Tool was denied and now Claude won't use it
If you accidentally denied a tool permanently, reset it via
/permissions or edit your settings file to remove the denial rule.Keeping Claude Code up to date
Run the upgrade command inside Claude Code:Enable debug logging
For deep troubleshooting, use the--debug flag when starting Claude Code, or set the DEBUG environment variable:
~/.claude/logs/, including tool calls, API requests, and internal state. You can also set CLAUDE_CODE_DEBUG_LOG_LEVEL=verbose for even more detailed output.
If you’re still stuck, use
/feedback inside Claude Code to send a report directly to the team.