Group of 3 Under the hood
Git operations used by Claude Code's teleport feature now run against the correct working directory and can auto-stash uncommitted changes first
What
- Internal git helpers used for the "teleport" feature (upstream-set, branch checkout, current-branch lookup) now resolve a stable checkout root via a new helper and pass an explicit working directory and environment to every git subprocess, instead of relying on the process's ambient working directory.
- A new verification step checks that the checkout's
.gitentry actually points back to the resolved repository, throwing an error ("Could not verify this checkout's git repository") if it doesn't. - A new auto-stash helper stages untracked files and runs
git stash push --message, backing a new "Teleport auto-stash" flow that stashes uncommitted changes before teleporting.
Why
This prevents teleport's git commands from accidentally acting on the wrong repository or directory, and avoids losing uncommitted work by stashing it automatically before switching.