Title: CLI login flow is unreliable — takes multiple attempts, inconsistent behavior

Resolved 💬 3 comments Opened Apr 7, 2026 by paysonw Closed Apr 11, 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?

Title: CLI login flow is unreliable — takes multiple attempts, inconsistent behavior

Description:

The /login flow from Claude Code CLI is extremely frustrating. What should take 30 seconds took ~15 minutes and 6 attempts.

Issues encountered:

  • Pasting the auth link (rather than clicking) was a poor experience
  • Sometimes no auth code was provided to paste back
  • Login reported success but then immediately required re-authentication
  • Inconsistent behavior across attempts — no clear pattern to what worked vs. didn't

Environment:

  • macOS (Darwin 25.4.0)
  • Claude Code CLI
  • OAuth flow

Impact: High friction for an otherwise great product. The CLI experience once logged in is excellent — the login gate is the weakest
link.

What Should Happen?

Easy logon. 1 time. No need to paste. Claude Code opens browser for me. No need to paste codes back and forth.

An incredible resource where the login process feels like a 3rd grader coded it while he was high on crack.

Error Messages/Logs

Steps to Reproduce

Are you connected?
⎿ Please run /login · 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_011CZpc999B3CP1dTCdQoiB4"}

❯ run /login · 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_011CZpc999B3CP1dTCdQoiB4"}
⎿ Please run /login · 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_011CZpcB2B2hw3YQhdvcph4y"}

❯ /login · 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_011CZpcB2B2hw3YQhdvcph4y"}
⎿ Login successful

❯ are we connected

⏺ Yes, we're connected. The login succeeded — you're good to go.

NOTE THERE 3-6 Additional attempts not shown, including trying a clean terminal

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.92 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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