Sessions and their terminals
A session owns one agent terminal, which cannot be closed, and zero or more shell terminals, which you open and close as you like.
They are the tabs across the top of a session’s pane: agent first, then one
per shell. + shell opens another and close ends the selected one.
Every terminal in a session runs on that session’s worker
and starts in its working directory. They are real PTYs; the browser renders
them with xterm.js, and pm attach streams the same bytes into your shell.
A shell beside the agent
Section titled “A shell beside the agent”The fastest way to find out what an agent has actually done is to look, in the same directory, on the same machine, while it is still working. A shell terminal is that. It is also where you run the tests yourself when you do not want to ask the agent to.
The agent can open terminals and pages of its own beside its terminal too, and you can arrange them with your shells in one layout. Panes beside the agent covers them.
Panes and generations
Section titled “Panes and generations”A terminal is a pane with a stable identity, and each process that runs in it is a numbered generation.
That distinction is what lets an agent be resumed without the pane moving: the agent terminal keeps its identity, the new process is generation two, and the layout you were looking at is unchanged. A shell that exits and is restarted behaves the same way.
Each generation has its own state and its own transcript, so a resumed session can still show you what the previous process did.
Many viewers, one terminal
Section titled “Many viewers, one terminal”The same terminal can be open in the browser, in pm attach and in the TUI at
the same time. Every viewer gets the scrollback replayed first and then the live
stream, so a new one is not dropped into the middle of a sentence.
Typing works from any of them. Closing a browser tab does not stop anything — the daemon owns the process, not the viewer.
Scrollback
Section titled “Scrollback”The daemon keeps a bounded scrollback buffer per terminal in memory for replay, and writes the transcript of an ended session to disk so you can read it afterwards:
pm transcript 23That command is the only way to read it. An ended session’s transcript has no dashboard view today, so this is one of the few places the CLI is not a convenience.
Terminals and scrollback covers the mechanism, including what happens to a very long-running session’s history.
Detaching
Section titled “Detaching”Closing the browser tab, or Ctrl-\ in an attached terminal, leaves the agent
running. There is no way to close the agent terminal itself, because a session
without its agent terminal would be a session you could not reach — ending the
session is what you want, and the session’s own controls do it.