Claude Code error
Claude Code: API Error: 400 ... This organization has been disabled
API Error: 400 ... This organization has been disabled.Status: WorkaroundLast verified 3 documented fixes2 sources
What it means
Claude Code is using a stale ANTHROPIC_API_KEY from a disabled Console organization. Environment variables take precedence over /login, so the key is used even when you have a working subscription. Current versions show Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead.
Causes
- An old API key from a previous employer or project still exported in your shell profile or loaded from a .env file
- In -p mode, the key is always used when present
How to fix it
- Fix 1.
Unset ANTHROPIC_API_KEY and relaunch claude (PowerShell: Remove-Item Env:ANTHROPIC_API_KEY).
Terminalunset ANTHROPIC_API_KEY claude - Fix 2.
Remove export ANTHROPIC_API_KEY=... lines from ~/.zshrc, ~/.bashrc, or ~/.profile (on Windows, check $PROFILE and User environment variables), then run /status to confirm the active method.
- Fix 3.
If the message says Update or unset, you have no saved login: unset the key and run /login, or replace it with a key from an active Console organization.
Slash command/login
More Claude Code errors
All 18 Claude Code errorsAPI Error: 500 Internal server error. This is a server-side issue, usually temporaryStatus: WorkaroundAPI Error: Repeated 529 Overloaded errors. The API is at capacityStatus: WorkaroundAPI Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.5: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01FRvEykWmCgrgJ22mvBbKhV. Each `tool_use` block must have a corresponding `tool_result` block in the next message."}}Status: OpenUnable to connect to API. Check your internet connectionStatus: WorkaroundUnable to connect to API: SSL certificate verification failed (UNABLE_TO_GET_ISSUER_CERT_LOCALLY).Status: WorkaroundPlease run /login · API Error: 401 OAuth token has expiredStatus: WorkaroundOAuth error: timeout of 15000ms exceededStatus: OpenPrompt is too longStatus: Workaround
Related reading
- Claude Code Idle Compaction: What It Does and How to Turn It OffClaude Code 2.1.299 compacts sessions over 200K tokens after about 54 idle minutes. How the cache math works, the setting to turn it off, and when to keep it.
- Claude Code Desktop SneakPeek Flaw: Fixed Version and What To DoSneakPeek (CVSS 8.7) let a poisoned HTML file read SSH keys and cloud credentials via the Claude Code Desktop preview pane. Fixed in Claude Desktop 1.30096.1.
- Reverse Engineer Anything (REA): What the MCP Server Does and Where the Line IsREA (Reverse Engineer Anything) is an MIT-licensed MCP server that lets Claude Code, Codex or Cursor inspect binaries, Electron apps and APKs. How to try it.
- Claude Code Projects: Coordinator, Threads, and LimitsClaude Code Projects is open to waitlisted Pro and Max users. How the coordinator and cloud threads work, what they cost in plan limits and where it breaks.
- Agent Harness Lessons From a 500B-Token Decompile: Give Agents a PASS/FAIL OracleAgent harness lessons from a 500B+ token decompile: a byte-matching PASS/FAIL oracle beat the reviewer agent. How agents cheated it and what to copy.
- Claude for Startups Offer Paused: What Founders Do NowClaude for Startups paused its free Claude Team year and $1,000 API credit offer at capacity. What the program page says now and how to cover the gap.
FAQ
What does "API Error: 400 ... This organization has been disabled" mean in Claude Code?
Claude Code is using a stale ANTHROPIC_API_KEY from a disabled Console organization. Environment variables take precedence over /login, so the key is used even when you have a working subscription. Current versions show Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead.
How do I fix "API Error: 400 ... This organization has been disabled"?
There are 3 documented fixes. Start with the first: Unset ANTHROPIC_API_KEY and relaunch claude (PowerShell: Remove-Item Env:ANTHROPIC_API_KEY).
Is this Claude Code error fixed?
Status: Workaround. No release removes the cause. The documented fixes work around it.
Sources
Last verified against 2 sources: official docs, maintainer replies and release notes.
Newsletter
Fixes for the tools you use, weekly
One email per week. New coding agent releases, what broke, and how developers are working around it.