Teleport a Kite task session to local Claude Code. Takes a teleport token generated by /kite teleport in Slack, fetches the converted session from the Kite worker, places it in the Claude Code session directory, and offers branch checkout. Use when: resuming a Kite task locally, teleporting a remote session, continuing cloud work in Claude Code. Triggers on: kite teleport, teleport session, resume kite task, kite token, kt_.
100
100%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
Teleport a remote Kite task session to your local Claude Code.
/kite teleport in a Slack task channel — gets a token like kt_a1b2c3d4claude --resume <sessionId>Extract anything matching kt_[0-9a-f]{8} from the user's input.
If no token found, ask: "Paste the teleport token from Slack (e.g., kt_a1b2c3d4)"
Tokens are single-use ephemeral secrets (10-min TTL). Do not log, store, or repeat the token value after extracting it.
Check if CWD is a git repo and extract the remote:
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "")
if [ -n "$REPO_ROOT" ]; then
REMOTE=$(git remote get-url origin 2>/dev/null || echo "")
fiIf not in a git repo, ask: "Where is your local clone of the repository?"
Run the teleport script:
if [[ -n "${CLAUDE_SKILL_DIR:-}" ]]; then
SCRIPT="${CLAUDE_SKILL_DIR}/scripts/teleport.sh"
else
SCRIPT="$(find ~/.claude -path "*/kite-teleport/scripts/teleport.sh" -type f 2>/dev/null | head -1)"
fi
RESULT=$(echo "${TOKEN}" | "$SCRIPT" --stdin "${REPO_ROOT}")Parse the JSON output to get sessionId, repo, branch, records, file.
If the script fails, tell the user:
/kite teleport again in Slack."Normalize both the worker's repo (owner/name) and the local git remote to owner/name format:
https://github.com/, git@github.com:, .git suffixIf they don't match, warn the user:
"This task is for {repo} but you're in {local_repo}. The session CWD may not match. Continue anyway?"
Tell the user: "This task was on branch {branch}. Want me to check it out?"
If yes:
git fetch origin
git checkout "{branch}" 2>/dev/null || git checkout -b "{branch}" "origin/{branch}"If checkout fails, show the manual command instead.
Session teleported! {records} records placed at:
{file}
Resume with:
claude --resume {sessionId}KITE_WORKER_URL environment variable must be set before use. The script has no hardcoded default — ask the user for their worker URL if not set.