Remote Sessions
Hand off an in-progress Kimchi Coding session to a cloud sandbox with /teleport and resume it from anywhere — the CLI, the Kimchi console, or VS Code.
Remote Sessions move an in-progress Kimchi Coding session from your local machine to a cloud sandbox, so the agent keeps running when you close your laptop, switch machines, or hand off to a teammate. Start the hand-off with /teleport in the CLI, then resume the session from the CLI, the Kimchi console, or VS Code.
Use Remote Sessions when a task is too long to babysit, when you need to switch devices, or when you'd rather not be tied to one terminal.
Prerequisites
- Kimchi CLI v0.1.52 or newer —
/teleportand/remote-sessionsship in CLI builds from v0.1.52 onward. Check your version withkimchi --version, and update withkimchi updateif needed.
/teleportand/remote-sessionswere added in Kimchi CLI v0.1.52. Older builds don't have these commands. Verify withkimchi --version, and if you're on an earlier release, runkimchi updateto upgrade.
/teleport isn't available on Windows. Remote Sessions currently only work on macOS and Linux.
The remote workspace runs its own
kimchiconfig, separate from your local machine. Skills, MCP servers, custom hooks, multi-model orchestration settings, and tools you have installed under~/.config/kimchi/,~/.pi/agent/skills/, or~/.claude/skills/on your laptop are not copied to the sandbox —/teleportonly rsyncs files inside your project's working directory.If your team shares these via the repo (e.g. a committed
.kimchi/folder or a project-level skills directory tracked in git), those will travel. Anything you've installed only on your local machine needs to be re-installed in the workspace — sign in with/loginand re-add what you need.
Before you start
- A Kimchi Coding session in progress — start one in your local
kimchiCLI or inside a Ferment plan. The session can be in any phase (planning, building, reviewing). - A task you expect to take a while —
/teleportis most useful for jobs where you'll close your laptop, switch contexts, or come back later.
Workspaces and sessions
A workspace is the cloud sandbox your work runs in; a session is one agent run inside it. A single workspace can host multiple sessions at the same time — tab between them with Ctrl+B c / n / p, or browse them all under one workspace via /remote-sessions.
Group related sessions in the same workspace whenever they share a project or repo: different angles on the same task, parallel investigations, or handoffs between agents. Sharing a workspace means shared files, shared state, and a single place to resume from later. Spinning up a new workspace for every session burns through the per-user quota and scatters related work across sandboxes.
Hand off your session to the cloud
/teleport flags
/teleport flagsBeyond the default /teleport, a few flags cover common cases:
| Flag | What it does |
|---|---|
--workspace <ref> | Reuse an existing workspace instead of minting a new one. Accepts UUID, name, or host nickname. |
--git-repo <url> | Clone from a git URL instead of rsyncing your local files. Supports HTTPS and SSH. |
--branch <branch> | Branch to check out after cloning. Requires --git-repo. |
--allow-dirty | Proceed even if your git working tree has uncommitted changes. |
--force | Proceed even if your workspace exceeds the 5 GB size limit. |
--no-git-token | Skip the git token prompt entirely — private repos on the sandbox will be inaccessible. |
--skip-session | Don't upload your current session history. The remote agent starts fresh. |
Examples:
/teleport --workspace mybox task-2 # new session in an existing workspace
/teleport --git-repo https://github.com/org/repo.git --branch main
/teleport --allow-dirty # ship uncommitted changesYou can also pass an optional positional name to label the session: /teleport my-feature. Allowed characters are letters, digits, -, _. Names must be unique within a workspace.
Git credentials
When /teleport detects a git remote (e.g. github.com), it prompts for a personal access token. The token is forwarded to the sandbox so the remote agent can push and pull from private repositories.
The prompt offers:
- Token input — paste a personal access token. The display is masked.
- Save for future sessions — toggle with
Tab. When enabled, the token is saved locally so you won't be prompted again for the same host. - Skip — press
Escto continue without git credentials. The remote won't be able to access private repos.
If you previously saved a token for the host, kimchi uses it automatically. Use --no-git-token to suppress the prompt entirely.
Work inside the PTY overlay
The PTY overlay behaves like a fullscreen terminal multiplexer on the remote sandbox. Your session, skills, and agent state are already there — keep typing, run commands, and let the agent finish the task.
Tab between sessions
Open and switch between independent sessions inside the same workspace:
| Shortcut | Action |
|---|---|
Ctrl+B c | Open a new tab |
Ctrl+B n / Ctrl+B p | Move to the next / previous tab |
Ctrl+B 1–Ctrl+B 9 | Jump directly to a tab by number |
Ctrl+B Esc | Cancel the chord (if you pressed Ctrl+B by mistake) |
Each tab is an independent session inside the same workspace — useful for running a second parallel task or just poking around while the first agent is mid-run. Sessions are long-lived: they keep running on the server after you disconnect, so you can come back later and resume exactly where you left off.
Tabs are lazy by default — their WebSocket only opens when you switch to them, keeping socket usage low. The first tab you open through /teleport is eager (always connected). The chord state resets after one operand; unknown operands are silently consumed so they don't leak into the active shell.
Tab indicators
| Indicator | Meaning |
|---|---|
| Inverted background | Active tab |
• (dot) | Dirty — the tab received new output while it was inactive |
○ (circle) | Disconnected — lazy tab, WebSocket not yet opened |
⚠ (warning) | Degraded — reconnecting or fatal error |
… (ellipsis) | Tab bar is truncated; more tabs exist off-screen |
Push local changes without restarting
If you've made local changes since the initial sync, push them without restarting the session:
/sync up --workspace mybox --source ./src/ --target ~/project/src//sync runs rsync between your local machine and the sandbox in either direction — up (local → remote) or down (remote → local). Both directions require --workspace, --source, and --target. Common flags:
| Flag | What it does |
|---|---|
--exclude <glob> | Skip files matching the glob. Repeatable. |
--include-ignored | Include gitignored files in the transfer (default: skipped). |
--delete | Delete extraneous files at the target that don't exist at the source. |
--dry-run | Preview the transfer without writing anything. |
Default excludes for directory transfers: node_modules/, dist/, .next/, target/, __pycache__/, .venv/, .env*, *.log, .DS_Store, .kimchi/, plus your repo's gitignored entries (unless --include-ignored is set). Single-file transfers skip these and use only the explicit --exclude patterns.
Pull a directory back to your laptop with a trailing slash on the remote source:
/sync down --workspace mybox --source ~/project/dist/ --target ./dist/Open the workspace in VSCode
Run /ssh-config inside the overlay, then switch to VS Code → Remote Sessions — the workspace shows up automatically and you can connect straight to the remote filesystem. Everything is wired up; no manual ~/.ssh/config edits required. You get a full editor pointed at the workspace — available immediately, while the agent keeps working in the overlay.
Exit the overlay any time
Press Ctrl+D to drop back to your local kimchi prompt. The sandbox keeps running, the session keeps running, the agent keeps going. Nothing dies.
When a session terminates normally (e.g. you type exit in the shell), its tab closes. If that was the last tab, the overlay exits and you return to local kimchi. A tab closed by a fatal error stays in the tab bar so you can see the reconnect banner and decide whether to retry or exit.
Copy from the sandbox to your local clipboard
Hold Shift or Option while selecting text to copy it directly to your local clipboard — bypassing the terminal's mouse protocol and any remote clipboard. This is the recommended way to copy from the remote sandbox to your laptop.
Remote programs that emit OSC 52 escape sequences (e.g. tmux with set -g set-clipboard on) also sync their clipboard to your local machine automatically.
Reconnect after a dropped connection
If the WebSocket drops, the overlay shows a status banner and attempts automatic reconnection. The overlay also refreshes the authentication token when it nears expiry, so long-running sessions stay connected without you doing anything.
| Banner | Meaning | Action |
|---|---|---|
connecting… | Initial connection in progress | Wait |
reconnecting in Ns (attempt M)… | Transient disconnect, auto-retrying | Wait |
connection lost — ctrl+r retry · ctrl+d exit | Recoverable fatal error | Press Ctrl+R for a manual retry, or Ctrl+D to exit |
fatal: <reason> (<code>) — ctrl+d exit | Non-recoverable error (session terminated) | Press Ctrl+D to exit |
Resume a session later
From the CLI
Drop back to your local kimchi prompt and run:
/remote-sessionsIt opens a full-screen tree panel: each workspace is a top-level row, with its sessions nested underneath (drawn with ├─ / └─ connectors). Columns are NAME / SESSION, STATUS, and LAST ACTIVITY. Navigate with the arrow keys or j / k, then press Enter to reattach.
/remote-sessions replaces the former /sessions and /workspaces commands — workspaces and their sessions are now browsed from a single panel.
Status:
| Status | Meaning |
|---|---|
| active | Session is alive and has a client connected. |
| disconnected | Session is alive but no client is connected. |
| idle | Session exists on the server but is not alive (e.g. process exited). |
| completed | Session has finished and been cleaned up. |
| unreachable | Could not reach the workspace to list its sessions — shown on the workspace row, which then has no nested sessions. |
Panel keybindings:
Action keys are context-aware — they apply to whichever kind of row (workspace or session) is selected.
| Key | Action |
|---|---|
↑ / ↓ or j / k | Navigate across workspaces and sessions |
Enter | On a workspace: open a raw SSH terminal (/terminal). On a session: attach to it (opens the PTY overlay) |
d | Delete the selected workspace (and all its sessions) or the selected session — with confirmation |
r | Rename the selected workspace (no-op on a session — session renaming isn't supported) |
Esc or q or x | Close the panel |
From the Kimchi console
Open the Remote Sessions page in the Kimchi console to see all your active remote sessions and the phase each agent is in (planning, coding, reviewing, done). Click into a session to open its web terminal and interact with the agent directly from the browser.
Open a raw SSH shell
For debugging or running one-off commands outside the PTY overlay, drop into a plain SSH session:
/terminal mybox # by host nickname or name
/terminal ws-abc12345 # by full workspace ID/terminal bypasses the overlay and hands your TTY to ssh connected to the sandbox. Type exit or press Ctrl+D to return to local kimchi. The workspace and its sessions keep running.
Workspace limits
- 1 workspace per user, provisioned with 1 CPU and 2 GiB RAM. Delete your old workspace before spinning up a new one if you hit the cap — you can do this from the
/remote-sessionspanel. - Workspace size caps —
/teleportwarns above 500 MB and refuses above 5 GB. Use--forceto override the 5 GB refusal, or--exclude(with/sync) to skip large directories like build artifacts, data files, ornode_modules/.
Troubleshooting
Dirty working tree
By default /teleport refuses if git status --porcelain shows uncommitted changes — this prevents accidentally shipping work-in-progress. Use --allow-dirty to override.
rsync not found
If rsync isn't on your PATH, /sync and /teleport (in rsync mode) will fail with an install hint. macOS: brew install rsync. Linux: use your package manager (e.g. apt install rsync).
Session not found
If you reference a session that no longer exists, kimchi suggests /remote-sessions to browse what's available. Sessions that have finished and been cleaned up server-side can't be reattached.
Workspace not found
If you reference a workspace that doesn't exist (or that you don't have access to), authentication will fail. Use /remote-sessions to list your available workspaces.
See also
- Ferment — autonomous project mode for multi-step coding work.
/teleportworks inside Ferment sessions too. - CLI reference — full command reference for
kimchi. - Getting started with Kimchi Coding — install and run your first session.
