claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug/Documentation] 'Organization has been disabled' error when ANTHROPIC_API_KEY overrides Max/Pro subscription

Open Toowiredd opened this issue 3 months ago • 69 comments

[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

  1. Have a valid Claude Max/Pro subscription
  2. Have ANTHROPIC_API_KEY environment variable set to a key from a disabled organization
  3. Run claude --print "test" or npx @anthropic-ai/claude-code@latest --print "test"
  4. 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

  1. 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."
    
  2. 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."
    
  3. 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
  4. Add --use-subscription Flag: 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.

Toowiredd avatar Sep 29 '25 01:09 Toowiredd

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:

  1. claude --use-subscription --print "test"
  2. unset ANTHROPIC_API_KEY
  3. logout + login

tkluza avatar Oct 09 '25 09:10 tkluza

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:

  1. claude --use-subscription --print "test"
  2. unset ANTHROPIC_API_KEY
  3. 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: @.***>

Toowiredd avatar Oct 09 '25 17:10 Toowiredd

I'm encountering this issue as well.

pianostringquartet avatar Oct 12 '25 23:10 pianostringquartet

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.

pmatos avatar Oct 15 '25 07:10 pmatos

just got this issue today as well

Image

dxv2k avatar Oct 15 '25 10:10 dxv2k

just got this issue today as well

Image

I am facing the same issue!!!

MidoriyaHero avatar Oct 15 '25 11:10 MidoriyaHero

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.

micheledalsanto avatar Oct 15 '25 12:10 micheledalsanto

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.

celobusana avatar Oct 15 '25 13:10 celobusana

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.

micheledalsanto avatar Oct 15 '25 13:10 micheledalsanto

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).

IsraelAraujo70 avatar Oct 15 '25 13:10 IsraelAraujo70

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"}

akosiyawin avatar Oct 15 '25 13:10 akosiyawin

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"

Tocchizawa avatar Oct 16 '25 04:10 Tocchizawa

same issue here . My subscription expired and when i renewed it , i got the same error .

pgpavlides avatar Oct 16 '25 06:10 pgpavlides

Same here

same issue here . My subscription expired and when i renewed it , i got the same error .

YJack0000 avatar Oct 16 '25 08:10 YJack0000

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."},.

Lanznx avatar Oct 16 '25 08:10 Lanznx

@claude HELP

Lanznx avatar Oct 16 '25 08:10 Lanznx

Same here

TenUchikawa avatar Oct 16 '25 08:10 TenUchikawa

@claude @claude fix the problem or refund us

Amazighozn-ti avatar Oct 16 '25 08:10 Amazighozn-ti

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."}

Shivam-dev925 avatar Oct 16 '25 10:10 Shivam-dev925

@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"}

Jacob-Mbendera avatar Oct 16 '25 11:10 Jacob-Mbendera

Same thing here :( it's sad.

gtplusnet avatar Oct 16 '25 11:10 gtplusnet

Without any warnings, the account has been disabled in an active subscription. No changes were made to billing.

mrakhror avatar Oct 16 '25 13:10 mrakhror

Without any warnings the account has been disabled in active subscription. No changes made to billing. The same problem here

Image Image

@claude

miqianmimi avatar Oct 16 '25 16:10 miqianmimi

facing the same issue here

miqianmimi avatar Oct 16 '25 16:10 miqianmimi

Same issue here

nvelingker avatar Oct 16 '25 19:10 nvelingker

I am facing the same issue. Contacted support, no reply in 2 days.

svseas avatar Oct 17 '25 00:10 svseas

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.

Tocchizawa avatar Oct 17 '25 00:10 Tocchizawa

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.

Sal-Romano avatar Oct 17 '25 01:10 Sal-Romano

Same here, I’m also frustrated, getting flagged by their flawed ML detection and wasting my time.

jamie0xgitc0decat avatar Oct 17 '25 02:10 jamie0xgitc0decat