claude-code - 💡(How to fix) Fix --teleport fails with 'Session expired' on confirmed-active cloud session (OAuth, correct account) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48777Fetched 2026-04-16 06:51:15
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5commented ×2closed ×1

claude --teleport <session_id> fails with:

Session expired. Please run /login to sign in again.

…even though:

  • The cloud session is confirmed still active in claude.ai/code (visible in session list, not archived).
  • The local CLI is signed in via OAuth as the same claude.ai account that created the cloud session.
  • The interactive claude CLI works fine (i.e., login isn't actually broken).
  • I tried from a second alias signed into a different work account too — same error.
  • No ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or ANTHROPIC_BASE_URL set in environment or shell rc files (ruling out #20976 root cause).

The error message is misleading: nothing visible is actually expired.

Error Message

  • I tried from a second alias signed into a different work account too — same error. The error message is misleading: nothing visible is actually expired.
  1. Observe immediate error: Session expired. Please run /login to sign in again. Either teleport succeeds, or the error explains what is actually wrong (e.g. account mismatch, scope mismatch, session ownership, server-side state).
  • #22972 (closed as dup of #20976) — same error string but different root cause (env-var override). This appears to be a separate failure mode of the same generic "Session expired" error. Suggest improving the error message to distinguish: (a) local auth missing/expired, (b) account mismatch with session owner, (c) session not found server-side, (d) scope/subscription mismatch.

Root Cause

…even though:

  • The cloud session is confirmed still active in claude.ai/code (visible in session list, not archived).
  • The local CLI is signed in via OAuth as the same claude.ai account that created the cloud session.
  • The interactive claude CLI works fine (i.e., login isn't actually broken).
  • I tried from a second alias signed into a different work account too — same error.
  • No ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or ANTHROPIC_BASE_URL set in environment or shell rc files (ruling out #20976 root cause).

Code Example

Session expired. Please run /login to sign in again.

---

claude --teleport session_016iYh47iYVCf6KxBJ9MyRUN
RAW_BUFFERClick to expand / collapse

Description

claude --teleport <session_id> fails with:

Session expired. Please run /login to sign in again.

…even though:

  • The cloud session is confirmed still active in claude.ai/code (visible in session list, not archived).
  • The local CLI is signed in via OAuth as the same claude.ai account that created the cloud session.
  • The interactive claude CLI works fine (i.e., login isn't actually broken).
  • I tried from a second alias signed into a different work account too — same error.
  • No ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or ANTHROPIC_BASE_URL set in environment or shell rc files (ruling out #20976 root cause).

The error message is misleading: nothing visible is actually expired.

Environment

  • Claude Code: v2.1.109
  • macOS: 26.3.1 (darwin 25.3.0)
  • Shell: zsh
  • Auth: OAuth (claude.ai), no API key in env
  • CLAUDE_CODE_ENTRYPOINT=cli

Steps to Reproduce

  1. Start a remote session on claude.ai/code (confirmed active, visible in web session list).
  2. In a local terminal where claude is OAuth-logged-in as the same account, run:
    claude --teleport session_016iYh47iYVCf6KxBJ9MyRUN
  3. Observe immediate error: Session expired. Please run /login to sign in again.
  4. Running /login again does not change the behavior.

Expected

Either teleport succeeds, or the error explains what is actually wrong (e.g. account mismatch, scope mismatch, session ownership, server-side state).

Related

  • #22972 (closed as dup of #20976) — same error string but different root cause (env-var override).
  • #20976 — root cause was ANTHROPIC_BASE_URL in PowerShell profile; doesn't apply here.

This appears to be a separate failure mode of the same generic "Session expired" error. Suggest improving the error message to distinguish: (a) local auth missing/expired, (b) account mismatch with session owner, (c) session not found server-side, (d) scope/subscription mismatch.

extent analysis

TL;DR

The issue is likely due to a mismatch between the local CLI authentication and the cloud session ownership, and improving the error message to distinguish between different failure modes could help diagnose the issue.

Guidance

  • Verify that the cloud session is indeed owned by the same account that is signed in via OAuth in the local CLI, and that the session is not archived or expired on the server-side.
  • Check the scope and subscription settings for the account to ensure they match the requirements for the cloud session.
  • Consider adding more detailed error messages to the claude CLI to distinguish between different failure modes, such as account mismatch, scope mismatch, or session not found server-side.
  • Test the claude --teleport command with a different session ID to see if the issue is specific to one session or a more general problem.

Example

No code snippet is provided as the issue seems to be related to authentication and session management, and not a specific code problem.

Notes

The issue is likely related to the authentication and session management mechanisms of the claude CLI, and improving the error messages could help diagnose the issue. However, without more information about the internal workings of the claude CLI and its authentication mechanisms, it is difficult to provide a more specific solution.

Recommendation

Apply a workaround by verifying the account and session settings, and consider improving the error messages to distinguish between different failure modes, as the root cause of the issue is not clearly identified.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix --teleport fails with 'Session expired' on confirmed-active cloud session (OAuth, correct account) [2 comments, 2 participants]