[BUG] --teleport fails to recognize repository when git remote uses SSH alias (non-standard) format

Resolved 💬 2 comments Opened Mar 7, 2026 by omairdna Closed Apr 5, 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?

When running claude --teleport <session_id> from within the correct repository directory, the command fails with the error:

You must run claude --teleport <session_id> from a checkout of I-AI-Corp/iai-explorer.

However, the user IS inside the correct repository. The issue is that the repository's git remote uses a non-standard SSH alias format (e.g., omairiai:I-AI-Corp/iai-explorer.git for the origin remote) rather than the standard git@github.com:... or https://github.com/... formats.

The --teleport flag appears to only recognize standard remote URL formats when validating the repository. It fails to parse/match SSH alias remotes (where the host portion is an alias defined in ~/.ssh/config), causing it to incorrectly reject valid checkouts.

Steps to Reproduce:

  1. Have a repository with a non-standard SSH alias remote:
  2. ```
  3. http https://github.com/I-AI-Corp/iai-explorer.git (fetch)
  4. http no_push (push)
  5. origin omairiai:I-AI-Corp/iai-explorer.git (fetch)
  6. origin omairiai:I-AI-Corp/iai-explorer.git (push)
  7. ```
  8. (where omairiai is an SSH alias in ~/.ssh/config resolving to github.com)
  9. Start a Claude Code web session for the I-AI-Corp/iai-explorer repository.
  10. Run claude --teleport <session_id> from within the repository directory.

Result: Error: You must run claude --teleport <session_id> from a checkout of I-AI-Corp/iai-explorer.

Expected: The teleport command should successfully connect because you ARE in a valid checkout — the origin remote resolves to github.com/I-AI-Corp/iai-explorer.git.

What Should Happen?

claude --teleport should recognize the repository when the git remote uses an SSH alias format (e.g., omairiai:I-AI-Corp/iai-explorer.git). The repository validation logic should either:

  1. Look at all remotes (not just origin), including the http remote which uses a standard HTTPS URL (https://github.com/I-AI-Corp/iai-explorer.git), or
  2. 2. Handle SSH alias remote formats by extracting the repository path portion (the owner/repo part after the colon) without requiring the host to be a recognized GitHub domain literal.

Error Messages/Logs

❯ claude --teleport session_01694AhJN65dpu1K2GjAdZz8

You must run claude --teleport session_01694AhJN65dpu1K2GjAdZz8 from a checkout of I-AI-Corp/iai-explorer.

  ~/projects/iv-living-archive   fix/taste-profile-chat-loading *10 !10 ?64 ········ ▼   10:32:59 AM

❯ git remote -v

http    https://github.com/I-AI-Corp/iai-explorer.git (fetch)
http    no_push (push)
origin  omairiai:I-AI-Corp/iai-explorer.git (fetch)
origin  omairiai:I-AI-Corp/iai-explorer.git (push)

Steps to Reproduce

  1. Have a GitHub repository cloned locally where the origin remote uses an SSH alias format (e.g., omairiai:I-AI-Corp/iai-explorer.git where omairiai is an SSH config alias for github.com).
  2. 2. Start a Claude Code web session linked to that repository (I-AI-Corp/iai-explorer).
  3. 3. cd into the local repository directory.
  4. 4. Run claude --teleport <session_id>.
  5. 5. Observe the error: You must run claude --teleport <session_id> from a checkout of I-AI-Corp/iai-explorer.

Note: The repository also has an http remote with a standard HTTPS URL (https://github.com/I-AI-Corp/iai-explorer.git) that is not being recognized either.

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.71

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

The origin remote uses an SSH config alias omairiai which maps to github.com in ~/.ssh/config. This is a common pattern for users who manage multiple GitHub accounts with different SSH keys per account.

The http named remote also has the standard HTTPS URL for this repository (https://github.com/I-AI-Corp/iai-explorer.git) but that also isn't being picked up by the teleport validation logic.

The teleport session was started from claude.ai/code for the correct repository (I-AI-Corp/iai-explorer).

View original on GitHub ↗

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