[BUG] claude auth login succeeds but doesn't persist credentials — auth status stays loggedIn: false

Open 💬 0 comments Opened Jul 9, 2026 by Clemssins

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: claude auth login reports "Login successful" but does not persist credentials (auth status stays loggedIn: false, Remote Control permanently blocked)

Environment:

Claude Code version: 2.1.205 (also reproduced on 2.1.202)
Install method: npm-global (@anthropic-ai/claude-code)
Platform: linux-x64, Docker container (node:20-slim base image)
Account: active Claude Pro subscription (stripe_subscription / claude_pro), confirmed via ~/.claude.json → oauthAccount, identical org UUID to a working Desktop install on Windows
Summary:
claude auth login --claudeai completes the OAuth browser flow successfully (valid authorization code accepted, prints "Login successful") but does not write any credentials to disk. claude auth status immediately afterward still reports loggedIn: false. As a result, /remote-control is permanently blocked with an "Enterprise required" message, and every fresh launch with --remote-control --name <name> forces a full interactive onboarding + login from scratch, even with a valid, already-authenticated interactive session present.

Steps to reproduce:

$ claude auth status
{"loggedIn": false, "authMethod": "none", "apiProvider": "firstParty"}
$ claude auth login --claudeai
Opening browser to sign in…
If the browser didn't open, visit: https://claude.com/cai/oauth/authorize?...
Paste code here if prompted > <valid code pasted>
Login successful.
$ claude auth status
{"loggedIn": false, "authMethod": "none", "apiProvider": "firstParty"}
Right after the "successful" login, find ~ -mmin -10 -type f shows no file under ~/.claude or ~/.claude.json was created or modified — both retain modification timestamps from well before the test.

claude doctor output, run immediately after:

Remote Control
Remote Control requires a claude.ai subscription. Run claude auth login to sign in with your claude.ai account.

  • Not signed in to claude.ai
  • claude.ai subscription auth not active
  • Sign-in is missing the user:profile scope

Separately, the interactive /login inside a running Claude Code session (a different code path) does correctly write ~/.claude.json and ~/.claude/.credentials.json with valid, current OAuth data — confirmed identical organizationUuid, billingType: "stripe_subscription", organizationType: "claude_pro" to a working Desktop install. So the interactive session itself is properly authenticated for normal chat/agent use, but this doesn't satisfy whatever claude auth status / Remote Control eligibility checks.

Expected behavior: claude auth login should persist a valid credential/token to disk after a successful OAuth exchange, and claude auth status should reflect it as logged in.

Actual behavior: OAuth exchange succeeds, "Login successful" is printed, but nothing is persisted and claude auth status continues to report loggedIn: false indefinitely.

Impact: This makes /remote-control completely unusable on this account despite an active Pro subscription, and makes unattended/headless reconnection (e.g. after a container restart) impossible without a human manually completing the OAuth flow every single time.

What Should Happen?

After a successful OAuth exchange (browser authorization completed, "Login successful" printed), the returned credentials should be persisted to disk (~/.claude/.credentials.json and/or ~/.claude.json), so that claude auth status reflects the logged-in state and subsequent CLI launches (including --remote-control) can reuse the session without requiring a fresh interactive login each time.

Error Messages/Logs

Steps to Reproduce

  1. On a headless Linux/Docker environment (node:20-slim base image), run claude auth status

→ returns {"loggedIn": false, "authMethod": "none", "apiProvider": "firstParty"}

  1. Run claude auth login --claudeai

→ prints "Opening browser to sign in…" and an OAuth authorize URL
→ complete the OAuth flow in a browser, paste the returned code
→ CLI prints "Login successful."

  1. Run claude auth status again, immediately after

→ still returns {"loggedIn": false, "authMethod": "none", "apiProvider": "firstParty"}

  1. Check for any credential file written or modified since step 2:

find ~ -mmin -10 -type f
→ no file under ~/.claude or ~/.claude.json was created or modified;
both retain modification timestamps from well before the test

  1. Run claude doctor

→ still reports:
Remote Control
Remote Control requires a claude.ai subscription. Run claude auth login to sign in with your claude.ai account.

  • Not signed in to claude.ai
  • claude.ai subscription auth not active
  • Sign-in is missing the user:profile scope
  1. As a separate data point: launching an interactive session (claude or claude --remote-control --name <name>) and completing the interactive /login flow (not claude auth login) DOES correctly write ~/.claude.json and ~/.claude/.credentials.json with valid OAuth data (confirmed identical organizationUuid, billingType: "stripe_subscription", organizationType: "claude_pro" to a working Desktop install on the same account) — but this still does not satisfy the claude auth status / Remote Control eligibility check, which appears to rely on a separate, never-populated credential path.

Reproduced identically on v2.1.202 and v2.1.205.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.205

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

tmux (inside a Docker container), accessed via SSH — no GUI terminal emulator involved. This is a headless/automated environment (container relaunches Claude Code non-interactively via a wrapper script).

View original on GitHub ↗