--teleport fails with 'Session expired' on confirmed-active cloud session (OAuth, correct account)

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Apr 15, 2026 · closed Apr 15, 2026

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
``

  1. Observe immediate error: Session expired. Please run /login to sign in again.
  2. 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.

View original on GitHub ↗

3 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/40203
  2. https://github.com/anthropics/claude-code/issues/36620
  3. https://github.com/anthropics/claude-code/issues/45535

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

DoisKoh · 6 months ago

Sorry, Claude Code filed this issue for me.

I want to note that all of the things it said was actually true EXCEPT, running /login again DID fix the issue (still possibly some kind of bug though).

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.