# Teleport Moves an agent to another machine without losing anything: its conversation, its branch and commits, and the work it hasn't committed, staged and unstaged as it was. It carries on there, told that it moved. ## What it is A dialog mod (`mod.json`), opened with ⌘⇧T on the agent you're in, or with `ctrl-t` on an agent in [Recap](https://github.com/mrolafsson/herdr-recap). ## Installing it (for the agent adding it) 1. Copy `mods/teleport/` to `~/.config/herdr-app/mods/teleport/`. 2. Merge `keys.json` into the person's: add its sections and keys; ask before replacing a key they already bind to something else. 3. `herdr-app check ~/.config/herdr-app/mods/teleport`. Don't install anything on any machine: the mod fetches the herdr-teleport release it needs onto each machine it uses, checked against the release's `checksums.txt`, into `~/.local/share/herdr-teleport/app//`. What it needs there is already present: git, Claude Code, `curl`, `tar`, `dd` and `sha256sum` or `shasum`. ## What it does, and asks - Packs the agent's session on its machine (`herdr-teleport pack`): the transcript and what Claude Code keeps beside it (subagents, checkpoints, tasks, todos, the project's memory), and a git bundle of the commits its origin doesn't have plus two snapshot commits (what's staged, and everything else not ignored). It refuses while the agent is working or the repo is mid-merge or mid-rebase. - Carries the pack to the other machine through herdr-core (`hc exec`, in pieces of 6 MiB), and unpacks it there in a terminal of its own (`hc run --bg`): finds the clone with the same origin (behind `~/.herdr/worktrees`, else under `~/projects`, `~/src`…) or clones it, puts the branch in a worktree, restores the work and checks it against the snapshots, and files the transcript where Claude Code finds it. - Then stops the agent where it was, checks nothing was said to it since it was packed, and starts `claude --resume` in a new space on the other machine, with a note about the move as its first message. If anything fails after the agent was stopped, it's resumed where it was. - Ignored files (`.env`, `node_modules`, build output) and running processes don't go. The folder on the first machine is left as it was. ## Keys (`keys.json`) `cmd-shift-t` opens it. In it: `↑` `↓` choose the machine, `enter` teleports, `escape` cancels it while it runs (until the agent is stopped: anything it put on the other machine is taken back) and closes after, `ctrl-r` reports a stop. `teleport.demo` (with `herdr-app do`, while it's open) switches to made-up machines and an agent, and touches nothing.