Teleports move a live Claude or Codex session between computers. The endpoints live in allternit-api and run on the destination computer. All paths are under /api/v1 and scoped to the signed-in owner.

Transfer lifecycle

Manifest

A transfer carries one native file, plus an optional patch (git diff from git_base to the Mac working tree) and an optional untracked tar. Each file has a kind and its own sha256. session_id names the gizzi session the vendor session id is stored under. harness is claude or codex. Claude files install at ~/.claude/projects/ under the working directory slug, and Codex rollouts under its sessions directory.

Idempotency and conflicts

Retrying with the same request_id and the same manifest returns the same transfer. The same request_id with a different manifest returns 409 request_conflict. Activating a native id that another transfer already owns returns 409 teleport_rejected. Activating twice is safe. Activation installs the file, applies the project files without overwriting cloud content, then asks the local gizzi to resume the session (--resume, same model and effort), send the handoff and replay queued prompts. The state is resuming until the first new output, then active; a failed resume leaves resume_failed, and activating again retries it.

Placement and relay

Cloud to Mac

App entry point

Apps start a move with POST /api/v1/native-sessions/teleport and the body { "sessionId", "to": "cloud" or "local", "harness", "targetId", "model", "base" }. That route resolves the session, builds the manifest on the Mac, and runs the steps above.

Deploy note

The tables are created on first use, so no migration runs on deploy.