A live session is an agent running in a terminal on your computer: Claude Code, Codex, Kimi, Grok, Antigravity (agy), Gizzi, OpenCode, Qwen, Gemini, Cursor, Copilot, Pi, or a Factory pane. Allternit lists them with a one-line status that costs no tokens, so you can tell what each one is working on without opening it.

List your sessions

Each row shows the address, busy, idle or blocked (waiting on you), the delivery tier, whether it can move into Allternit (movable), how many live processes hold it, the repo and branch, and what the session is doing. Add --json for the full record.
If nothing is running, the command says so. It never invents a session.

Move a session into Allternit

A session running in macOS Terminal (or iTerm2, Ghostty) can move into an Allternit terminal, so you can drive it from the composer, watch it on a live card and reach it from your phone. You have three choices for each session:
  • Move stops the old process once the agent is idle and resumes the same session in Allternit.
  • Open a copy forks the session into Allternit. The old one keeps running and nothing is signalled.
  • New session here starts a fresh session of the same tool in the same folder. The old one is untouched.
Not every tool can do all three. See Harness support.

On Desktop and ai.allternit.com

  1. Open Code and look under On this Mac in the Terminals menu (or at the bottom of the Code overview).
  2. Pick Move here, Open a copy or New session here on the session’s row.
  3. For a move, check the command and the flags it keeps (for example --dangerously-skip-permissions), then confirm. The row follows the move: Waiting for the agent to go idle, Stopping, Starting. You can cancel while it waits.
  4. The session opens as a tab. The old Terminal window stays open and shows the exit.

On a phone

On the iPhone app, Android app and the phone layout, open the Code session list. On your computer (the iPhone and Android apps) or On this Mac (the phone layout and PWA) lists the same sessions with the same three choices. A move always asks in a sheet first, and the moved session opens as a terminal tab. The phone must reach your computer through the relay. See Code on a phone.

From the command line

gizzi agents adopt does the same from a shell.
<session> is a session id, an address, or a name or prefix from gizzi agents sessions. If more than one session matches, the command lists them and stops. Before a move, the command shows who holds the session and what it will resume with, and asks first:
The command refuses without asking when the session is already in Allternit, when it is open in more than one place (it lists every holder; close the others first), or when its tool can’t resume (use --new). A runtime without the adopt route says: “This Allternit runtime is too old for adopt; update Allternit Desktop.” The command exits non-zero on any failure.

What each field means

Holders and moving a session

One session id should have one writer. Allternit groups every live process by harness and session id, so a session opened in Terminal and again in a pane shows once, with two holders, as open_elsewhere. How each harness’s processes map to a session id, cheapest reliable source first (the id on its command line always wins): Carried flags go right after the command name. The table lives in one place, factory/engine/src/agents/harness_table.rs; clients read only movable, carriedFlags, canCopy and the three *Command fields. Listing sessions never signals, writes to or types into a process: it reads the process table (ps), each process’s argv and folder, and for Codex, Gizzi and Antigravity the files it holds open (lsof), each with a short timeout.

How doing is worked out

Allternit reads what the agent already records, and never asks the agent to report:
  • Claude Code: the latest session title, then the in-progress item with the highest id in ~/.claude/tasks/<session>/, then the in-progress item on its latest todo list.
  • Codex: the thread name from session_index.jsonl, then the in-progress step of its latest plan.
  • Other harnesses: the in-progress item on the latest todo list in the transcript their hooks report.
Transcripts are read from the end: up to 2 MiB the first time, then only what was appended.

Meetings

A call that Gizzi has joined also shows as a live run. See Meetings.

Privacy

Only the folder name leaves your computer, not the full path. To share full paths, set ALLTERNIT_SHARE_PATHS=1 before starting Allternit.

For developers

  • Engine: GET /api/factory/sessions returns the array of sessions. allternit-api serves the same list at GET /api/v1/live-sessions behind your sign-in. If the Factory engine is not running, allternit-api runs the same discovery itself (session files and the process table), so every session and its holders still show; only pane-only entries (a pane with no agent process found) need the engine. It answers 502 with a transport error only if that fails too.
  • The new fields (holders, carriedFlags, canCopy, moveCommand, copyCommand, newCommand, movable, external, move) are additive. An older runtime leaves them out; treat a missing movable as “this runtime cannot move sessions” and hide the move controls.
  • Steering a pane (Remote Control for other CLIs): terminalId, steer and blockedSince are additive too. A missing or empty steer means an older runtime: hide the steer controls. No separate steer route exists: steer: "terminal" uses the terminal input route, steer: "delivery" uses POST /api/factory/send. Terminal ids come from the pane engine (factory.terminal.list), so when allternit-api runs discovery itself (engine down) rows carry no terminalId. Fixtures: docs/contracts/live-sessions/ (a blocked terminal pane, and an older runtime’s row).
  • Heartbeat: the 60-second runtime presence heartbeat carries sessions (up to 100), so the cloud can show your sessions to your team. carriedFlags and the three *Command fields are removed first.
  • Adopt: factory/engine/src/agents/adopt.rs holds the decision, the stop-and-wait and the job registry; allternit-api (cmd/allternit-api/src/netops/presence.rs) passes it the terminal create, because the create path lives in allternit-api, which depends on the engine.
  • Hooks: sessions that only report through Gizzi hooks are read from ~/.allternit/live-sessions/hooks.json and listed while their last hook is under 10 minutes old.

Move, copy or open a new session (API)

POST /api/v1/live-sessions/adopt (behind your sign-in, like the list) moves a session from Terminal, iTerm2 or Ghostty into an Allternit terminal, opens a copy of it, or opens a new session of the same CLI in its folder. allternit-api runs it as a library, so it works while the Factory engine is down (Desktop quit).
The request names only the session (harness + sessionId) and the terminal size. The folder, the terminal’s name and the carried flags come from the live session itself, so a client cannot add its own command line. new can name the session by address instead of sessionId (a process whose session id was not found still has an address).

How a Move runs

  1. It takes a per-session lock. A second adopt for the same session while one runs gets 409 adopt_in_progress.
  2. Right before it acts, it runs discovery again for that session: exactly one holder, outside Allternit, with the same pid and start time it first saw, and movable is now.
  3. busy: state waiting_idle. It looks again every 2 s for up to 5 minutes (cancelable), then fails with still_busy.
  4. State stopping: it checks the pid’s start time once more and sends SIGTERM to that pid only. It waits up to 15 s for the process to exit; a start time that changes means the pid now belongs to another process, so pid reuse can’t fool it.
  5. Not exited after 15 s: failed did_not_exit, and nothing is started. There is no SIGKILL, ever. Quit the CLI in its own window and try again.
  6. Exited: state starting. It creates the Allternit terminal with the Move command in the session’s folder (through your login shell, so the CLI gets the PATH your own terminal has), then done with terminalId. If that create fails, the job fails with start_failed and error holds the exact command to run by hand.
The old Terminal window stays open, showing that the CLI exited. Allternit never closes or types into another app’s window. The job shows on the session as move: {jobId, state, terminalId?, code?, error?} (state is waiting_idle, stopping, starting, done or failed) in GET /api/v1/live-sessions, and at GET /api/v1/live-sessions/adopt/<jobId> (useful when the session left the list). Both are kept for 10 minutes after the job ends.

Error codes

Errors are JSON: {"error": "<code>", "message": "…"}. On a running Move the same codes land in move.code. A runtime older than this answers 404 for the route: keep today’s behavior and hide Move, Copy and New.

Blocked push

When a session turns blocked (the agent waits on you), a paired computer sends one push through the Remote Control push worker, the same path Factory approvals use: title “<name> needs you”, body the doing line, and an open link (/terminal/<terminalId> for a terminal pane, else /factory/sessions/<address>). One push per blocked stretch, none while it stays blocked, and none for sessions already blocked when the API starts. Turn it off with ALLTERNIT_BLOCKED_PUSH=off; it also stays off wherever approval push is off (no push worker URL, or the computer is not paired). In Gizzi, /remote lists the other pane sessions with their status and whether phone, web and Desktop can steer them or they are view only.