Skip to content

Troubleshooting — Diagnose & Fix

Systematic first moves, then the most common failures by category.

Terminal window
claude doctor # full diagnostic: install, config, connectivity
claude --version # many bugs are just "you're 3 weeks behind"
claude update
/status # inside a session: account, model, plan
/context # if behavior degrades mid-session
claude --debug # verbose logging for gnarly cases

/debug-config (or asking Claude “why isn’t my hook firing?”) — Claude Code can debug its own configuration; settings precedence issues are the #1 config bug.

SymptomFix
The token '&&' is not a valid statement separatorYou ran the CMD installer in PowerShell — use irm https://claude.ai/install.ps1 | iex
'irm' is not recognizedYou’re in CMD, not PowerShell
Bash tool missing on WindowsInstall Git for Windows (otherwise PowerShell is used as the shell tool)
Login loops / wrong account/login to re-auth; check /status
Homebrew/WinGet install feels staleThose don’t auto-update: brew upgrade claude-code / winget upgrade Anthropic.ClaudeCode
SymptomLikely cause → fix
Slow, forgetful responses late in sessionContext near full → /context, then /compact or /clear (09)
First turn after a break is very slowCache expired — normal (54)
CLAUDE.md edits “not working”They load at session start — /clear or restart
Hook not firingCheck scope/matcher in settings; trust dialog accepted?; disableAllHooks set?
Skill not appearingFrontmatter description missing/vague; wrong directory; /reload-plugins for plugin skills
Permission prompt for something you allowedRule syntax — Bash(npm *) matches npm test but not npm test (double space) or chained npm test && rm x; chains need each part allowed
--dangerously-skip-permissions refuses to runBlocked as root/sudo outside a recognized sandbox — use the devcontainer
Session picker can’t find a -p sessionHeadless sessions are hidden — resume by ID from the same directory
Two terminals resumed the same sessionMessages interleave into one transcript — fork instead: claude --continue --fork-session
SymptomFix
Server tools missing/mcp → check connection state; stdio servers: is the command on PATH?
Tools there but Claude “can’t see” themDeferred by tool search (normal — loaded on demand); ENABLE_TOOL_SEARCH=false to force upfront
Server keeps disconnectingCheck the server process logs; HTTP session expiry; each reconnect can cost cache if tools aren’t deferred
Plugin not found in marketplace/plugin marketplace update claude-plugins-official

Covered in depth in 16-sandboxing-and-security.md: jest --no-watchman, docker *excludedCommands, Go CLIs TLS on macOS → excludedCommands, WSL1 → upgrade to WSL2.

ErrorMeaning
Model "<name>" is not a recognized model idTypo or unavailable — use an alias (sonnet, opus, fable)
restricted by your organization's settingsAdmin allowlist (availableModels / org restrictions)
Rate limit / overloadedWait or /model to a different family; fast mode auto-falls-back to standard speed
Safety fallback on FableFlagged request re-runs on Opus automatically — expect one uncached turn
  • Trick:Doctor first: claude doctor--version/status/context.”
  • Do: break something on purpose (bad settings key) and walk the checklist.
  • They’ll trip on: googling before asking Claude Code itself — it debugs its own config.

Learning path:54-prompt-caching-deep-dive.md · Index · ➡ 56-enterprise-deployment.md

Written by Fenil Patel