[BUG] API ERROR 401 after login on Ubuntu
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 installed latest extension v2.1.37, and logged in but I am getting an error like
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CXuFitVC4xWPZPwP13z11"} · Please run /login
<img width="764" height="327" alt="Image" src="https://github.com/user-attachments/assets/42b88992-47e8-4959-b751-e901dbc918fa" />
I tried to install old versions like 2.1.7, or 2.1.34...
My OS is Ubuntu 22.04.
What Should Happen?
Claude Code should be fully worked.
Error Messages/Logs
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CXuFitVC4xWPZPwP13z11"} · Please run /login
Steps to Reproduce
- install latest extension v 2.1.37 on VS Code
- Send "HI" message on extension chat.
- Login Claude
- Getting an error like
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CXuFitVC4xWPZPwP13z11"} · Please run /login
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.37
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
4 Comments
<img width="1628" height="668" alt="Image" src="https://github.com/user-attachments/assets/bca26c6f-2b61-4f24-bd9c-ab8e6e22632e" />
<img width="707" height="704" alt="Image" src="https://github.com/user-attachments/assets/db55f9bb-6206-445d-8647-a74b8dd2006f" />
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I've fixed it by installing claude code node module.
npm install -g @anthropic-ai/claude-code
export NODE_OPTIONS="--max-http-header-size=80000"
export HTTP_TIMEOUT=120000
export HTTPS_TIMEOUT=120000
claude auth status
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.