OmniscioGuidesThis organization has been disabled
Claude Code: this organization has been disabled
This page is the case where a key outranks your login: a key that is still being sent after its organization was disabled. The neighbouring page, your organization has disabled API key authentication, is a different one: there the organization is fine and an administrator has turned that kind of credential off.
Last checked against Anthropic's documentation on November 24, 2026. By the Omniscio team. Updated .
What is the exact message?
Anthropic's error reference lists three forms. The first two carry a hint after the separator, and the hint tells you what that session has saved:
Your ANTHROPIC_API_KEY belongs to a disabled organization · Unset the environment variable to use your subscription instead
Your ANTHROPIC_API_KEY belongs to a disabled organization · Update or unset the environment variableThe third is the API's own rejection, which names no variable:
API Error: 400 ... This organization has been disabled.The hint is the useful part. Unset the environment variable to use your subscription instead appears when a stored /login can take over once the key is gone. Update or unset the environment variable appears when the key is your only credential, so unsetting it leaves nothing to sign in with until you act.
What does it mean?
Claude Code is authenticating with an API key, not with the subscription you signed in to. The organization that issued the key has been disabled, so the API refuses every request that carries it.
The precedence rule is what makes this confusing. When ANTHROPIC_API_KEY is set, that key is used instead of a Pro, Max, Ultra, Team or Enterprise subscription even while you are logged in. A working login sitting right beside a dead key has no effect.
Two things put the key there without you noticing: a line in your shell profile, which every new terminal re-exports, and a .env file Claude Code loads. In interactive mode Claude Code asks once whether to use the key and remembers that answer, so the question does not come back; the setting that remembers it is the Use custom API key toggle in /config, which only appears while the variable is set.
In non-interactive mode there is no question at all: -p always uses the key when one is present.
How do I fix it?
- Check a key is set at all. Run
echo $ANTHROPIC_API_KEY(PowerShell:$env:ANTHROPIC_API_KEY). If it prints nothing and the message named no variable, the key is not the cause, and the last step is yours. - Unset it in the shell you are in with
unset ANTHROPIC_API_KEY(PowerShell:Remove-Item Env:ANTHROPIC_API_KEY), so this terminal stops sending it. - Remove it from wherever it comes back from. Anthropic names a shell profile and a
.envfile. If the variable returns in a new terminal, find the line that sets it, for example withgrep -rn ANTHROPIC_API_KEY ~/.zshrc ~/.bashrc ~/.bash_profile .env, and delete it there. - Relaunch
claude. - If the hint said
Update or unset, you had no saved login behind the key. Run/loginto sign in with your claude.ai account, or replace the key with one from an active Console organization. - If no environment variable is set and the error persists, contact support or sign in with a different account. That is the error reference's own last step.
- If the key is still needed for automation, it cannot be the disabled one. Use a key from an active organization, because
-pruns always use the key when it is present.
An apiKeyHelper script is a separate credential source with its own error, covered on apiKeyHelper script failing. If the refusal is about the key's value rather than its organization, Claude Code login errors sorts those by message.
How do I know it is fixed?
- The message stops appearing, because the request no longer carries the key.
/statusnames your subscription as the active credential. When a login and a key are both configured,/statusmarks the credential that is not in use, so the row tells you which one is live.- A new terminal does not bring the variable back, which means the profile or
.envline is gone rather than just unset for one session.
Where these answers come from
- Anthropic's error reference, This organization has been disabled, read November 24, 2026: the three message forms, which hint appears when, the precedence rule, and every fix step.
- Authentication, read the same day, for the key-over-subscription precedence, the one-time approval in interactive mode, the Use custom API key toggle, what
/statusmarks, and the note that cloud sessions always use subscription credentials. - Environment variables, for the
ANTHROPIC_API_KEYrow: the key replaces a Pro, Max, Ultra, Team or Enterprise subscription even while you are logged in, and-palways uses it when present.
Common questions
Is my subscription cancelled?
No. The message is about the API key Claude Code is sending, not about your saved login. Your subscription is still there; the key is being used instead of it, which is why unsetting the key and running /status is the test that answers this.
Why does unsetting ANTHROPIC_API_KEY not stick?
Because something puts the key back. Anthropic names two places it comes from: a shell profile, which exports it into every new terminal you open, and a .env file that Claude Code loads. Unset it in the file that sets it, not only in the terminal you just typed the unset into.
Will /login fix it while the key is still set?
Not on its own. A key from the environment takes precedence over your login, so the request keeps carrying the disabled organization's key. Unset it first, then run /login if the message asks you to.
Does this affect cloud sessions or Claude Code on the web?
No. Cloud sessions always use your subscription credentials, and setting ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN in the cloud environment does not override them. The precedence rule this page covers is the local one.
I need a key for scripts. What do I do?
Replace it. In non-interactive mode the key is always used when present, so a key from a disabled organization fails -p runs too. Use a key from an active Console organization, or have an admin restore the one you have.
When the same session fails all day
This error ends every turn until you unset the key, which is the kind of failure that hides when several sessions are running: each one fails on its own, and nothing on screen connects them.
Omniscio, the desktop app we make for running many Claude Code sessions at once, shows each session's status in the sidebar and collects the ones that need a decision from you in an inbox at the top of it. The features page covers the rest of the app, and the download page has the installers.