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

Resolved 💬 3 comments Opened Apr 15, 2026 by DoisKoh 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 ↗

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