Skip to content

[BUG] VS Code Extension Authentication Completely Broken on Linux aarch64 #34203

@eugenecohen-osu

Description

@eugenecohen-osu

Preflight Checklist

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

What's Wrong?

Environment

  • OS: Ubuntu 25.10 (aarch64 / arm64)
  • Architecture: aarch64 (uname -m = aarch64)
  • VS Code Extension Version: 2.1.75 (anthropic.claude-code-2.1.75-linux-arm64)
  • VM: aarch64 Ubuntu VM running on Apple Silicon Mac
  • Auth method attempted: Anthropic Console (OAuth)

Description

The VS Code extension authentication is completely non-functional on Linux aarch64. The OAuth flow appears to complete successfully (browser redirects, user authorizes, success page shown), but the extension never transitions to an authenticated state. Every attempt to use the extension results in:

Could not resolve authentication method. Expected either apiKey or authToken to be set.
Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted

This is related to #15958 but specifically affects Linux aarch64, which appears to be an untested/unsupported platform combination.

What I've Tried

All of the following were attempted and failed to resolve the issue:

  1. Standard /login → Anthropic Console OAuth flow (browser authorizes, returns to extension still unauthenticated)
  2. Manually creating ~/.claude/config.json with primaryApiKey field
  3. Setting ANTHROPIC_API_KEY environment variable in ~/.bashrc
  4. Setting ANTHROPIC_API_KEY in /etc/environment and rebooting
  5. Setting ANTHROPIC_API_KEY in VS Code settings.json via claude.env and terminal.integrated.env.linux
  6. Creating ~/.claude/.credentials.json with apiKey field
  7. Deleting all ~/.claude config and starting fresh
  8. Verifying ANTHROPIC_API_KEY is visible in the VS Code integrated terminal (echo $ANTHROPIC_API_KEY returns the correct value)

Key Observation

The CLI binary itself works correctly when invoked directly from a terminal:

~/.vscode/extensions/anthropic.claude-code-2.1.75-linux-arm64/resources/native-binary/claude --version
# Output: 2.1.75 (Claude Code)

~/.vscode/extensions/anthropic.claude-code-2.1.75-linux-arm64/resources/native-binary/claude
# Successfully opens interactive Claude Code session

This confirms the aarch64 binary itself is functional. The problem is specifically in how the VS Code extension host spawns the CLI subprocess — it does not pass through the API key from any source (env var, config.json, or credentials file).

Suspected Root Cause

I note that version 2.1.6 included a fix for "VSCode: Fixed extension not working on Windows ARM64 by falling back to x64 binary via emulation". A similar fix does not appear to exist for Linux ARM64, which may be the gap here. The extension host subprocess on Linux aarch64 appears to be unable to resolve credentials from any source.

Happy to provide additional logs or test any fixes. This is a complete blocker for using the VS Code extension on Linux aarch64.

What Should Happen?

Please either:

  1. Apply a similar fix for Linux aarch64 as was done for Windows ARM64, or
  2. Ensure the subprocess correctly inherits ANTHROPIC_API_KEY from the environment on Linux aarch64

Error Messages/Logs

The extension consistently logs this sequence on every auth attempt:


[info] API key saved to config file
[info] Login successful
[DEBUG] [API:auth] OAuth token check starting
[DEBUG] [API:auth] OAuth token check complete
[DEBUG] [clientData] skipped: not OAuth subscriber or missing profile scope
[ERROR] Auth error: No API key available
[ERROR] Could not resolve authentication method. Expected either apiKey or authToken to be set.


Note: The extension reports "Login successful" and "API key saved to config file" but then immediately fails with "No API key available". The subprocess checks only for OAuth credentials, finds none, and never falls back to `config.json` or the `ANTHROPIC_API_KEY` environment variable.

Steps to Reproduce

  1. Install Claude Code extension in vscode in aarch64 linux Ubuntu 25.10
  2. Open Claude Code and attempt to authenticate via Claude Console

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.75 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workingplatform:linuxIssue specifically occurs on Linuxplatform:vscodeIssue specifically occurs in VS Code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions