Claude Code authenticates to Console instead of claude.ai Max subscription on Windows (winget install) — ConnectionRefused error

Resolved 💬 3 comments Opened May 11, 2026 by lamvial1958 Closed May 14, 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?

OS: Windows 11
Versão: 2.1.137 (winget)
Problema: OAuth redireciona para platform.claude.com mesmo com --claudeai
Assinatura: claude.ai Max ativa

What Should Happen?

claude auth login --claudeai should authenticate against the claude.ai Max subscription, not the Anthropic Console. All API calls should succeed without requiring Console balance.

Error Messages/Logs

API Error: Unable to connect to API (ConnectionRefused)
Retrying in Xs · attempt N/10

Steps to Reproduce

  1. Install Claude Code via winget: winget install Anthropic.ClaudeCode
  2. Run: claude auth login --claudeai
  3. Observe OAuth URL in terminal — redirect_uri points to platform.claude.com/oauth/callback instead of claude.ai
  4. Complete browser authentication (Login successful)
  5. Run any command in Claude Code
  6. Error: Unable to connect to API (ConnectionRefused)
  7. Claude Code welcome screen shows "API Usage Billing" instead of claude.ai subscription

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.137 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

I've been using PowerShell and Vs Code, but none of them does it right

View original on GitHub ↗

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