[BUG] 401 authentication error

Resolved 💬 4 comments Opened Mar 3, 2026 by Fisher-Wang Closed Mar 31, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I'm using a machine sharing with other people under the same user account on linux. The machine is located in U.S..

After login and run any prompt, I got

hello                                                                                                                                                  
  ⎿  API Error: 401 {"error":{"message":"没有有效的订阅计划","type":"authentication_error"},"type":"error"} · Please run /login

I've tried using the solution from previous issues, e.g. https://github.com/anthropics/claude-code/issues/5893#issuecomment-3193488709, but neither work for me.

I'm a Max plan user. My claude code works perfectly as I'm in China using VPN connecting to either Hong Kong or U.S. But it surprise me not working for machines exactly located in U.S.

Other interesting point is that the error message is in Chinese (没有有效的订阅计划, means "No valid subscription plan.") on that U.S. machine. Is claude showing language based on its picture for the user? Does that means that claude is collecting user data and treat user seperately)? :)

What Should Happen?

Should work on U.S. machine as it has already works on my Chinese machine with VPN.

Error Messages/Logs

Steps to Reproduce

  1. Clean exisiting installation
npm uninstall -g @anthropic-ai/claude-code

# Remove user settings and state
rm -rf ~/.claude
rm ~/.claude.json

# Remove project-specific settings (run from your project directory)
rm -rf .claude
rm -f .mcp.json
  1. Install
curl -fsSL https://claude.ai/install.sh | bash
  1. Login and exit
/login
# Select 1. Claude account with subscription · Pro, Max, Team, or Enterprise

Login successfully, with message:

╭─── Claude Code v2.1.63 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                    │ Tips for getting started                                                                         │
│                Welcome back Fisher!                │ Run /init to create a CLAUDE.md file with instructions for Claude                                │
│                                                    │ Note: You have launched claude in your home directory. For the best experience, launch it in a … │
│                                                    │ ──────────────────────────────────────────────────────────────────────────────────────────────── │
│                       ▐▛███▜▌                      │ Recent activity                                                                                  │
│                      ▝▜█████▛▘                     │ No recent activity                                                                               │
│                        ▘▘ ▝▝                       │                                                                                                  │
│       Sonnet 4.6 · API Usage Billing ·             │                                                                                                  │
│       xxx@gmail.com's Organization      │                                                                                                  │
│                    /home/xxx                    │                                                                                                  │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

However, I'm using "1. Claude account with subscription · Pro, Max, Team, or Enterprise", not "2. Anthropic Console account · API usage billing" for billing.

Then exit:

/exit
  1. re-enter claude, prompt anything, and got above error

Claude Model

None

Last Working Version

_No response_

Claude Code Version

2.1.63 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Cursor

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗