User guide / Workspaces and persistent sessions

Session keys and commands

Development reference · View source

Key or commandAction
Space Space, :session-list (:sl)Open the session manager
Space 1–Space 9Attach directly to the numbered running session
Shift-Left / Shift-RightVisit the previous / next running session in manager order
Ctrl-w aAlternate between the last two attachments
:session-attach WORKSPACE (:attach)Attach, starting a stopped session. Any existing directory becomes a workspace if needed.
:session-stop [WORKSPACE]Stop a session without switching
:session-rename WORKSPACE NAMERename a session
:session-cleanClean verified stopped history (Windows)
:detachDisconnect this TUI, leaving the session running

Space 1–Space 9 work in Normal and Select modes, follow keys.leader, and can be rebound as session-1 through session-9. The key-hint popup groups them into one Space 1-9 row; individually remapped ones are listed separately.

Stopping refuses while the target owns protected buffers, waiters, or live terminal children. Switching away is always safe, because the old host keeps them.

In ide mode (Unix) there is no host, so the session namespace is inert rather than a set of commands that each refuse. Space Space and Space 1–Space 9 are greyed in the key hints, :session-list, :session-attach, :session-stop, and :session-rename are greyed in the command palette, and invoking one answers needs mux mode.