[BUG] Can't create claude code web session from consle

Status Open
Reported on v2.1.34
Maintainer reply None cached
Activity 8 comments · opened 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?

Starting a web session from Claude Console fails.

What Should Happen?

The task is launched in Claude Code Web

Error Messages/Logs

Error: Unable to create remote session
Failed to create background session: Failed to create remote session. Try running /login and signing in with a claude.ai account (not Console).

Steps to Reproduce

I'm running the command from within a github repo which i've already used from Claude Code Web.
The account type is Login method: Claude Team Account according to /stats

Running claude --remote some task fails with:
Error: Unable to create remote session

Running claude & some task fails with:
Failed to create background session: Failed to create remote session. Try running /login and signing in with a claude.ai account (not Console). alltough I'm using a claude.ai account.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.34

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

_No response_

View original on GitHub ↗

8 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/16403
  2. https://github.com/anthropics/claude-code/issues/16831
  3. https://github.com/anthropics/claude-code/issues/23906

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

nsanghi · 6 months ago

I am facing the exact same issue in 2.1.37 as well

Have given detailed debug logs in the issue https://github.com/anthropics/claude-code/issues/24083

spencern · 6 months ago

~Same issue in 2.1.39. On a team plan.~

Edit: updated to 2.1.41 and it's working now.

chanakan-art · 6 months ago

Also experiencing this on v2.1.42 (latest), macOS, Max plan, OAuth login.

--remote error:

claude --remote "Summarize the current working directory structure"
Error: Unable to create remote session

--teleport error:

claude --teleport
Error loading Claude Code sessions
Sorry, Claude Code encountered an error

Additional context:

  • claude doctor shows no issues — native install, latest version, search OK
  • claude auth status confirms: loggedIn: true, authMethod: oauth_token, apiProvider: firstParty
  • Creating cloud sessions from the Claude.ai iOS app (Code tab) works fine — sessions run successfully on the phone side
  • The issue is specifically the local CLI ↔ cloud bridge in both directions

So the cloud infrastructure works (phone sessions run), but the CLI can't create or load remote sessions.

chrisjenx · 6 months ago

Just ran into this, Max Plan, logged in via OAuth, Re logged in and still fails with:

 Failed to create background session: Failed to create remote session. Try running /login and signing in with a claude.ai account (not Console).

I was previously logged in with a Work API Key, so not sure if there is stale state left around?

sstklen · 6 months ago

Hey! I ran into a similar pattern in our bug knowledge base and thought this might help.

What's happening: The remote/background session creation flow fails to properly authenticate OAuth-based claude.ai accounts (including Team and Max plans). The session creation endpoint rejects the credentials despite the user being logged in, likely due to: (1) stale authentication state left over from a previous API key login that conflicts with the current OAuth session, or (2) a regression in the remote session handshake that incorrectly classifies valid OAuth/Team tokens as Console API tokens. The error message 'Try running /login and signing in with a claude.ai account (not Console)' is misleading because users ARE signed in with claude.ai accounts — the detection logic is wrong.

What worked for us:

Clear stale auth state and re-authenticate. If that fails, this is a server-side regression in Anthropic's remote session creation API that requires a fix from the Claude Code team.

Steps:

  1. Run 'claude auth logout' to fully clear all auth state (removes any stale API key credentials)
  2. Delete the Claude Code auth cache directory: rm -rf ~/.claude/auth* (removes any lingering token files from previous login methods)
  3. Run 'claude login' and authenticate fresh via OAuth (claude.ai account, not API key)
  4. Verify with 'claude auth status' that loginMethod shows OAuth/claude.ai (not API key)
  5. Retry 'claude --remote' or background session creation
  6. If still failing after clean re-auth, this is a confirmed server-side regression — monitor the GitHub issue for an official fix from Anthropic
# Workaround: Full auth state reset
claude auth logout
rm -rf ~/.claude/auth*
claude login
# Then verify:
claude auth status
# Then retry:
claude --remote "test task"

# If the above doesn't work, the issue is server-side.
# One user noted switching from API Key to OAuth left stale state.
# The core bug is in Claude Code's remote session creation flow
# that misidentifies valid OAuth tokens as Console API tokens.

📊 _We found 1 similar case in our knowledge base with the same pattern — this gives us medium confidence in this analysis._

Hope this helps! Let me know if it doesn't match your case — happy to dig deeper. 🦞

_Disclosure: This analysis is from Confucius Debug, an AI-powered community KB for agent bugs. Please verify before applying._

---
<sub>🦞 Confucius Debug — community knowledge base for AI agent bugs. Free to search via MCP.</sub>

ilaikim99 · 6 months ago

Getting 'Unable to create remote session' or the misleading 'sign in with a claude.ai account' error despite being logged in? This is usually stale auth state from a previous API key login conflicting with your OAuth session. The fix is a specific auth reset sequence: https://cacheoverflow.dev/blog/cId54SUp

sstklen · 6 months ago

Thanks @ilaikim99 for confirming the auth state diagnosis and sharing that reset guide — should be a solid reference for others hitting this.

@chrisjenx your hunch was right: switching from a Work API Key to OAuth does leave stale state behind. A full auth reset (clearing ~/.claude/credentials.json + re-login) is the cleanest fix.

Updated summary for anyone landing here:

  1. Root cause: stale auth state from a previous API key login conflicting with OAuth session
  2. Fix: full auth reset sequence (clear cached credentials → /login fresh)
  3. Confirmed working on v2.1.41+; earlier versions (2.1.37–2.1.42) may have additional regressions