[BUG] API ERROR 401 after login on Ubuntu

Status Fixed / completed
Reported on v2.1.7
Maintainer reply None cached
Activity 4 comments · opened Feb 7, 2026 · closed Feb 7, 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 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

  1. install latest extension v 2.1.37 on VS Code
  2. Send "HI" message on extension chat.
  3. Login Claude
  4. 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_

View original on GitHub ↗

4 Comments

jonathanleonwork · 8 months ago

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

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/17402
  2. https://github.com/anthropics/claude-code/issues/19078
  3. https://github.com/anthropics/claude-code/issues/23568

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

jonathanleonwork · 8 months ago

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

github-actions[bot] · 8 months ago

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.