Skip to content

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

Description

@DoisKoh

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 Max plan shows as 'API Usage Billing' in CLI #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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:autharea:clibugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions