[Bug/Documentation] 'Organization has been disabled' error when ANTHROPIC_API_KEY overrides Max/Pro subscription
[Bug/Documentation] "Organization has been disabled" error when ANTHROPIC_API_KEY overrides Max/Pro subscription
Problem Description
Users with valid Claude Pro/Max subscriptions are receiving "This organization has been disabled" error when using Claude Code CLI, despite having active subscriptions that work fine on claude.ai.
Root Cause
When an ANTHROPIC_API_KEY environment variable is set (especially from a previously disabled organization), it overrides the user's valid Max/Pro subscription authentication, causing Claude Code to attempt authentication with the disabled API key instead of the active subscription.
Steps to Reproduce
- Have a valid Claude Max/Pro subscription
- Have
ANTHROPIC_API_KEYenvironment variable set to a key from a disabled organization - Run
claude --print "test"ornpx @anthropic-ai/claude-code@latest --print "test" - Receive error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This organization has been disabled."}}
Solution
Remove or unset the ANTHROPIC_API_KEY environment variable:
# Temporary fix
unset ANTHROPIC_API_KEY
claude --print "test" # Now works!
# Permanent fix - remove from shell config
# Remove any line like: export ANTHROPIC_API_KEY="sk-ant-..."
Evidence
Test Results
# With API key from disabled org
$ export ANTHROPIC_API_KEY="sk-ant-api03-[disabled-key]"
$ claude --print "What is 2+2?"
API Error: 400 "This organization has been disabled"
# Without API key (using Max subscription)
$ unset ANTHROPIC_API_KEY
$ claude --print "What is 2+2?"
4 # Works perfectly!
Impact
This affects users who:
- Have valid Pro/Max subscriptions
- Previously used API keys from organizations (work, school, etc.)
- Have those organizations now disabled
- Don't realize the old API key overrides their personal subscription
Suggested Improvements
-
Better Error Message: Instead of
"This organization has been disabled", show:"API key from disabled organization detected. You have a valid Max subscription. Run 'unset ANTHROPIC_API_KEY' to use your subscription instead." -
Add Warning: When Claude Code detects both subscription and API key:
"Warning: ANTHROPIC_API_KEY is overriding your Max subscription. Remove the environment variable to use your subscription benefits." -
Update Documentation: Add a troubleshooting section specifically for this scenario in:
- https://support.claude.com/en/articles/11145838-using-claude-code-with-your-pro-or-max-plan
- The main Claude Code README
-
Add
--use-subscriptionFlag: Allow explicit override:claude --use-subscription --print "test" # Ignores ANTHROPIC_API_KEY
Additional Context
- This is not a bug in the traditional sense - it's documented behavior that API keys override subscriptions
- However, the error message is misleading and doesn't help users understand the actual problem
- Many users may have old API keys in their environment from previous projects/employers
- The current documentation doesn't explicitly warn about disabled organization keys
Environment
- OS: Windows 10 (Git Bash/MINGW64)
- Claude Code Version: 1.0.128
- Subscription: Claude Max (Individual)
- Issue discovered: September 29, 2025
Related Issues
This may explain some cases in:
- #5088 (though that also has billing-related issues)
- #1651 (API key vs subscription confusion)
- #4733 (persistent warnings about API keys)
Reproducible Example
I've created a complete test suite showing this issue and the solution: https://gist.github.com/[would-create-gist-with-full-test-results]
I discovered this after extensive debugging and wanted to document it for others experiencing the same confusing error. Happy to provide more details or help test fixes.
Same issue happens to me. After renew of Max subscription I cannot use Claude Code, since it shows always:
This organization has been disabled.
Unfortunately, provided temporal fix claude --use-subscription --print "test" or unset ANTHROPIC_API_KEY doesn't work.
Things I've tried:
claude --use-subscription --print "test"unset ANTHROPIC_API_KEY- logout + login
That wasn’t the solution mate. That was a suggestion for the anthropic team to implement As the solution. Here is the trick that worked for me. Solution
Remove or unset the ANTHROPIC_API_KEYenvironment variable:
Temporary fixunset ANTHROPIC_API_KEY
claude --print "test" # Now works!
Permanent fix - remove from shell config# Remove any line like:
export ANTHROPIC_API_KEY="sk-ant-..."
On Thu, 9 Oct 2025 at 8:20 PM, tkluza @.***> wrote:
tkluza left a comment (anthropics/claude-code#8327) https://github.com/anthropics/claude-code/issues/8327#issuecomment-3384945335
Same issue happens to me. After renew of Max subscription I cannot use Claude Code, since it shows always:
This organization has been disabled.
Unfortunately, provided temporal fix claude --use-subscription --print "test" or unset ANTHROPIC_API_KEY doesn't work.
Things I've tried:
- claude --use-subscription --print "test"
- unset ANTHROPIC_API_KEY
- logout + login
— Reply to this email directly, view it on GitHub https://github.com/anthropics/claude-code/issues/8327#issuecomment-3384945335, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFEAWG2QUQQS2RJKVNFHRTD3WYSFDAVCNFSM6AAAAACHXT3MDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOBUHE2DKMZTGU . You are receiving this because you authored the thread.Message ID: @.***>
I'm encountering this issue as well.
I am seeing:
~ claude --print "test"
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This organization has been disabled."},"request_id":"xxx"}
and have no ANTHROPIC_API_KEY set.
just got this issue today as well
just got this issue today as well
![]()
I am facing the same issue!!!
My colleague is facing the same issue as well. Yesterday he upgraded from MAX 5x to 20x. It faced an error but the payment went out. This morning he logged into his account and noticed it was set on free plan (all chat and invoices had disappeared). he did another payment and the plan reactivated and all data went visible again (invoices and others). now when he logs into his IDE claude it get this error. We tried every solution suggested but nothing seems to work.
The same here, blocked yesterday during a coding session.
My colleague is facing the same issue as well. Yesterday he upgraded from MAX 5x to 20x. It faced an error but the payment went out. This morning he logged into his account and noticed it was set on free plan (all chat and invoices had disappeared). he did another payment and the plan reactivated and all data went visible again (invoices and others). now when he logs into his IDE claude it get this error. We tried every solution suggested but nothing seems to work.
The same here, blocked yesterday during a coding session.
My colleague is facing the same issue as well. Yesterday he upgraded from MAX 5x to 20x. It faced an error but the payment went out. This morning he logged into his account and noticed it was set on free plan (all chat and invoices had disappeared). he did another payment and the plan reactivated and all data went visible again (invoices and others). now when he logs into his IDE claude it get this error. We tried every solution suggested but nothing seems to work.
So its obviously a problem on their end. I hope they fix this soon or they will lose a lot of subs. It's a pity that their CS is so poorly managed while the tool itself works great.
Same here. A friend of mine has a max 5x plan and it allways resets on day 28, but for some reason it billed him on de 15th??? Now that he paid the bill when trying to log in and use claude code it seems to allways hit 400 (This organization has been disabled).
What happened? I got this issue as well
test
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This organization has been
disabled."},"request_id":"req_011CU96UvkMmTghBsn2T6EN8"}
We are experiencing the same problem here as well. We need to temporarily revert to Cursor....
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This organization has been disabled."},"request_id":"req_011CUAGaHWL3iNmDBtoobeJJ"
same issue here . My subscription expired and when i renewed it , i got the same error .
Same here
same issue here . My subscription expired and when i renewed it , i got the same error .
SAME ISSUE. I suddenly got refund and the message goes API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This organization has been disabled."},.
@claude HELP
Same here
@claude @claude fix the problem or refund us
Hey folks what is going on ? It was working last day and plan was expired yesterday only . we re-purchased the subscription today and now we are getting this same issue API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This organization has been disabled."}
@claude same issue here, after a 5x sub expired we reactivated it and get the "This Organisiation has been disabled" message.
@claude Our organization was automatically downgraded from Max plan to free plan without our knowledge or request. We then upgraded back to “Max plan", immediately after upgrading back to Max, we received the 'organization has been disabled' error". Our entire team is now unable to access the API. Here is the the specific error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This organization has been disabled."},"request_id":"req_011CUAgcbPTx9hW5DUsM3Ng2"}
Same thing here :( it's sad.
Without any warnings, the account has been disabled in an active subscription. No changes were made to billing.
Without any warnings the account has been disabled in active subscription. No changes made to billing. The same problem here
@claude
facing the same issue here
Same issue here
I am facing the same issue. Contacted support, no reply in 2 days.
Anthropic has a significant problem: they are not providing the service despite receiving subscription fees, and they are not explaining the cause of this error.
This just happened to me. Did some CC work on a few different locations/devices today. It happened as soon as I tried to reauth CC on my MacBook. It opened the URL in my browser and I authorized it. Now I'm getting "Organization has been disabled" on all devices.
Can't even use Claude.ai on web/phone. Entire account is locked. Insane for $100/month.
Same here, I’m also frustrated, getting flagged by their flawed ML detection and wasting my time.