Loading...
Loading...
Use the `sesh` CLI/TUI to list, find, enter, resume, create, tag, archive, rename, delete, send-to, or inspect coding-agent sessions across machines. Use when the user asks about sesh command usage, the session TUI, entering/resuming a sesh, cross-machine session state, the sesh daemon, or peers.
npx skill4agent add lukastk/sesh sesh-cliseshseshsesh-daemonsesh<uuid>a808a699-…a808a699a808sesh info a808a699 # same as sesh info a808a699-xxxx-xxxx-xxxx-xxxx
sesh send a808a699 "hello"
sesh pane-capture a808 # only if a808 uniquely identifies one sessionsesh find <prefix>sesh find a808 # list every session whose UUID starts with a808listfindinfostatepanepane-resolvetagstailtranscriptdoctordaemon statuspeerpicktuinewregisterrenametaguntagretagarchiveunarchivedeletesendabortcompactautonameautoname-toggleresumecopybackuprestoreimportdaemon start/stop/restartpeer add/removedelete <uuid>--forcesend <uuid> <message>import~/.sesh/sessions.json-a42f8a74$SESH_MACHINErenametaguntagretagarchiveunarchivedeleteautoname-togglesendabortcompacttailtranscriptautonamedelete --force●◐○claudepicodexabortcompactsesh tui↑↓jkCtrl-jCtrl-k/TabiyaurtxdEnterqEscsesh tuiEntersesh tui --entersesh resume <uuid> # live → switch to its pane; detached → resume the agent
sesh resume <uuid> --target socket:sess # create that tmux session (if absent) + open a window
sesh resume # no uuid → interactive picker
sesh pick # pick a session; print the selection (json/nul/kv) on stdout
sesh pick --select <uuid> --enter # non-interactive enter of a specific seshresumepicktuitmux switch-clientattachsesh-tuisesh-entersesh list # active sessions, all machines
sesh list --machine <name> # one machine
sesh list --archived # include archived (alias: --include-archived)
sesh list --agent claude --tag work # filters
sesh list --columns uuid,name,agent,machine,status,cwd,tags,archived,tmux-socket,tmux-session,tmux-window,tmux-pane,live # TSV for fzf/awk (unknown column name errors)
sesh find <partial-uuid> # list all sessions (including archived) matching a UUID prefix
sesh info <uuid> [--json] # full record
sesh state <uuid> # turnStatus + per-agent extras
sesh tags # all tags in use across the mesh (every machine)
sesh tail <uuid> [-n N] # last N transcript lines (any machine; forwards to the owner)
sesh transcript <uuid> # full transcript (any machine; forwards to the owner)
sesh pane [--pane %ID] [--socket-path P] # which REGISTERED sesh owns a tmux pane (store-backed; status bars)
sesh pane-resolve --pane %ID --socket-path P # uuid of the agent LIVE in a pane, registered or not (walker-backed)
sesh pane-capture <uuid> [-n N] # capture current pane text (local; for inspecting stuck TUI state)
sesh pane-keys <uuid> <key>... # send raw tmux key names to a pane (local; for navigating TUI prompts)panepane-resolvepanepane-resolveuuid=$(sesh pane-resolve …) && sesh register "$uuid" …agents --jsonpane--json{uuid, agent, cwd, machine, tmux}034--jsoninfo --jsonlist --jsonfind --json{uuid, name, agent, machine, cwd, turnStatus, archived, autoRename, summary, lastAutoNameTurnCount, contextPct, filePath, tmux:{socket, session, window, pane}, createdAt, updatedAt, originSeq, tags, deleted}sesh info <uuid> --json | grep '"deleted": true'pane-capturepane-keysCLAUDE.md@~/.config/AGENTS.mdAllow external CLAUDE.md file imports?
> 1. Yes, allow external imports
2. No, disable external imports
Enter to confirm · Esc to cancelsesh sendsesh pane-capture <uuid> # confirm the prompt is showing
sesh pane-keys <uuid> Enter # confirm option 1 (already selected)
# wait a moment, then:
sesh send <uuid> "your first message"~/.claude/projects/<dir>/settings.jsonallowExternalImports: true~/.claude/settings.jsonsesh new --agent claude --name foo --tag work [-- agent-args...] # spawn + register from birth; cwd defaults to $PWD
sesh new --agent claude --model opus # launch with a specific model (see "Model selection")
sesh new --agent claude --target socket:sess --msg "greet me" --name foo # spawn window + send initial message, print reply
sesh new --agent pi --dry-run # print the plan, register nothing (add --json for a JSON plan)
sesh new --agent claude --no-launch # register only
sesh new --agent claude --session-id <uuid> --no-launch # pre-assign the UUID (must be a well-formed UUID)
sesh new --agent claude --cwd ./sub # --cwd is absolutized to a realpath (relative is resolved against $PWD)
sesh new --headless --agent claude --msg "do X" --name child # persistent headless child (no tmux window)
sesh register <session-id> --agent pi --name foo # record an already-running agent; --cwd defaults to $PWD
sesh rename <uuid> <name> # sets autoRename=false (unless --keep-auto)
sesh tag <uuid> <tag>... / sesh untag <uuid> <tag>... / sesh retag <uuid> old=new # empty/whitespace tag names are rejected (e.g. tag '' or retag old=)
sesh archive <uuid> / sesh unarchive <uuid> # orthogonal to live/busy
sesh delete <uuid> [--force] # tombstone (propagates); --force for an orphancodexnew --agent codexsesh registernew --headless --agent codexdelegate --agent codexnew --headlessdelegate# PERSISTENT child you keep talking to. Runs the first turn (--msg), creates
# the session on disk, registers it, prints the reply. Later `sesh send
# <uuid>` resumes it headlessly. claude/codex only.
sesh new --headless --agent claude --msg "You are my test runner. Reply READY." --name runner
sesh send <uuid> "run the suite and summarise failures" # talk to it over time
# EPHEMERAL one-shot: spawn a worker, give it ONE task, print the reply, then
# DELETE the session. ⚠️ The session DISAPPEARS once it returns — it is gone
# afterward (use --keep to retain it). pi, claude, and codex.
sesh delegate --agent codex "What is 2+2? Reply with just the number."
sesh delegate --agent claude --keep --name audit "audit auth.go for bugs" # keep the sessionnew --headlessdelegate--headless--msgnew --headless --agent pidelegate --agent pinew --agent pidelegatepi -p--msg--target$TMUX--no-launch--sandbox read-only--modelsesh newsesh delegate--modelclaude/codex/pi --model-msesh new --agent claude --model opus # alias or full id (sonnet, opus, claude-opus-4-8)
sesh new --agent pi --model sonnet:high # pi patterns: provider/id, alias, :<thinking>
sesh delegate --agent codex --model gpt-5.4 "…" # codex model id~/.sesh/config.toml--model[models]
default = "opus" # fallback for any agent when it has no specific default
claude = "opus"
codex = "gpt-5.5"
pi = "anthropic/claude-opus-4-7"--model[models].<agent>[models].default--list-modelsclaude --help/model/modelnew --agent codexdelegate --agent codex --model …[agents]claudecodexpi~/.local/bin~/.cargo/bin[agents]
claude = "/opt/tools/claude"
codex = "/home/me/.local/share/mise/shims/codex"
pi = "/home/me/bin/pi"[agents].<agent>sesh send <uuid> <message> # send a message and return the agent's reply (two-way; see below)
sesh send <uuid> <message> --no-wait # deliver only; don't await or print a reply
# An empty/whitespace-only <message> is rejected up-front with "message is empty".
sesh await <uuid> [--timeout D] # block until the turn completes (busy → idle), print the status (D=0 means no limit; a negative D is rejected)
sesh abort <uuid> # abort current operation (pi-only)
sesh compact <uuid> # trigger context compaction (pi-only)
sesh autoname <uuid> # auto-generate a name via `pi -p`
sesh autoname --all # auto-name every nameable session in the mesh; un-nameable ones (no transcript yet) are skipped, the rest still named
sesh autoname-toggle <uuid> [--on|--off]sendabortcompactsendsendclaude -p --resumecodex exec resumecwdCaveat (exp14): never headless-resume a claude/codex session that is also live in a pane — it forks the in-memory conversation.avoids this automatically by typing into the pane whenever one is live; the headless path is taken only for detached sessions.sesh
--no-waitsendawaitturnStatussend --no-waitsendawait--timeout 0--timeoutautoname --all<uuid>sesh daemon status [--json] # machine, uptime, sessions, peers, schema version
sesh daemon start | stop | restart # restart = the reliable way to pick up a redeployed binary
sesh daemon ensure # idempotent start (supervisor entrypoint)
sesh peer ... # manage peer-daemon connections (~/.sesh/peers.json)
sesh doctor # diagnose agents/tmux/daemon/configsesh daemon restartsesh daemon startstartrestartSESH_MACHINE~/.sesh/daemon.logsesh backup # import transcripts into a single SQLite file (idempotent)
sesh restore # reconstruct transcripts from a backup
sesh import # one-shot import of v1 ~/.sesh/sessions.json
sesh copy <uuid> <dest> # copy a session's transcript elsewhere (same-agent)restore--from <file>no such backup filerestore [uuid]copy--to native--to <dir>copycopy <uuid> --to <machine>--to native--to-dir <dir>sesh importsesh daemon stop--force--machine <name>--json--socket <path>~/.sesh/daemon.socknewdelegate--model <name>~/.sesh/config.toml[models][agents]~/.sesh/peers.jsonSESH_HOME~/.seshSESH_MACHINESESH_TMUX_SOCKETSSESH_CWD_FORMATTERpicktui01303picktui--enter--format jsonnulkvactionuuidmachineagentcwdnametmuxsocketsessionwindowpaneactiongotoresumepicktui--action <verb>send--cursor <uuid>tui<uuid>