[BUG] --teleport fails to recognize repository when git remote uses SSH alias (non-standard) format
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:
- Have a repository with a non-standard SSH alias remote:
- ```
- 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)
- ```
- (where
omairiaiis an SSH alias in~/.ssh/configresolving togithub.com) - Start a Claude Code web session for the
I-AI-Corp/iai-explorerrepository. - 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:
- Look at all remotes (not just
origin), including thehttpremote which uses a standard HTTPS URL (https://github.com/I-AI-Corp/iai-explorer.git), or - 2. Handle SSH alias remote formats by extracting the repository path portion (the
owner/repopart 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
- Have a GitHub repository cloned locally where the
originremote uses an SSH alias format (e.g.,omairiai:I-AI-Corp/iai-explorer.gitwhereomairiaiis an SSH config alias forgithub.com). - 2. Start a Claude Code web session linked to that repository (
I-AI-Corp/iai-explorer). - 3.
cdinto the local repository directory. - 4. Run
claude --teleport <session_id>. - 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).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗