◉CLAUDE LABJP
●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…
Articles/Claude Code
⟐ Claude Code/2026-04-24Advanced

The Claude Code Error Handbook — Auth, Billing, Stalls, Tools & MCP, Diagnosed by Symptom

A field-tested reference for 40+ Claude Code error patterns, organized by visible symptom: authentication, billing, response stalls, tool failures, MCP connectivity, and hook issues. Each entry tells you where to look and what to change.

claude-code132troubleshooting92error17handbookauthentication5billing8mcp20hooks22

✦ Premium Article

If you use Claude Code professionally, the time you spend deciphering error messages starts to outweigh the time you spend writing code. What makes it worse is that similar-looking errors can come from completely different layers — auth, billing, model generation, tools, MCP, hooks — and the right fix depends entirely on identifying which layer actually failed. This handbook is the reference I wish I'd had two years ago: a symptom-indexed map of the Claude Code errors I've actually hit, each paired with the log to inspect, the root cause to verify, and the specific recovery path.

How to read this handbook

The handbook is organized into six chapters. When you hit an error, jump to the chapter that matches the symptom. Each entry follows the same four-part structure: symptom, where it's happening, how to inspect it, and how to recover.

  1. Authentication and permission errors
  2. Billing, card declines, and subscription problems
  3. Response stalls, incompletes, and timeouts
  4. Tool-call failures (Bash / Read / Edit / Write)
  5. MCP server and hook failures
  6. Environment- and config-driven compound errors

1. Authentication and permission errors

Authentication in Claude Code lives in two layers at once: the Anthropic account, and the local CLI credentials. When they drift — one expires, or the CLI holds a token for the wrong workspace — you get errors that look random but are actually deterministic.

Symptom: Invalid API key at startup

Your cached access token has expired or was silently overwritten by a different account. Check ~/.claude/credentials.json for the token's expiry. If it's stale, run claude logout && claude login. On macOS, also clear any stale Keychain entry: security delete-generic-password -s "Claude Code" before re-logging in.

Symptom: You do not have access to this organization

This appears right after being invited to a new organization or switching workspaces. The CLI caches an access token that hasn't re-scoped yet. Fix with claude config set workspace <workspace-id> or a full logout/login cycle.

Symptom: Partner Network returns 403 Forbidden

If your integration runs through Claude Partner Network, the partner-to-workspace binding can expire silently. Check the Partner Network dashboard, re-authorize on the partner side if needed. Partner Network tokens are distinct from your main Anthropic token — they don't refresh together.

Symptom: 2FA code never arrives

Confirm the email on file is still active. Corporate mail filters routinely quarantine no-reply@anthropic.com; ask IT to whitelist it. If you use an authenticator app and codes are rejected as invalid, your device clock has drifted — enable automatic time sync.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A symptom-first map of every major Claude Code error class, so you can jump from the message you see to the fix
✦A layered recovery playbook for card-declined and payment-failed errors, covering both cardholder and provider-side causes
✦Concrete pointers to the exact log file, env var, or setting to check when tool calls, hooks, or MCP servers stall
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Claude Code2026-05-24
When Claude Code's Sequential Edits Cascade into Failure — Fixing 'old_string not found' and 'not unique' on the Same File
Run several Edits against the same file in one turn and the second or third one suddenly fails with 'not found' or 'not unique'. The cause is order-dependence inside a single context snapshot, and a Read + scoped patches usually rescue it.
⟐ Claude Code2026-05-02
Stop the 'old_string is not unique' Error in Claude Code's Edit Tool — A Practical Rewrite Strategy
When Claude Code's Edit tool throws 'old_string is not unique in the file', the root cause is usually that the prompt didn't guarantee a uniquely identifiable target. Here's how to design rewrites that actually stick.
⟐ Claude Code2026-10-05
I Wrote "I'll Do the Commits" in CLAUDE.md. The Next Morning git log Had One More Line.
When Claude Code commits despite being told not to: undo with git reset --soft, then stop it physically with permissions.deny plus a PreToolUse hook. Covers the git -c form that deny rules let through, and how to test the hook without starting Claude Code.