[BUG] --teleport only checks the origin remote, fails when the GitHub remote has a different name

Resolved 💬 4 comments Opened Apr 22, 2026 by alex-rosenberg35 Closed Jun 16, 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?

claude --teleport <session-id> fails with the error:

You must run claude --teleport <session-id> from a checkout of <user>/<repo>.

This happens even when the current directory is a checkout of the correct repository, when the GitHub remote is configured under a name other than origin.

In my case, origin was already in use for a different (non-GitHub) remote, and the GitHub remote was named github:

$ git remote show github
* remote github
  Fetch URL: git@github.com:<user>/<repo>.git
  Push  URL: git@github.com:<user>/<repo>.git
  HEAD branch: main

--teleport appears to only inspect origin rather than scanning all configured remotes for one that matches the session's repository slug.

What Should Happen?

--teleport should succeed as long as any configured remote points at the expected <user>/<repo> on GitHub, regardless of the remote's local name. Using origin for non-GitHub remotes (internal mirrors, GitLab, Gitea, etc.) is a very common and legitimate workflow.

Error Messages/Logs

You must run claude --teleport <session-id> from a checkout of <user>/<repo>.

Steps to Reproduce

  1. Clone a GitHub repository and rename origin to something else, or configure the GitHub remote under a non-origin name from the start:

``
git remote rename origin github
# or
git remote add github git@github.com:<user>/<repo>.git
``

  1. Optionally add a different remote under the name origin (e.g., an internal mirror).
  2. Create a Claude Code web session against the GitHub repo.
  3. Attempt to teleport: claude --teleport <session-id>.
  4. The command fails with the "must run from a checkout of <user>/<repo>" error even though the current directory is exactly that checkout.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.117

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Workaround

Temporarily renaming remotes so the GitHub remote is called origin:

git remote rename origin origin-internal
git remote rename github origin
claude --teleport <session-id>
git remote rename origin github
git remote rename origin-internal origin

This is disruptive because it invalidates existing branch tracking configuration that references origin/<branch>, and has to be repeated every time a session is teleported.

Suggested Fix

When verifying the repository, iterate over all remotes returned by git remote -v and accept the check if any of them resolves to the expected <user>/<repo> on GitHub, rather than only reading origin. This would also subsume the behavior requested in the (now closed) #11126, since SSH host aliases could be one of several resolvable remotes.

Additionally, the error message could be improved to say something like:

No configured git remote points at <user>/<repo>. Configured remotes: origin (<url>), github (<url>).

That would make the actual problem (remote name / URL mismatch) immediately diagnosable instead of suggesting the user is in the wrong directory.

View original on GitHub ↗

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