Skip to content

Latest commit

 

History

History
1903 lines (1655 loc) · 114 KB

SESSIONS.md

File metadata and controls

1903 lines (1655 loc) · 114 KB

Sessions

Sessions are named, ongoing Pane Chats where work intent lives. Each Session opens one chat, and its sidebar row can expand to show associated Panes. The Overview tab beside the chat keeps the Session name, associated Panes, and recent activity together while the chat remains the focused work surface. A tab shares its parent Pane's worktree.

In the sidebar, + opens an agent picker, an optional Session name field, and an optional "What is this Session for?" field that becomes the Session's goal. Pane remembers the chosen agent as the default for future Sessions while existing Sessions keep their own agent. A blank name starts as New chat or New chat 2, and the Session agent renames it once, in 3 to 5 words, when it replies to your first task. A name you type or set later is kept. Each new Session opens as one Pane Chat and can be renamed later from its Overview. Expand a Session to see its associated Panes and open any Pane in its existing sidebar view.

With chat tabs on (Settings → AI & Agents → Chat tabs), a new Session runs its orchestrator in a chat tab instead of a terminal for any agent chat tabs run (Claude, Codex, Cursor and OpenCode), from the plain agent or the Session's agent-farm run <profile> launch, and sends its opening prompt once. Like every chat, finished turns fold to one row. A worker Pane shows up as one line with Open while it is asking the person, and when it finished, failed or reported during the latest turn; the sidebar lists the rest. Workers the orchestrator starts stay terminal tabs. Agent Farm's standard resume template ({command} --resume {sessionId}, which the dialog saves) doesn't stop a chat, since a chat reopens through ACP. Sessions that resume or promote a terminal conversation, run in WSL, or use a truly custom resume command or a wrapper launch keep their terminal, and the Session's overview says why. A Session keeps the kind of tab it started with. A Session already running in a terminal can move to chat with Switch to chat… in the Session's right-click menu, which switches every terminal agent tab in it (see CHAT_TABS.md).

New at the top of the sidebar opens one dialog with a Session/Pane toggle on top and that kind's form below. When the desktop has saved other machines, a Machine picker sits between them. It starts on the machine you last created on from this computer (the first time, the machine the app is on) and dims machines that are offline or still connecting; they can't be picked until they answer. Repositories, branches, WSL distributions and agents come from the picked machine. Create runs there; Pane then switches to that machine and opens what you created. A Pane created on another machine starts at the repository level and does not join the Session you have open.

The Sessions section below the divider can be collapsed from its header; the + remains available while it is collapsed. Sessions are opened from this section rather than from a duplicate top navigation shortcut.

A Session is a persistent coordination conversation with its own scratch workspace. Its default profile supports discussion, investigation, decisions, and delegation when authorized work benefits from it. No particular skill, ticket system, model, or Agent Farm installation is required. Users can select skills and workflows without Pane imposing an implementation pipeline.

The Onboarding Session

On a new data folder, the default Session is named Onboarding. It is where a new person starts: the first-run screen hands off to it (see Bring your existing sessions into Pane), and its agent gives each later task a Session of its own. Archive it like any Session when you are done with it; Pane does not recreate it. Installs from before the first-run screen keep the name Pane Chat.

Upgrading from Pane Chat

Existing Pane Chat opens under Sessions automatically, keeping its name and all agent conversations together. Switching agents resumes that agent's existing panel and history in the same stable private Session workspace. Opening the Session does not submit a prompt or authorize new work.

Earlier development versions split old agent histories into supplemental Sessions. Untouched imports with only generated workspace files and no competing conversation are reunited with the original Session. Imports with files, settings changes, or additional conversations remain separate to preserve that work. Those retained Sessions receive independent internal owners while keeping their names, folders, panel IDs, saved histories, and settings. Interrupted ownership moves resume on startup; no transcript or workspace files are deleted by this migration.

Launch configuration and behavior

Sessions use the same built-in launch presets and saved custom commands as ordinary project/worktree panels, including custom arguments. The application default seeds new Sessions. Creating a Session remembers its launch command and arguments for the next creation; cancelling, or a create Pane refuses, leaves that default unchanged. Selecting the agent default clears the remembered custom command. Each Session saves its own launch configuration and behavior. Changing defaults does not overwrite existing Sessions. Launch changes take effect on the next explicit restart. Use Edit behavior… during creation or in Session settings to open the separate behavior editor. Back discards the draft; Save behavior applies it to the form, which is persisted when you create the Session or save settings.

The command, Session behavior, and saved task context have separate purposes. A command selects how the agent runs; the behavior describes how it should act; saved goals, decisions, and next actions help it respond to later user input. Custom commands (including Agent Farm wrappers) retain their arguments. Pane only adds native flags through compatible built-in adapters, an explicit custom command resume config, or Agent Farm's resume contract (see Resuming custom launchers). Wrappers keep control of instruction discovery; apart from that one Agent Farm exception, Pane does not infer flags from a wrapper name. A user command that explicitly starts work remains the user's choice.

An OpenCode Session runs opencode directly: its launch command may add arguments, assignments or an env NAME=value prefix, but not a wrapper (bash -c opencode), a wrapped launch or a custom command resume. Pane refuses those before anything starts, with ERR_SESSION_OPENCODE_LAUNCH. An app default command or custom resume that doesn't suit OpenCode is left out when a Session is created with the OpenCode agent. Pane resumes the conversation id OpenCode prints when it exits (Continue opencode -s <id>); a conversation still open when Pane quits has no saved id yet and starts fresh. Loops run Claude, Codex or Cursor, so the Loop editor doesn't offer OpenCode Sessions.

Each Session owns a stable folder at <PANE_DIR>/sessions/<session-id>/ for notes, plans, attachments, generated instructions, and artifacts. Renaming and reopening keep this folder. Archiving keeps it for 14 days (Settings → Worktrees & Git → Keep archived folders), then Pane deletes it, first moving any agent logs inside it to <pane-dir>/agent-logs/ (see The scratch folder); restoring the Session before then keeps it. A Session archived before this retention existed counts its 14 days from the first launch of the Pane version that added it. These folders are not Git worktrees or security sandboxes. Project implementation belongs in an appropriate Pane/worktree.

Windows and WSL runtimes

On Windows, Create Session → Run agent in appears directly below the agent picker when WSL reports installed distributions. Windows is the default on every creation. Choose a named distribution to run the agent there; install the agent inside that distribution first. Cursor is available when WSL is selected. The runtime and distribution belong to the Session and survive reopening, application restart, and terminal supervisor restart. Only WSL Sessions carry a runtime ("wsl"); a Session on the native host omits it on every OS. Older records that stored "windows" for the native host lose the field when read. If creation fails before publishing a terminal owner, Pane removes untouched generated files so the name can be retried; user files or edits prevent rollback.

WSL Sessions retain their durable files under the Windows Pane data directory. Their agent sees Linux paths such as /mnt/c/Users/.../.pane/sessions/.... This uses Pane's existing Windows-to-WSL path conversion and requires the default /mnt/<drive> automount layout; custom [automount] root settings are not supported. Generated AGENTS.md points to a Session-specific runtime-context.md; this context takes precedence over the shared Pane Chat routing instructions.

Each WSL Session gets a managed .pane-runtime/runpane wrapper on PATH, also available as $PANE_RUNPANE_BIN. It invokes this build's bundled Windows CLI via PowerShell interop from Windows TEMP, so the CLI can reach this Pane instance's named pipe. Arguments cross as JSON to preserve quotes and Unicode. Temporary files beside the bridge carry payloads without Windows command-line size limits and are removed when the call exits; stdin remains available to the CLI. File flags accept relative or absolute Linux paths (including --flag=value); - retains stdin semantics. --repo translates absolute Linux paths and explicit relative paths (., .., ./..., ../...) while preserving repository names and IDs. Paths inside JSON request bodies must use Windows paths, and Windows paths returned by the CLI can be read in WSL after wslpath -u conversion. The bridge pins --pane-dir to this instance and preserves the calling Session and panel identities. PowerShell is invoked by its mounted Windows path, so appendWindowsPath=false is supported. WSL interop must be enabled; a Linux-installed RunPane CLI cannot replace this bridge for a Windows daemon.

For CLI JSON creation, runtime: "wsl" and wslDistribution: "Ubuntu-24.04" select an installed distribution; omitted runtime selects the native host. runtime: "windows" is still accepted as a legacy name for the native host and is not stored.

Resuming custom launchers

Use Enable custom command resume in Session launch settings or a saved custom command's editor. This is an explicit contract, independent of executable names. Agent Farm is the one exception, described in Agent Farm below. Choose a session ID source and provide first-launch and resume templates:

  • Claude: Pane allocates a UUID and resumes it only when its transcript exists.
  • Codex / Cursor: Pane captures the native resume ID from terminal output. OpenCode does the same without this setting (see Launch configuration and behavior); OpenCode Sessions refuse custom command resume.
  • Pane allocates an ID: for other CLIs that accept a caller-provided ID.
  • CLI reports its ID: the CLI or wrapper prints a standalone newline-terminated PANE_AGENT_SESSION_ID=your-session-id line (or AGENT_FARM_SESSION_ID=…). IDs may contain letters, digits, periods, underscores, colons, and hyphens (up to 256 characters).

{command} expands to the saved command; {sessionId} expands to the quoted ID. Leave the ID placeholder unquoted. For a launcher that forwards native arguments through --, Claude templates could be {command} -- --session-id {sessionId} and {command} -- --resume {sessionId}. Codex could use {command} initially and {command} -- resume {sessionId} on resume. These are user configuration examples, not automatic wrapper detection. Other CLIs can use other syntax.

The configuration and ID persist with the panel. Without a captured ID, Pane uses the first-launch template instead of guessing a latest conversation. Saved custom commands copy their resume settings into new panels; changing the saved shortcut does not change existing panels. Session settings support changing or disabling the contract for that Session's next launch. No prompt is submitted just to resume. Old conversations whose IDs were never saved cannot be recovered automatically; use an explicit resume command if you know their ID.

Agent Farm

Agent Farm is the one launcher Pane recognizes by name, because Agent Farm publishes this contract for a host: when the host sets AGENT_FARM_REPORT_SESSION_ID=1 it prints AGENT_FARM_SESSION_ID=<launch id> once, on its own line, before the agent starts, and documents {command} --resume <id> as the way to reopen that conversation. Pane sets AGENT_FARM_REPORT_SESSION_ID=1 in every terminal. An Agent Farm from before greenfield-inc/agent-farm#220 prints PANE_AGENT_SESSION_ID=<launch id> instead (it keys on PANE_PANEL_ID, which Pane also sets), and Pane accepts either line (D-403). Pane keeps the first ID line of each launch and ignores later ones, which can only be agent output. Every other wrapper still needs an explicit config.

The launch ID is only where the conversation started: /clear and /resume move Claude to another one. Agent Farm's compiled Claude plugin therefore also carries a SessionStart hook that tells the host on start, /resume, /clear and compact (D-269). Since #220 it runs "$AGENT_FARM_SESSION_HOOK" session-start with Claude's hook JSON on stdin; Pane sets AGENT_FARM_SESSION_HOOK to its runpane shim (the same path as PANE_RUNPANE_BIN, exported by the rcfile in WSL), and runpane session-start is an alias of runpane panels conversation --hook. An older Agent Farm runs "$PANE_RUNPANE_BIN" panels conversation --hook directly. Either way Pane saves the reported conversation on the tab, ahead of the launch ID, so a restart resumes the conversation the tab was last on and Switch to chat opens it. The hook does nothing outside Pane and prints nothing. With an Agent Farm too old for the hook there is no report, and Switch to chat opens the folder's most recent conversation instead (see CHAT_TABS.md).

Agent Farm ID line Pane reads Hook Agent Farm runs
before #220 PANE_AGENT_SESSION_ID=<id> "$PANE_RUNPANE_BIN" panels conversation --hook
#220 and later AGENT_FARM_SESSION_ID=<id> "$AGENT_FARM_SESSION_HOOK" session-start

A command counts when it is a single agent-farm run <profile> or agent-farm agent <profile>, optionally preceded by VAR=value assignments, with no shell operators, no --, and no --resume of its own. npx, pnpm dlx and aliases do not count. Such a panel with no explicit config behaves as CLI reports its ID with templates {command} and {command} --resume {sessionId}: Pane saves the printed ID and relaunches with it. The editor says so under the unticked checkbox. An explicit config always wins: tick Enable custom command resume and set your own templates.

A panel created before this rule usually has no saved ID. On its next relaunch Pane makes one attempt to read the last AGENT_FARM_SESSION_ID= or PANE_AGENT_SESSION_ID= line from the panel's saved terminal buffer. Agent Farm older than 0.2.20 prints no ID, so those panels relaunch fresh, as before.

To reopen an older conversation by hand, run agent-farm run <profile> --resume <id>. The ID is the launch ID (the AGENT_FARM_SESSION_ID or PANE_AGENT_SESSION_ID value), shown as resumeId in runpane panels list --json. Agent Farm keeps launch records in ~/.local/state/agent-farm/launches/ for 90 days.

Session sidebar and archive

Pinned is the first sidebar category and can contain both Session chats and Panes. Right-click a Session, or use the ⋯ button that appears on hover, to pin or unpin it, or turn on Start pinned in Create Session to pin it from the start. The dialog remembers that toggle for the next Session (on the desktop in Pane's config, in the remote web app on that device). The pin preference survives restarts; an archived Session stays out of Pinned until it is restored. RunPane can set the same preference with sessions pin or sessions unpin --session <id|name>. Create JSON accepts isPinned (default false), and update JSON accepts it without changing the preference when omitted.

Drag a Session up or down in Pinned, in Sessions, or in the compact rail to change its place; a line shows where it will land. With a Session row focused, Alt+↑ and Alt+↓ move it one place and a screen reader hears its new position. A drag or keypress reorders only the list it starts in: Pinned Sessions move among themselves, and a Session dragged across the Pinned line stays where it was. The order is saved on the host, so every desktop, the phone and runpane sessions list show it, and it survives restarts. New Sessions start at the top. A host that has never saved an order lists Sessions newest first. A host running an older Pane cannot save an order: the list snaps back and the error says to update Pane on that host. Dragging a Session onto the workspace still tiles it.

In the sidebar's All machines view, Sessions from every machine form one list you arrange the same way, by drag or Alt+↑/Alt+↓. That arrangement is saved on the computer you are looking from, not on any machine it shows: two computers keep two arrangements, and each machine's own order (its one-computer view, the phone and runpane sessions list) is unchanged. The first time a machine answers on this computer, its Sessions join the arrangement in that machine's own order, after the Sessions of machines listed before it in the machine menu, so a first look follows the menu however late each machine answers. A Session that appears after that, such as a new one, goes first whether or not you have moved anything; agent status and activity never move a row.

Click a Session row to open its chat, or find it by name in Search (⌘⇧P / Ctrl+Shift+P, or the Search field above New), which also has New Session. A Session with associated Panes shows a chevron that expands or collapses them; a Session without Panes shows none. Every Session starts collapsed, including a new one and one that just got its first Pane, until you press its chevron. Opening the Session's chat, an agent adding Panes, or runpane focusing one of its Panes leaves it collapsed. Each device remembers the Sessions you opened, separately for each host: the desktop in its own settings, the remote web app (PWA) in browser storage (pane.remotePwa.expandedSessions@<host id>). Opening a Session under Pinned opens it under Sessions too. The native iOS and Android app keeps them in one file per host in its cache folder (open-sessions/), and Home and its Sessions screen share them. Child Pane rows are indented beyond the Session chat icon and keep the ordinary Pane actions. Create Pane, opened while a Session is showing, has an Add to checkbox, on by default, that files the new Pane under that Session. A Pane that belongs to a Session names it in the window title bar as " › "; click the Session name to go back to it. To file an existing Pane under a Session, right-click the Pane, choose Add to Session, then pick the Session. Remove from in the same menu takes it out again; the Pane and its worktree are unchanged. Pinned Pane rows show the Pane name with its repository muted beside it. Single-line Pane rows omit change counts and PR numbers; the optional two-row layout shows those details below the title. Session and Pane context menus use compact widths.

Under each repository, drag a Pane up or down to change its place, or move a focused Pane row with Alt+↑ and Alt+↓; a line shows where it will land and a screen reader hears its new position. The order is saved on the machine the Pane runs on (its display_order), so the phone shows it too, and agent activity, renames and archiving other Panes never move a row. A new Pane lands at the top. Sort in the sidebar's ⋯ menu is an action on that machine: Sort: Newest first or Sort: Oldest first (the current one says Current) re-sorts every repository's Panes once by creation and sets where new Panes land (top under Newest first, bottom under Oldest first); drags made afterwards hold. A machine running an older Pane cannot save a Pane order: the list snaps back and the error says to update Pane on that host. Commands: sessions:reorder-in-project ({ projectId, paneIds }; the listed Panes trade the places they hold, unknown ids are ignored, timestamps are kept), sessions:sort-panes ({ order: "newest" | "oldest" }) and sessions:get-pane-order ({ newPanes: "top" | "bottom", chosen }).

The Session row's icon

A Session row's icon spins only while the Session really works, and is an empty grey ring otherwise; it is never red (the amber approvals count and the expanded Pane rows show what needs you). It spins once the orchestrator's agent tab, or an agent tab in one of the Session's Panes (not archived), has been mid-turn without a break for 10 s, and stops 10 s after the last one ends, so a short wake-up never shows. Mid-turn is stricter than a Pane's own status dot:

  • A terminal agent needs its working chrome on screen (the spinner in its title, its thinking or working line), and that screen must have changed in the last 15 s. Output alone (a dev server, typing, a redraw) never counts, and a frozen spinner stops counting.
  • A chat tab needs an open turn that sent an update in the last 5 minutes, or a tool call still running.
  • A tab waiting on runpane watch, runpane panels wait, runpane notify or runpane secrets request is waiting, not working. A chat tab counts as waiting only while the tool call it is running is that wait; one sent to the background doesn't hide its real turns. A terminal tab counts as waiting while any such call from it is open, so an orchestrator in a terminal tab with a background watch or card open doesn't spin the Session on its own; its workers do.
  • A permission prompt, a menu, a usage-limit screen, a plain shell, and anything Pane cannot tell, read as idle.

The host that runs the agents decides this once and tells every client, so the sidebar, All machines (each machine's Sessions by that machine) and the web and phone apps agree; while a client can't reach the host it shows the Session idle, and a reconnect reads it again. "N working" counts the Panes with a working tab by the same rule. A machine that is offline, or too old to report it, shows its Sessions idle.

The experimental Attention inbox (Settings > Advanced > Experimental) turns the Projects list into an Inbox of the Panes that need you: an agent waiting on input or approval, an agent that completed a real turn since Pane started (it worked on a prompt and went idle; a freshly started agent does not count), or a Pane that errored. Session child rows follow the same filter, and a Session row still counts all of its Panes. A row leaves when its agent works again; opening it does not remove it. Hover a row and choose Dismiss (check mark) to hide it until its agent works again. The row under the Inbox counts the hidden Panes ("3 running · 1 idle") and Show all lists every Pane. Pinned rows are unchanged, and ⌘1–9 number the Inbox rows while it is shown.

Every Session opens with a split view: the conversation on the left and, on the right, the Overview tab first, before any page, file or browser tab opened beside the chat. A Session with no split yet gets one; an existing right split gains Overview as its leftmost tab and keeps the tab that was selected there. Overview can be dragged like any tab and stays where you put it on this computer, but it has no close button. To-dos comes right after it, the same kind of permanent tab: the to-dos this Session asked for, with an amber count while one of their approvals waits on you (see In a Session). A pane://open?session= link opens the Session with Overview selected. When the Session folder holds a status page at session/index.html (an orchestrator renders it there from a status JSON with the orchestrate-sessions skill's bundled renderer), Overview shows that page under a header with the Session name, Rename, Open as a browser tab (the page in a browser tab beside chat, in the tab already showing it) and Show Session details (the record described next). Pane checks for the page each time the Session refreshes. Links in the page to pane://open?pane=<id>&panel=<id> open that tab and show its oldest waiting question in Approvals, as Open in Pane does; other links open as a browser tab beside chat. A client connected to a remote host shows the record only. Without a page, Overview shows the Session's blockers, goal, next step, and decisions when they are set, then its Panes and recent activity. Each Pane card lists the Session's tabs in that Pane with their type icons: every tab when the Pane is linked whole, with Files and Changes last, or exactly the tabs a link names. Click a tab to open the Pane on it; Files and Changes open in the Pane's inspector. A Pane on another saved machine (workers on another machine) shows "On " with its tabs' states as that machine reports them, or "unreachable" when it doesn't answer, or "needs a Pane update" when its Pane is too old to report here; its card is read-only and opens from All machines. Agent state changes stay out of Activity; the status dot shows them. The right sidebar has Files and Changes tabs. Files browses the Session workspace. Changes summarizes the Session's Panes and opens a Pane for detailed review. The upper-right sidebar button shows or hides the selected tab. A single Session uses two rows at the top: the window title bar shows its name and controls, and the tab strip sits directly below it. Session file clicks open editor tabs beside the agent tab in that strip. These tabs can be selected and closed directly, and reopening a file restores its tab.

Two-row Session header in Folio

Two-row Session header in Walnut

Right-click a Session, or use its ⋯ button, to archive it. Archiving a Session also archives every Pane associated with it, removing their worktrees. When a Pane has work in progress (an agent working or waiting for an answer, text typed but not sent, unsaved edits, or uncommitted or unpushed work in its worktree), Pane first lists those Panes and asks: Keep them open archives the Session and the rest, Archive all archives them too, Cancel changes nothing. With none, it archives without asking. An "Archived · Undo" toast offers to restore the Session and the Panes it archived for a few seconds; Undo brings Panes back on their branches, not uncommitted changes. Archiving the open Session returns the desktop view to Home. The Session keeps its identity, conversation history, and Pane associations. Restore the Session from the sidebar’s Archived section, and its Panes from the Archived Panes list.

The Session update contract accepts archived: true or archived: false. archived: true archives the associated Panes on the host, whoever sends it (phone, runpane sessions update); a Pane with work in progress stays open. runpane sessions update reports what happened in panes: archivedPaneIds, keptPanes (with the block code) and failedPanes (with the error).

The desktop uses two channels. orchestration-sessions:archive-preview lists the Panes an archive would take, each with the blocked code runpane panes archive --pane would refuse it with, and changes nothing. orchestration-sessions:archive takes the Panes the person approved, { archivePaneIds, forcePaneIds }: it archives the Session and those Panes only, checks archivePaneIds again (one that became unsafe stays open), archives forcePaneIds as chosen, and returns the same archivedPaneIds, keptPanes and failedPanes for the toast and Undo.

List results retain archived records, in the saved order; active navigation filters them. An archived Session keeps its place, so Undo or Restore puts it back where it was.

orchestration-sessions:reorder takes { sessionIds }. The listed Sessions trade the places they already hold, so a list that shows only some Sessions (Pinned, or the active ones while others are archived) rearranges just those; unknown ids are ignored. It writes an optional order id list beside the Sessions in orchestration-sessions.json (the store stays at version 1) and changes no Session's revision, updatedAt or activity. An older Pane reading the file ignores order, lists Sessions in its own default order, and drops it the next time it writes. Archiving the selected Session chooses an available active Session or clears the selection if none remain. Restoring a Session does not replace an unrelated selection.

Move a Session to another machine

Right-click a Session, or use its ⋯ button, and choose Move to machine… to carry the whole Session to another of your machines: every Pane on its branch with its uncommitted work, every tab and its conversation, and the Session folder. It carries on there from where it is now, with the same Session, Pane and tab IDs.

The dialog lists your Tailscale machines running Pane, except the one the Session is on. Your teammates' machines are listed but disabled: a whole Session moves only between your own macOS and Linux machines, so for a teammate use Hand off with a note… (below). Machines Pane can't reach, or that run a Pane too old to receive a Session, are disabled with the reason. While you view a host connected with a pairing code rather than over Tailscale, the item is disabled. In All machines, the same item is in each Session's menu and moves the Session from its own machine without switching to it.

Choosing a machine runs the checks at once, and nothing is paused until they pass:

  • each repository the Panes use is on that machine, matched by its remote. A missing one offers Clone, to the same place under your home folder;
  • no branch there has commits this machine doesn't have, and none is checked out in another folder there;
  • each agent the tabs use is installed there, with a warning naming both versions when it is older there. Agent Farm profiles must be installed there (a different version warns), and Trust runs agent-farm workspace trust for a repository Agent Farm doesn't trust there yet;
  • project environment variables set here but not there are listed by name (values never travel; Pane secrets sync on their own).

A to-do's own Session never moves: its to-do stays on this machine, and the same number names a different to-do there, so the check blocks it (ERR_MOVE_TODO_SESSION from a start). A Session arriving from an older Pane keeps no to-do number.

Move then stops each tab as soon as its turn ends. A tab whose agent is only waiting in runpane watch counts as idle and stops at once. The dialog lists the agents still working; Stop now interrupts them, and they pick up the interrupted turn on the other machine. A stopped tab shows "Moving to " and refuses input, including messages and Notify answers, until the move is done. Run scripts stop too. Cancel move restarts everything here, unchanged.

Pane then packs, sends and rebuilds the Session:

  • each Pane's branch travels as a git bundle with the commits its origin lacks, plus a snapshot of its staged, unstaged and untracked work. The other machine creates the worktree on the same branch (upstream set when origin has it), puts the work back so staged stays staged, checks it, then runs the Pane's normal setup. Ignored files such as .env or node_modules aren't copied; setup rebuilds them there, and the done screen lists what stayed behind on this machine;
  • conversations (Claude, Codex and Cursor tabs, and chat tabs) are copied byte for byte into that machine's agent stores, never edited. A copy there that was continued after an earlier move is never overwritten: the move stops instead;
  • the Session folder is copied with its text files rewritten for that machine's paths. moved.json in the folder records the path map, for anything that still names the old paths (conversation history keeps them);
  • a browser tab previewing a file (runpane panels open --file) moves when the file moved with the Session: in one of its worktrees or its Session folder, and there on the other machine. It opens the file at its new path there. Any other preview (a file elsewhere, an ignored file, one that's gone) stays behind, and the done screen names each and why. A preview never stops the move;
  • terminal tabs keep their scrollback;
  • waiting approvals move with the Session, dismissed ones too. Stopping the tab that asked doesn't end them; they leave this machine's Approvals when the move packs and show in Approvals on the other machine once it starts there. An answer there is typed into the asking tab (answer: Q-n → …), and a worker's question moves with its inbox item, so runpane inbox ack and its decision work there. A card answered while the move stops the tabs stays here with its answer, and the done screen names it so you can tell the agent. The check holds the move for an answer still in its few-second Undo hold, and for a secret, lease or permission prompt, which can't move.

Until it starts, the Session shows as "Arriving from " there. Once this machine has frozen its copy (shown as "Moving to "), the other machine starts each tab that was running on its conversation. The orchestrator and each agent that was working get one line saying the Session moved, the path map, and to restart their servers and watches. A tab that can't resume shows the problem there; the move isn't undone.

This machine then archives the Session as "Moved to ", with its Panes archived and their worktrees removed. The uncommitted work stays in each repository (refs/pane/move/<pane id>), and the ignored files that stayed behind move into the repository's .git/pane-moved/<pane id>/ first, so Restore here from the archived list brings back the Session and its Panes with their work and those files while the archive lasts. Restore only when the other machine no longer runs it. Moving the Session back later replaces that archived copy, but only once the move back succeeds: until then its tabs, history and terminal output wait out of sight, and a failed move back leaves the archive as it was. If a Pane's ignored files can't be set aside, that Pane stays here, paused, with its worktree, and the summary says which files wait where.

If anything fails before the other machine starts the tabs, it removes everything it set up, this machine restarts the tabs and removes the snapshot refs the move made (putting back an earlier move's, kept for Restore), and the dialog says what happened and what to fix. The other machine writes down how to undo each step as it takes it, so that clean-up also happens if Pane there quit partway through: when it starts again, it removes the Panes, worktrees, tabs, conversations and arriving Session it made, and puts back what it had replaced. Clean-up undoes the newest step first and stops at a step that fails, so an older step never puts something back that the failed one still has to remove. That step is retried (a permissions or disk problem), and after five tries Pane there shows one notice naming what was left and how to fix it. After the freeze, the other machine records its one decision on disk before acting on it: that the move started there, or that it was rolled back and can never start. This machine keeps the Session paused as "Moving to " and keeps asking until it hears that decision, also after either Pane restarts: it asks again to start while the other machine says the move is set up but not started (a lost message, or a restart there), retires its copy once the move started there, and runs the Session here again only once the other machine confirms it rolled the move back. A start cut short by a restart there finishes on its own when that Pane starts again. While the other machine doesn't answer, or can't say, the Session stays paused here, so it never runs twice, and the dialog says which: not answering means open Pane there; answering without a decision (including an error from Pane there, such as a record it can't read) means check the Session there. A record there that can't be read counts as no answer, never as a roll-back. Check again asks at once, and retries a start that failed there before any tab started.

Not moved: secret values and keychain items, running processes (restart them there), Agent Farm telemetry, and conversations of agents whose sessions aren't plain files (an OpenCode tab starts fresh).

Hand off with a note… in the same dialog keeps the older way: it asks the Session's agent to write a handoff note and run runpane handoff with the handoff skill. That suits a single task, another agent, or a teammate's machine. Handoff creates a Session on that machine with the same name (numbered " 2" if the name is taken), goal and agent, whose next action is to read the note in that machine's ~/.pane/handoffs/. With the same agent, the agent session's files are copied too, and the new Session starts on that conversation right away; check that it shows the last message. With a different agent, or --note-only, only the note moves. The Session folder and its Panes stay where they are, and the original Session is not archived.

Bring your existing sessions into Pane

On a new install, Pane's first-run screen asks two things before anything else:

  1. Which agent do you use? Claude Code, Codex or Cursor, showing only the agents this computer supports. An agent whose CLI Pane can't find says "Not found on this computer", with an install link. The screen says Pane runs it with its permission prompts off, as Pane always launches these agents. When Claude Code then shows its one-time bypass-permissions warning in the Onboarding Session, Pane answers "Yes, I accept" in the terminal, and Claude records the acceptance itself. Pane never edits Claude's config files while Claude may be running. The pick becomes the Onboarding Session's agent and the default for new Sessions (Settings → AI & Agents).
  2. Bring your N sessions into Pane? Pane looks for sessions from Claude Code, Codex, Conductor, Paradev (formerly Superset), Herdr, Emdash, Orca and T3 Code on this computer and counts those running now or used in the last 7 days. Pane opens them in place and deletes nothing.

Yes is the confirmation: the screen closes, the Onboarding Session opens, and its agent runs the migrate-to-pane skill below on that set with no list to confirm. It groups the work into one Session per workstream, says what a Session, a Pane and a tab are the first time it makes one, and ends by opening a Start here page beside the chat. The page lists your workstreams, a receipt of what came over and what was left out (with why), what you can undo, the words Pane uses, and 3 to 5 things to try next with prompts naming your own repositories. The page is saved as <PANE_DIR>/migrate-to-pane/start-here.html.

Not now, or nothing found, shows "Open your project" (your repositories, a folder, a GitHub clone, or a sample repository). Opening one, or skipping, also lands in the Onboarding Session, whose agent makes a Start here page for that project, without the receipt. Without Git, the screen shows only how to install it.

Settings → AI & Agents → "Bring sessions into Pane" → Find sessions brings idle sessions in with one click at any time:

  • Pane reads each tool's session list locally (metadata only; SQLite stores from a temporary copy) and lists sessions active in the last 30 days, one row per tool. Sessions from the last 7 days are preselected, at most 3 per checkout; click a row to choose sessions. Paradev's sessions are read from ~/.paradev and ~/.superset (its folder before Paradev 2.0.4), or from SUPERSET_HOME_DIR when it is set.
  • Bring them in adopts each checkout in place as a Pane, with one tab per session resumed by the agent's own id. A transcript kept in a tool's own agent folder is first copied into your own Claude Code or Codex store.
  • Sessions still running elsewhere are listed but can't be chosen, and neither can other sessions in the same checkout; quit them and press Check again, or use the skill below, which forks them. A tab whose agent exits without resuming is closed and reported, and a new Pane whose sessions all failed is removed. A tab waiting at the agent's folder-trust prompt, or whose agent is still starting, stays open for you.
  • The card and the skill share the record below, so neither brings a session in twice.

Say "migrate to Pane" in any Session, or Yes on the first-run screen, and the migrate-to-pane skill brings the conversations you already have in other agent tools (Claude Code, Codex, OpenCode, the Cursor agent, Conductor, or anything similar) into Pane tabs:

  • It reads session metadata on this machine, including WSL distros and agents running in other terminals or editors, and shows one list grouped by repository. Running sessions and those active in the last 7 days are preselected; older ones can be added. Nothing is created until you confirm. After a Yes on the first-run screen, it places that preselected set without showing the list.
  • An idle session's checkout is adopted in place (runpane panes adopt --resume); several sessions in one checkout become tabs in one Pane. A session still running elsewhere is forked with its own tool into a new Pane on a new branch, with your uncommitted and untracked files copied, and the original keeps running untouched.
  • Each tab is resumed by its agent's own resume-by-id and must pass the continuity check in the skill's references/continuity.md (same native session, a restart comes back to it, history loaded, original untouched) before it is reported as continued. A session that fails is reported as not continued with the reason and next step, never replaced by a fresh agent.
  • It keeps a record in <PANE_DIR>/migrate-to-pane/record.json, so running it again lists what is already in Pane and creates nothing twice. Archiving an adopted Pane keeps your checkout.

Session startup

Creating, opening, restoring, restarting, or switching the agent in a Session does not submit a bootstrap message. The terminal waits for user input with its role, profile, and Pane capability instructions available. There is no automatic greeting, diagnostic sweep, watcher setup, or continuation of a saved next action. Reopening an already-running Session reconnects without interrupting work the user has already authorized.

There are two exceptions, each at most once per Pane data directory.

The first time the Onboarding Session launches after the first-run screen, Pane sends it one prompt, which says that Pane sent it and why. After Yes, the prompt tells the agent to bring in the sessions you said yes to; after Not now, to make a Start here page for the project you opened. The screen saves your answer in the onboarding_handoff user preference (migrate or project). Pane records the prompt in the pane_chat_migrate_offer_sent user preference once a launch has sent it, so a restart or an agent switch never sends it again. Installs that never showed the screen get no prompt. See Bring your existing sessions into Pane.

Pane may also offer Pane Chat once, in a card over a Pane, after you have created at least two worktree Panes and used Pane on at least three days, if you have never created a Session. "Try it" creates a Session named after the Pane's repository, whose agent introduces itself, suggests two small tasks from that repository, and waits for your answer before starting any Pane. Pane removes that opening prompt from the Session once a launch has sent it, so a restart never sends it again.

Pane may prepare instruction files and terminal infrastructure at startup; that preparation does not require an agent turn. Unattended work and watchers are separate, explicitly authorized activities.

Shared tools and authority

Session orchestrators and regular agent panels share RunPane's coordination capabilities. Use runpane doctor --json and runpane agent-context --json when the task requires those capabilities, and discover individual schemas with runpane agent-context --command "<command>" --json.

An associated worker completes its assignment and reports results or blockers to its owning Session. Reporting is participation. Creating workers, assigning work, redirecting agents, or changing ownership requires a user request or an explicitly delegated task with that authority. Existing authorization persists within its scope. An independent Pane works locally unless coordination is requested. Tool availability does not authorize unrelated work or automatic sharing of other conversations.

One Pane per feature

Each feature has one Pane, and its reviews, audits, fixes and QA are tabs in it. runpane doctor prints the full working rules.

A feature here means one branch and its PR. A new Pane creates a worktree that checks out the repository, installs dependencies and often builds, so it is expensive, and creating several at once can freeze the machine. An orchestrator creates a Pane with runpane panes create only when the work's branch has no Pane yet: new work, or an existing PR with no Pane.

Pane enforces both: panes create --branch refuses a branch another Pane has checked out (code ERR_RUNPANE_BRANCH_HAS_PANE, naming that Pane), and at most 2 Panes run setup at once while the rest wait in line.

Every later agent for that feature runs inside its Pane as a new agent tab: implementer, reviewer, follow-up reviewer, auditor, fix implementer and QA. Each tab is a fresh agent with its own context, sharing the Pane's worktree and branch:

runpane panels create --pane <feature-pane-id> --tool-command "<agent command>" --source agent --no-focus --wait-ready --yes --json

Before runpane panes create, find the work's Pane with runpane panes list --repo <repo> --json, matching the PR's head branch (gh pr view <n> --json headRefName) against git -C <worktreePath> branch --show-current, and use it when it exists.

Tabs share one checkout. Only the implementer changes the branch or HEAD, one writer at a time, and a fix tab starts only after the previous writer has stopped. Review, audit and QA tabs never run git checkout, reset or stash. Never create a Pane to review, audit, fix or QA work that already has one. Keep the feature's Pane until its PR merges or closes, so later tabs still have the worktree; archive it then.

Pane association before delegation

Management is a Pane-level relationship; tabs inherit the relationship and share the Pane's worktree. Panes created or adopted with runpane panes create or panes adopt from inside a Session are associated with it in the same call: from the orchestrator (the CLI reads PANE_ORCHESTRATION_SESSION_ID) or from any tab in a Pane that belongs to the open Session (Pane looks up the calling tab, $PANE_PANEL_ID). Each result item reports association: { sessionId, ok, error? }, and --no-associate opts out. A failed association never undoes the new Pane. Before delegating to an existing Pane, or when automatic association failed, the orchestrator associates it explicitly. The supported command is:

runpane sessions associate --session <id|name> --pane <pane-id> [--json] [--pane-dir <path>]

Verify the result with runpane sessions overview and reuse an existing association. A Pane already managed by another Session is a conflict: do not detach, reassign, or create a duplicate Pane. When a prompt is passed to panes create, check the item's association.ok right away. Keep a Pane attached through idle and completion; do not detach on completion. Archiving preserves the association.

To close out finished work, runpane panes archive --session <id|name> --merged [--closed] [--remove-worktree] [--dry-run] --yes --json archives each associated Pane when all of these hold:

  • Its PR is merged (or, with --closed, closed without merging). Pane looks the PR up by the Pane's branch on GitHub (pr). An open PR is skipped as pr-open, because its review, fix and QA tabs still need the worktree. No PR, or without --closed a PR closed without merging, is skipped as pr-not-merged, so a worker that has pushed but not opened its PR keeps its Pane. A PR state GitHub can't confirm is skipped as pr-status-unknown.
  • No agent in it is mid-turn. A Pane with a working agent is kept as agent-busy; archiving would stop it. A Pane with a tab holding text typed but not sent, or an editor with unsaved edits, is kept as unsent-input; archiving would lose it. runpane panes archive --pane <id> checks the same.
  • Its worktree holds no unsaved work. It has no uncommitted or untracked changes, and every commit is on its upstream after a fresh git fetch, or, without an upstream, on a remote-tracking branch or the base branch. A failed fetch or unreadable worktree is skipped as status-unknown. This check runs after the PR lookup, right before the worktree is removed.

Every skipped Pane has a skipped.code and a message with the next step. --remove-worktree also removes adopted worktrees; local branches are always kept. Run it with --dry-run first.

To-dos in a Session

Every top-level to-do you start gets its own Session, named "T-41 · Title" and kept out of the sidebar, with its own orchestrator. Its sub-to-dos stay in that Session. The generated instructions (the Session folder's AGENTS.md and the pane-orchestrator skill, from todosSection() in main/src/services/sessionTidyRules.ts; the bundled pane-orchestration skill says the same in its own words) make the to-do list the orchestrator's work list:

  • It creates to-dos and sub-to-dos as soon as work exists (runpane todos create, --parent T-n), assigns each sub-to-do to the worker tab doing it (runpane todos assign T-n --panel <tab-id>), and keeps an agent working on every in-progress to-do until it is ready for review.
  • It follows the attach rule, which a test checks word for word in each of those instructions and in the runpane and pane skills: "Attach every plan, mock-up, design, PR, findings file and decision page you produce or rely on, as soon as it exists. Read a to-do's attachments before you start on it."
  • It asks the to-do's requester first (runpane todos ask), then the person with --todo T-n; its workers ask it with runpane report --state blocked --todo T-n. It replies in the to-do's chat with short summaries (runpane todos comment, at most 2,000 characters).
  • When every done-when check is met it runs runpane todos review; after the person's Accept it does the wrap-up (merging only if asked, cleanup, runpane todos archive) and runs runpane todos done.
  • An agent start refused with machine_busy means wait: Pane types "Capacity is back" into its tab.

The orchestrator's watch keeps its workers moving as before. Pane's supervisor keeps the orchestrator moving, and on launch restarts the orchestrators and assigned tabs of in-progress to-dos.

Keeping a Session tidy

The generated Session instructions have their own "Keep the Session tidy" section (main/src/services/sessionTidyRules.ts, used by the Session folder's AGENTS.md and the generated pane-orchestrator skill; the bundled pane-orchestration skill carries the same rules). The orchestrator cleans up as it goes without asking, and says in one line what it closed or archived. In a to-do's own Session, runpane todos archive T-n after the person's Accept archives its Panes with the same checks:

  • It keeps one status document at session/index.html in the Session folder, updated in place, which the Session's Overview tab shows (it never opens it as a tab), and links plans, PRs, mock-ups and reports from it. It opens a page beside the person only when they need to look at it now, and closes it once that's done.
  • It closes tabs it opened once they no longer matter, with runpane panels close --panel <id> --yes --json. Whether a tab still matters is its judgment; Pane refuses only closes that could lose work: a tab the person opened (any tab without an agent opener, including every tab from before openers were recorded), a permanent tab, an agent mid-turn, and unsent composer text. For a stuck worker, or a tab the person asks it to close, --force closes it anyway, as the tab's close button does (D-209).
  • It archives a feature's Pane after a clean panes archive --pane <id> --dry-run --json once its PR merged or closed, including right after a merge the person asked for. It keeps a Pane with unsaved work or a busy agent and says why. It never passes --force and never touches another Session's Panes or tabs.

/wrap-up wraps up a Session in one step. Pane ships it as the bundled wrap-up skill and writes a copy into each Session folder, at .claude/skills/wrap-up/SKILL.md (Claude Code, typed as /wrap-up) and .agents/skills/wrap-up/SKILL.md (Codex, as $wrap-up or from /skills). The Session's AGENTS.md points every orchestrator, Agent Farm's included, at it for "wrap up" in plain words. Workers in feature Panes start in their own worktree and don't get it. Pane rewrites the copies on launch unless you replaced one with your own (it has no Pane marker). It:

  1. Takes stock: the work list, sessions overview, and each PR's live state from the archive sweep's dry run (the overview's PR state can lag a merge), sorting the Session's Panes into finished, parked (PR open, all pushed, nothing running), busy and unsafe (uncommitted or unpushed work).
  2. Tells you first, before archiving anything, about whatever needs your attention: uncommitted or unpushed work, open PRs, commits no review covered, agents still working and open work-list items. It posts this as an info notification and writes it in the conversation; it doesn't ask or wait.
  3. Stops its watchers, closes every tab it opened, archives every Pane whose dry run is clean (parked ones too; their PRs stay open), keeps unsafe Panes, and marks the other open work-list items dropped. A worker still working keeps its Pane; once it finishes, its Pane is archived after a clean dry run.
  4. Ends with its report, always: what it archived, what it kept and why, the PRs still open and how to restore a Pane, ending with "Nothing left to do in this Session."

It doesn't archive the Session: the Session stays open with the report in it, and you archive it from the sidebar when you're done. It never merges, commits or pushes for a worker, forces, deletes a branch, closes a tab the person opened, or touches anything outside the Session.

Before mutating, use runpane agent-context --command 'sessions associate' --json to confirm the wrapper supports the command. If an older global CLI does not, select and verify the app-compatible dev wrapper from the Pane runtime context before proceeding. Never silently continue without the association or substitute an unverified global/npx wrapper.

Sessions do not create worktrees and do not edit project implementation files. An association identifies work that a Session coordinates; it does not grant implementation authority by itself. Detach a Pane before assigning it to a different Session.

Worker file access

A worker's agent may be allowed to read only its working directories (Claude Code's permissions.blockReadsOutsideWorkingDirectories). Its brief and the Session files the brief points to must not sit outside them, or the worker stops on a permission prompt nobody is watching.

Briefs and attachments. --as-file-pointer (panes create, panels create, panels submit, agents send) writes the prompt inside the Pane's worktree, at <worktree>/.pane/prompts/<timestamp>.md, and sends the one line Read and follow .pane/prompts/<timestamp>.md. The path is relative to the worktree, where the agent starts: given an absolute path, Claude Code often reads it with cd <worktree>; cat <file>, which its read check can't verify, so it asks. The result's promptFile is always absolute. Pane adds /.pane/prompts/ to the repository's .git/info/exclude (never a committed .gitignore), so the file can't be committed. --attach <file> (repeatable; panes create, panels create and panels submit, with --as-file-pointer) copies each file into <worktree>/.pane/prompts/<timestamp>/ and sends Read and follow <path> (attached: <copy>, ...), also worktree-relative; the result lists the copies, absolute, in attachments. Attach mockups, plans or dispatch notes the worker needs instead of pointing at the Session folder. Without a local git worktree (a folder that is not the top of a checkout, a WSL repo) the file goes to <pane-dir>/prompts/<pane-id>/ as before, and the pointer line names it by absolute path.

The Session folder. A Pane associated with a Session gets that Session's folder (<pane-dir>/sessions/<id>) as PANE_SESSION_DIR in every tab created after the association. The Session's own terminals get it too. PANE_ORCHESTRATION_SESSION_ID keeps its meaning: it is set only in the Session's own terminals, never in a worker's. Workers read the folder and never write it; the orchestrator is its only writer. What each built-in template gets:

Agent Read access to the Session folder
Claude Code (claude --dangerously-skip-permissions) Pane adds --settings '{"permissions":{"additionalDirectories":["<folder>"],"deny":["Edit(/<folder>/**)"]}}'. additionalDirectories (like --add-dir) makes the folder a working directory, which grants read and write; an allow rule alone does not lift blockReadsOutsideWorkingDirectories. The Edit deny rule takes the file tools' write access back (it covers Write too; Claude ignores Write(path) rules). Under bypass permissions Bash can still write anywhere, so the read-only rule is a guard, not a sandbox. The folder's CLAUDE.md is not loaded. Not added on Windows. At launch Pane merges this value into the tab's one settings file (Claude's own prompts).
Codex (codex --yolo) Nothing to add: --yolo runs without a sandbox, and every Codex sandbox mode reads the whole disk. Codex's --add-dir grants write access, so Pane does not pass it.
Cursor, OpenCode, Pi Only PANE_SESSION_DIR.
--tool-command wrappers (agent-farm) and custom commands Only PANE_SESSION_DIR; the wrapper maps it to its harness's flag.

The flag is fixed when the tab is created: a tab opened before its Pane was associated has no PANE_SESSION_DIR until a new tab is created.

The scratch folder

Every tab Pane starts gets PANE_SCRATCH_DIR, a folder for the agent's temporary files, clones, captures, downloads, logs and test instances (an isolated PANE_DIR and HOME for QA), so nothing lands in /tmp where archive never reaches it. Pane creates it when the first tab starts:

Pane PANE_SCRATCH_DIR Deleted
A worktree Pane created (archive removes the worktree) <worktree>/.pane/scratch/, hidden by the repository's .git/info/exclude With the worktree, on archive
A Pane on the main checkout or an adopted worktree <pane-dir>/scratch/<pane-id>/ 14 days after archive
A Session's own tabs <pane-dir>/scratch/<session-pane-id>/ 14 days after the Session is archived
A WSL project, or a WSL terminal of a worktree Pane created <pane-dir>/scratch/<pane-id>/, as a /mnt/c/... path inside WSL 14 days after archive

Tabs on an SSH host get no PANE_SCRATCH_DIR: a folder on this machine means nothing on the remote one.

Pane never deletes a main checkout or an adopted worktree. The 14 days come from Settings → Worktrees & Git → Keep archived folders; restoring before then keeps the folder. A permanently deleted Pane's scratch goes at the next expiry pass. Pane records each archive time in <pane-dir>/scratch/.archived/<pane-id>, outside the folders agents write, and checks again right before each delete that the Pane or Session is still archived. Scratch never blocks archive: its files are hidden from git, so they are neither untracked nor uncommitted. runpane panes archive --dry-run lists the folder with its size, and the date it will be deleted when it is kept.

Before deleting a scratch or Session folder, Pane moves every agent log inside it (an agent run with its home there) to <pane-dir>/agent-logs/<agent>/<pane-id>/, finding them by each agent's transcriptDirs in the agents config. If a move fails, nothing is deleted. Usage & Limits reads <pane-dir>/agent-logs/ beside ~/.claude/projects and ~/.codex/sessions. Pane only reads, moves or deletes a folder that sits exactly where Pane put it: a scratch folder that is a symbolic link or a Windows junction, or is reached through one, is left alone (a link is only unlinked), so Pane never moves or deletes anything in the agents' own folders in your home.

Write the folder's absolute path into the brief rather than $PANE_SESSION_DIR. Under blockReadsOutsideWorkingDirectories Claude Code asks before any Bash command whose variables it cannot check, so a worker that runs echo $PANE_SESSION_DIR or cat "$PANE_SESSION_DIR/..." stops on a prompt. The variable is for wrappers and scripts.

Stable interfaces

The shared record and service are:

  • shared/types/orchestrationSession.ts
  • main/src/services/orchestrationSessionManager.ts
  • orchestration-sessions.json below PANE_DIR

The store has no size or count limit. On load, Pane keeps every Session in the file's sessions array that decodes, whatever the file's version says, and drops any malformed Session, link or activity entry. An invalid selectedSessionId or order is dropped. Only a file that is not JSON loads with no Sessions. If anything was dropped or repaired, Pane logs it and first copies the file to orchestration-sessions.json.corrupt-<timestamp> beside it. The original file stays as it was until the next write.

Each Session keeps its newest 500 activity entries and 1000 inbox items. Set retention in config.json to change either: "retention": { "sessionActivity": 500, "sessionInbox": 1000 }. A missing or invalid value uses the default.

The daemon and Electron IPC channels are:

orchestration-sessions:list, orchestration-sessions:select, orchestration-sessions:create, orchestration-sessions:get, orchestration-sessions:update, orchestration-sessions:archive-preview, orchestration-sessions:archive, orchestration-sessions:reorder, orchestration-sessions:set-agent, orchestration-sessions:associate, orchestration-sessions:detach, and orchestration-sessions:overview.

Selectors accept a stable Session ID or an exact Session name. Phone apps released before chat tabs crash on a tab kind they don't know, so clients that show chat tabs pass { chatTabs: true } as a second argument to orchestration-sessions:create, orchestration-sessions:get and panels:list (desktop, the PWA and current phone apps do). For any other client, create starts the orchestrator in a terminal, get of a Session whose orchestrator is a chat tab fails with CHAT_TAB_CLIENT_OUTDATED, which says to update Pane on the phone, and panels:list leaves chat tabs out.

orchestration-sessions:list, :select and :reorder take { summary: true } as their last argument. The answer then leaves each Session's activity log and profile out, which are most of a record's size: on one machine with 123 Sessions the list fell from 4.5 MB to 262 KB. The sidebar, the All machines feed, a host switch and the phone ask for it; get and overview still carry the full record. A host older than this ignores the argument and sends full records. Desktop requests to another machine also ask for gzip, and the host compresses answers of 1 KB or more. The existing pane-chat:* channels remain compatibility endpoints for the imported legacy conversation.

RunPane exposes the corresponding commands:

runpane sessions list --json
runpane sessions get --session <session-id-or-name> --json
runpane sessions overview --session <session-id-or-name> --json
runpane sessions create --from-json <path|-> --json
runpane sessions update --session <session-id-or-name> --from-json <path|-> --json
runpane sessions pin --session <session-id-or-name> --json
runpane sessions unpin --session <session-id-or-name> --json
runpane sessions set-agent --session <session-id-or-name> --agent <agent> --json
runpane sessions associate --session <session-id-or-name> --pane <pane-id> --json
runpane sessions detach --session <session-id-or-name> --pane <pane-id> --json

sessions create starts the Session's agent, as opening it in the app does. To give it a first prompt, wait for the agent, then submit:

runpane panels wait --panel <panelId> --for ready --json
runpane panels submit --panel <panelId> --text "<prompt>" --yes --json

When a Session's Claude runs on this machine, Pane answers Claude's "trust this folder" prompt for the Session's own folder, choosing "Yes, I trust this folder" in the terminal, so the agent starts without a click. Pane answers only when the Session launches a plain claude … command (the default, or a custom one with no cd, wrapper or shell operator), only when the prompt shows exactly the Session folder, never a project, and only until Claude is first ready. This is best effort: a prompt Pane does not recognize, or a folder path with a space in it, stays on screen for you to answer. A WSL Session's Claude is not answered, so it asks on its first launch.

Use --from-json for structured create and update input. Keep multiline context, evidence, links, and reports in the JSON file or stdin; do not put external text into shell source. Re-read mutation results and inspect the overview after associations or updates.

Session JSON shapes

  • decisions and blockers are arrays of strings.
  • evidence and outputs are arrays of links: {"label", "url", "addedAt", "kind"?, "provenance"?}. url starts with https://, http://, file:// or grain://; addedAt is an ISO 8601 date; kind is evidence, output, ticket, pull-request or other.
  • report (update only) is {"summary", "status": "reported"|"verified", "evidence": [at least one link], "reportedAt", "provenance"}; null clears it.
  • Arrays replace the stored value, so send the whole list.
  • A bad payload is refused whole with one ERR_SESSION_PAYLOAD_INVALID error that lists every problem (outputs[0].addedAt: missing, ...). The CLI checks it before calling Pane, and the daemon checks it again for clients such as runpane-py (main/src/services/orchestrationSessionPayload.ts).

runpane agent-context --command "sessions update" prints the fields and a complete example.

Resume and refresh persisted context

When responding to a user task that needs Session state, read PANE_ORCHESTRATION_SESSION_ID from the current environment. Pane exports this stable identity for Session panels, including agent resume paths that do not receive the original bootstrap input. Do not infer the Session from a terminal panel ID or from conversation text.

When the variable is present and the task requires it, reload the saved record and then reconcile live Pane, tab, branch, and evidence state:

runpane sessions get --session "$PANE_ORCHESTRATION_SESSION_ID" --json
runpane sessions overview --session "$PANE_ORCHESTRATION_SESSION_ID" --json

Run get to recover persisted intent and associations, and run overview when continuing a task after a resume or after a mutation. For workers, this variable does not identify a parent Session. Use runpane sessions list --json and Pane associations to resolve ownership; never infer it from the selected UI Session. Refresh associations before coordinating work. If the stable ID cannot be resolved, report the error before taking Session-specific actions.

Identity and overview

Each orchestration Session has a stable ID, a hidden detached Pane session for its conversation, and one deterministic terminal panel for each supported agent. The imported legacy Pane Chat record retains its legacy internal IDs, resume IDs, and terminal buffers. New Session records must not reuse those identities.

Legacy Pane Chat keeps its agent histories together in one Session. Previously split imports are reunited only when untouched; retained independent imports receive separate hidden owners so their workspace tools cannot cross Sessions.

The overview joins persisted intent with fresh Pane, tab, branch, worktree, agent, and available Git or pull request evidence. Working, idle, stopped, exited, missing, and archived states describe activity or availability. They do not prove completion. A completion report must carry inspectable evidence, the report timestamp, and provenance; new activity makes an older report stale.

Named locks for shared resources

When several workers share one resource that only one of them may use at a time, such as a test account whose "approve guest" banner any logged-in worker can click, name a lock in their prompts. Each worker takes the lock before it uses the resource and gives it back after:

runpane lock acquire --name testing-account --ttl 30m --wait 1800000 --note "call QA" --json
# ... use the shared account ...
runpane lock release --name testing-account --json
  • Owner. The calling Pane and panel, from PANE_SESSION_ID and PANE_PANEL_ID (or explicit --pane/--panel). Outside a Pane terminal the owner is external and --note is required: it names the owner, so pass the same note to release.
  • Scope. A lock is scoped to the owner's Session when its Pane belongs to one (as the Session's orchestrator or an associated Pane), so two Sessions can each hold testing-account. A Pane outside any Session uses the global scope. The scope is fixed when the lock is first taken.
  • Acquire. Succeeds when the lock is free, expired, or already held by the same owner, which renews the TTL (renewed: true). Otherwise it returns ok: false with heldBy and expiresAt and exits 1. With --wait the call blocks in the daemon, which grants the lock to the oldest waiter as soon as it is released or expires; the CLI chains daemon calls of up to 120 seconds for longer waits.
  • Release. Only the owner can release a lock. --force releases another owner's lock, for example a stuck worker's; add --session <id|name> to name a Session-scoped lock from outside that Session.
  • Automatic release. Pane releases a lock when its TTL (at most 24h) runs out, when the owner panel's terminal exits or is closed, and when the owner Pane is archived. Quitting Pane does not release locks: the resumed agents still expect to hold them.
  • Storage. Locks are saved in locks.json below PANE_DIR with temp-and-rename writes, so they survive a daemon restart. Expired locks and locks whose owner Pane or panel is gone are dropped when the file loads.
  • Visibility. runpane lock list [--session <id|name>] lists held locks, and sessions overview includes locks: those scoped to the Session plus those its Panes hold.

If a worker interrupts a waiting lock acquire, the daemon may still grant it the lock for up to two minutes; release it, or let the TTL expire.

Orchestrator guide

The mechanics of driving workers through Pane, for any orchestrator and any harness (a Pane Session, a Claude Code or Codex session in a Pane terminal, or a wrapper such as Agent Farm), live in one place: the bundled pane-orchestration skill. Any agent can read it with runpane docs read --doc skills/pane-orchestration/SKILL.md, and the home pane skill points there. It covers one Pane per feature, launching a worker as a Pane or tab (including --tool-command wrappers, --initial-input-file --as-file-pointer, --wait-ready and reading the delivery result), the one wait primitive (runpane watch --session <S> --as <name> --until-event) and what each wake means, worker reports and how a status file pairs with them, answering workers, resuming after a restart or sleep, showing pages beside the person, shared-checkout and port etiquette, handoff, cleanup, and what changes after the next release. The sections below are the reference for each piece.

Session watcher

When monitoring is authorized, use one durable, named watcher per Session. Do not start it merely because a Session opens. --session takes the Session ID or exact name, and the daemon follows every Pane associated with it:

runpane watch --session <session-id> --follow --json

The daemon resolves the Session once per request and re-reads its associations on every journal read. A Pane associated after the watcher starts is included; a detached or archived Pane drops out, together with any line still held for it by --ready-settle or --min-interval. The Session's own hidden owner and orchestrator panels never appear, and an association limited to specific panels reports only those panels. There is no re-arm after sessions associate or sessions detach. --session cannot be combined with --pane, an unknown Session fails the watch, and a daemon that predates --session fails it with WATCH ERROR instead of watching every Pane.

After a Pane restart, an agent panel whose process did not come back is reported once as panel.stopped (STOPPED <pane-name> pane <pane-id> panel <panel-id>, running: false), never as agent.ready. Restart it in place, with the same panel ID and its conversation, using runpane panels resume --panel <panel-id> --wait-ready --yes --json, or every stopped agent panel of the Session at once with runpane panels resume --session <session-id> --wait-ready --yes --json. A worker started with agent-farm run <profile> resumes with --resume and the launch ID Agent Farm printed, the same rule a restart uses (see "Agent Farm" above). The bulk form restarts --concurrency panels at a time (default 3), leaves running panels alone, waits on the resumed panels together, and returns one result per panel with its readiness, blocker, or error; --all-stopped does the same for every Pane. It relaunches finished workers too, so resume single panels when only some should continue. Both bulk forms skip paused tabs.

Pause stops a tab's process the way quitting Pane does, without asking, and keeps its panel and conversation: runpane panels pause --panel <panel-id> --yes, runpane panes pause --pane <pane-id> --yes, or runpane sessions pause --session <session-id> for the terminal tabs of the Session's chat and every Pane in it. Pause leaves a chat tab running: the result counts it in chatTabsNotPaused and says so, and panels pause refuses one. Auto-pause (Settings > Pause) does stop the agent of a chat tab idle for chatIdleReleaseMinutes (30 by default), outside the Pane on screen and never while it works, holds a queued message or waits on the person. Opening the tab or sending it a message resumes it in its conversation, and it reports no panel.paused. A Session whose orchestrator is a chat tab therefore never reads as paused. A paused terminal tab stays stopped through clicks, app restarts and updates until runpane panels resume --panel <panel-id>, runpane panes resume --pane <pane-id> --yes or runpane sessions resume --session <session-id> restarts it in its conversation. A tab held by a Session move is the exception: only the move starts it again. While it is held, submitting to it and resuming it are refused with ERR_SESSION_MOVING until the move finishes or is cancelled, or the Session is restored here. The watch reports each paused tab once as panel.paused (PAUSED <pane-name> pane <pane-id> panel <panel-id>) and each resumed one as panel.unpaused (UNPAUSED ...), followed by its usual ready signal. An orchestrator leaves paused workers paused unless the person asks. Any other start of a paused terminal tab (opening it, a retry, another machine) fails with ERR_PANEL_PAUSED and starts nothing. runpane panes list --json reports each Pane's paused mark ({ at, by: "manual" | "auto" | "move", idleHours?, machine?, arriving?, interrupted? }; machine, arriving and interrupted come only with move) and inactiveSince, the latest terminal output or input or chat agent activity in its tabs or the last time the person selected it; runpane panels list reports each tab's paused.

If a stopped panel's previous shell or agent process is still exiting, resume returns a still stopping error instead of starting a second process. Retry after the old processes exit. This also applies when bounded teardown could not kill a process; bulk resume reports the error for that panel and continues with the others. Archived Panes cannot be resumed, even if archive cleanup failed.

Membership changes are journal entries: pane.associated (JOINED <pane-name> pane <pane-id> session <session-id>) and pane.detached (LEFT ...). The Session manager emits them from sessions associate (only when the Pane was not already a member) and sessions detach. A watch without --session receives them only when --kinds lists them, so older clients never see an unknown kind. Cadence state is keyed by the Session rather than its current Panes, so held lines survive membership changes.

Watching a PR from any Pane

runpane pr watch --pane <pane-id> --url https://github.com/owner/repo/pull/123 --head <full-sha> --json
runpane watch --pane <pane-id> --since <generation-returned-above> --epoch <epoch-returned-above> --until-event --json --kinds pr.checks,pr.conflicted,pr.base_changed,pr.base_deleted,pr.head,pr.review,pr.comment,pr.closed,pr.merged,pr.stopped,github.unavailable,github.recovered
runpane pr list --pane <pane-id> --json
runpane pr unwatch --pane <pane-id> --url https://github.com/owner/repo/pull/123 --json

Inside a Pane, registration defaults to its PANE_SESSION_ID. Registration returns generation and epoch; use both for the first wait, including events that arrived between registration and arming. An identical active registration retry returns its original generation, including after daemon restart, so a lost response cannot skip an unread event. A new head pin or unwatch/re-register starts a new registration. Process every returned NDJSON event, then persist its gen and epoch. Rearm with --since <gen> --epoch <epoch>; use --limit 1 for one event per invocation. Never reuse the initial registration generation after delivering an event, and never combine --as with --since or --epoch. A named cursor is a separate daemon-managed mode.

Ordinary daemon restarts preserve the epoch and unread retained events. On _reset or _dropped, resynchronize current GitHub state before accepting success, then persist the control record's generation and epoch. Ignore replay/baseline records as new events. Retention is bounded; a journal reset cannot recover lost history. A consumer crash before saving its cursor can replay an event, so actions must be idempotent. Registration uses the full host/repository/number identity. It pins success to --head, or the first observed head; a new head emits pr.head and needs a fresh registration before success can be reported. Read existing discussions before arming. A wake means inspect the change; it never authorizes merging.

The watch also reports when the ground under the PR moves. pr.base_changed (BASE CHANGED) fires when the base branch is retargeted, by a person or by GitHub after a stack parent merges and its branch is deleted; base.from and base.to name the old and new base. pr.base_deleted (BASE DELETED) fires when the base branch no longer exists; GitHub may close the PR right after. Both arrive at once under --follow. When the PR below this one in a stack merged with a merge commit and this PR now targets the branch it merged into, the retarget is done: confirm the diff shows only this PR's commits and recheck required checks (gh pr checks <number> --required); do not rebase or push. After any other base change, rebase onto the new base and recheck CI.

The daemon batches up to 25 fingerprints per host every two minutes (plus up to ten seconds of jitter), reads details on changes and at a 30-minute backstop, and keeps 10% of GitHub quota for interactive work. It uses gh auth token for cached authentication and direct GraphQL for reads. Session PR branch discovery still uses Pane's existing gh pr list lookup.

Failures emit immediately, even while other checks run. Success requires a complete, nonempty set of checks on the pinned head and all required checks passing (all checks when none are marked required). BLOCKED/UNKNOWN merge status conservatively withholds success, including when reviews are missing. Feedback from every account is included: agents and people can share a login. Checks passing is a signal to inspect the PR, not proof of complete readiness; optional failures can still produce a separate failure event. Merge/close, eight non-rate-limit failures, or ten comment-only updates stop registration; archiving/deleting the Pane removes it. Rate limits pause instead of consuming the failure budget. Outages and recovery are journal events.

Fingerprints include individual check outcomes and thread resolution state, so equal aggregate counts do not hide swaps or edits. When the fingerprint window is truncated (over 100 checks/discussion items or multiple comments in a review thread), the daemon reads details each round. Detail reads page through up to 2,000 checks and retain the latest 100 comments, reviews, threads, and comments per thread. Truncated discussions emit pr.review with an incomplete-feedback reason and withhold success; read the full discussion on GitHub.

Baselines and events are replaced atomically before readers wake. This prevents a process crash from advancing a baseline without its event. Delivery remains bounded by journal retention and cursor acknowledgments; replay after a consumer crash before acknowledgment is possible. This is not an exactly-once or power-loss durability guarantee.

The cursor defaults to session-<uuid>, where <uuid> is the UUID inside the Session ID: the Session __orchestration_session_<uuid>__ uses session-<uuid>. Passing the name instead gives session-<name>. Cursor names may be up to 128 characters (64 before this release); when runpane derives a name itself, such as this default or the PANE_PANEL_ID fallback, it shortens one longer than 64 characters (or one with other characters) to <prefix>-<first 12 hex characters of its sha256>.

A discussion-only Session has no follow watcher. On restart, retain the session-<uuid> cursor and capture a fresh output baseline before interpreting notifications. After a reset (_reset), the baseline restates current state: those JSON entries carry replay: true (and changedWhileAway: true after a daemon restart). A replayed agent.ready is never READY; re-read sessions overview instead of acting on it. Lines mode prints only CHANGED for them. Return blocked and decision findings to the Session conversation. Terminal idle or exit remains activity evidence only.

--follow has one default cadence: READY settles for 3 minutes, BLOCKED for 30 seconds, and non-urgent events batch every 10 minutes. IDLE starts at 10 minutes and backs off to 30 minutes, 1 hour, 3 hours, then daily. Heartbeats are off. WATCH OK prints once when armed; WATCH EXPIRED and exit 0 end a watch after 3 quiet hours. Meaningful events reset expiry; IDLE and replay do not.

Individual duration overrides accept 30s, 3m, 3h, or 0: --ready-settle, --blocked-settle, --min-interval, --idle-after, --expire-after, --heartbeat, and watch --timeout-ms (for example, --until-event --timeout-ms 30s). --expire-after 0 disables natural expiry. Bare values retain milliseconds, except heartbeat's legacy seconds. --json selects NDJSON; otherwise lines.

--present and --profile were removed. Use individual timing flags such as --ready-settle 1m --blocked-settle 15s --min-interval 2m to override the defaults.

runpane watch --session <session-id> --follow --json
runpane watch --session <session-id> --follow --ready-settle 1m --blocked-settle 15s --min-interval 2m --json
runpane watch --pane <pane-id> --until-event --json

Session membership changes need no re-arm. Named cursors survive daemon restarts; the journal and PR baselines are saved together. RESET/DROPPED mean refresh the overview; replayed baseline entries never mean a new READY. --until-event waits for REPORT, BLOCKED, EXIT or GONE by default and exits 0 when one arrives, immediately without follow settling or batching. A harness that consumes a named follow stream gets its cadence; a process-exit waiter keeps these immediate single-event semantics. Cadence requires a named consumer (explicit --as or the name assigned by follow). --follow --since <generation> has no consumer name and also bypasses settling and batching. Named --as cannot be combined with numeric --since; switching only the wait mode does not enable cadence for a numeric generation/epoch cursor. Override --kinds for PR events. Its --timeout-ms is a total deadline (exit 124); under follow it bounds each daemon request.

REPORT remains the completion signal: workers use runpane report --state ready|blocked|failed|done --summary-file <path>, adding a PR/head and a question when blocked. READY alone is activity evidence. Read the full report with runpane agents status --panel <id> --json. Resume stopped workers in the same panel with runpane panels resume --panel <id> --wait-ready --yes --json.

Do not pipe follow through head or grep -m1 to wait. Run --until-event as a supported background task, act on its events, then re-arm with its cursor (the orchestrator guide has the one wait command and what to do on each wake, timeout, reset and error). Never sleep-poll your own background task output. WATCH ERROR/nonzero exit means failure: re-read every worker's status, then re-arm once; a second failure goes to runpane doctor --report. A superseded cursor means keep the replacement. A normal expiry means re-arm with the next dispatch.

Worker reports

Workers hand back a structured report when they finish or get blocked. Every worker prompt ends with:

When finished or blocked, run
runpane report --state <ready|blocked|failed|done> --pr <number> --head <sha> --summary-file <path>
(add --question "<question>" when blocked).

Inside a Pane terminal runpane report finds its own panel through PANE_SESSION_ID and PANE_PANEL_ID; elsewhere pass --pane and --panel. --question is required with --state blocked, --pr is a positive integer, and --head is 7 to 40 hex characters.

The daemon then:

  • keeps the latest report in the panel's custom state, so it survives a restart: { state, pr, head, summary, summaryPath, question, reportedAt }, with up to 16,000 characters of summary (a longer one ends with a truncation marker and sets summaryTruncated);
  • journals an agent.report entry with the same fields (summary cut to 2,000 characters), printed as REPORT <pane-name> pane <pane-id> panel <panel-id> ready pr#747 fc5dce9 or ... blocked: <question>. It skips the --min-interval batch. Only watchers that list agent.report in --kinds, and Session watches, receive it, because released CLIs reject journal kinds they don't know. It passes --agents-only (which --follow and --until-event imply) whatever panel sent it, so a report from a shell tab or a wrapper launch whose agent isn't detected yet still arrives;
  • appends a report activity (with the worker's paneId and panelId) to every Session the Pane is associated with, which makes an older Session report stale;
  • shows the report in agents status, panels list, and sessions overview. There each panel carries its own latest report as panes[].panels[].report, and panes[].report is the newest report among the Pane's panels, with its panelId. When the summary is a complete JSON object (a status file sent with --summary-file, say), the panel's report.data holds it exactly as given; a plain-text, array, scalar, invalid, truncated, or more than 64 levels deep summary has no data;
  • returns liveWatchers, the number of watches that were waiting and received it. The CLI prints Delivered to 1 waiting watcher.; with no Session and nobody waiting it says the report is stored on the panel and that a named-cursor watch receives it when it next waits.

The orchestrator treats REPORT as the completion signal. A READY without a report means look, and maybe nudge: runpane panels last-message --panel <panel-id> --json returns the agent's last reply from its Claude or Codex transcript (never the screen; transcript-unavailable otherwise), and the worker can be asked to run runpane report.

An orchestrator whose harness wakes only when a process exits (Claude Code background Bash, Codex) waits with the one wait primitive from the orchestrator guide: runpane watch --session <S> --as <name> --until-event --json --kinds agent.report,agent.report.missing,agent.blocked,agent.ready,panel.exited,panel.stopped,panel.paused,pane.gone (--pane <pane-id> outside a Session), run as a background task and run again after each event. --until-event exits 0 on the first event (124 at a --timeout-ms deadline, if you give one); a RESET and the caller's own panel never end the wait. When a worker keeps richer state in a status file, it writes the file first and reports with --summary-file <status file>; the file is the truth and the report is the signal.

Dispatching with --wait

The orchestrator guide prescribes submission without --wait, followed by its named watch as the completion consumer. The CLI also offers an optional per-dispatch result for callers choosing that route instead:

runpane panels submit --panel <panel-id> --input-file <prompt-file> --as-file-pointer --wait --yes

panels create and panes create with a prompt take --wait too. --wait turns the expected report on and blocks on that panel until the first agent.report, agent.report.missing, agent.blocked, panel.exited, or pane.gone. It then prints one line of JSON (dispatchWaitResult in the contract) and exits:

outcome Exit Carries
report 0 report: state, summary, summaryPath, PR, head, question
missing 3 lastOutput and lastOutputSource
blocked 4 screenLines, the prompt the worker waits on
exited, gone 5 exitCode or reason
indeterminate 6 history was lost; inspect the panel and inbox before retrying
timeout 124 after --timeout <duration> (30m, 2h)

The result never includes the transcript. The daemon stamps the result of every create and submit with the journal generation and epoch it read before delivering the work. --wait adapts the existing watch --until-event reader, filtered to the Pane and panel. It reconnects after a daemon restart; a replaced or truncated journal returns an explicit indeterminate result (exit 6), since the task's outcome can no longer be established from that history. Like --until-event, it is a single-event wait: it delivers at once, without --follow's settling or batching, and since it exits on the event, a plain background task is enough (no line-delivering monitor). Claude Code wakes the orchestrator when the background call exits, and the line arrives as the tool result. Report-expected work is serialized per panel: a new dispatch is refused before writing while an expectation or missing-output collection is outstanding. A send with --no-expect-report (panels submit or agents send) is a reply, such as an answer to the worker's question or an addition to its current work: it is delivered while a report is outstanding, and Pane keeps waiting for the original work's report. Held starting input is reserved but does not count startup readiness as task completion; tracking activates immediately before the prompt's submit or launch.

Expected reports

Work sent to an agent through runpane expects a runpane report back: a panels submit to an agent's panel, and a panels create or panes create that carries a prompt. A request marked --source user (Pane's own UI marks its sends that way) expects none, and neither does typing into a tab, which never goes through runpane. --no-expect-report sends fire-and-forget input; --expect-report asks for a report anyway, also from a plain shell panel. shouldExpectReport() in main/src/ipc/runpane.ts holds the rule. Pane saves { since } per panel in expected-reports.json below PANE_DIR (results echo it as expectedReport); only the tracker writes that file, so panel-state writes cannot bring back a cleared expectation. When the agent then goes ready (agent.ready) or its panel exits without a report made at or after since, Pane journals one agent.report.missing entry (MISSING REPORT <pane-name> pane <pane-id> panel <panel-id> ready|exited) and clears the expectation. The entry's lastOutput is the agent's last reply from its transcript, or else the last 20 lines on its screen (lastOutputSource: transcript|screen), cut to 2,000 characters with the end kept. A report clears the expectation.

An agent can end its turn while work it started keeps running. Pane reads that from the screen: Claude Code counts running background shells in its footer (⏵⏵ bypass permissions on · 1 shell) and lists each running background subagent under it (◯ general-purpose <task> 14s); Codex prints 1 background terminal running · /ps to view above its prompt (detectAgentBackgroundWork() in agentScreenSignature.ts). While one shows, a READY does not raise the missing report. Claude takes a new turn when the work finishes, and that turn's READY decides. Codex doesn't, so Pane looks at the screen again every 10 seconds while the panel stays ready, and raises once nothing runs. An exit raises at once.

Like agent.report, the kind reaches only watchers that list it in --kinds (a Session scope alone does not deliver it), and it skips the --min-interval batch. The tracker is main/src/services/expectedReports.ts.

Autopilot's kinds

Autopilot (experimental) waits with runpane watch --as autopilot --kinds item.created,item.answered,session.created,session.archived,orchestrator.turn_ended --until-event --json. These kinds reach only watchers that list them in --kinds (a Session scope alone does not deliver them), so orchestrators' watches never see them. item.created and item.answered (ITEM / ANSWERED) mark an approval or question starting or stopping waiting on the person; the entry carries itemId and the title in reason, after why it's news: "No answer (the asker stopped waiting): " when its asker left, its receipt when it closed ("Closed by Autopilot: : ", "Closed: Session archived: "), or "Reopened by you, after …: " when the person brought it back. Its paneId is the asking Pane. session.created and session.archived (SESSION NEW / SESSION ARCHIVED) carry the Session and its own workspace Pane as paneId. orchestrator.turn_ended (TURN ENDED) marks a Session orchestrator going from working to idle, chat tabs included. They come from main/src/services/autopilot/autopilotEvents.ts.

Every Session's fixed capability text has one rule for Autopilot: a message that starts with [From the person, via Autopilot] carries the person's own question or instruction (a /wrap-up request included), and is never an answer to an approval or a worker's question. A message that starts with [From Autopilot] is Autopilot's own; the orchestrator replies to whoever asked ("To Autopilot:"), and anything the person must decide still goes to them as an approval. See AUTOPILOT.md.

Questions on screen

Pane's status detection (main/src/services/agentStatus/manifests.ts) classifies a panel as blocked when its screen shows a live prompt waiting on input: Claude's AskUserQuestion picker, permission prompts, folder trust, the "Allow external CLAUDE.md file imports?" dialog, and Codex's folder-trust, sign-in, approval and "Update available" screens. The journal records agent.blocked only once a panel has stayed blocked for 2 seconds (BLOCKED_DEBOUNCE_MS in workspaceJournal.ts), so a prompt-like line that flashes past in normal output never becomes BLOCKED. The entry carries screenLines: up to 20 non-empty lines of the screen region the prompt was matched in. The agent does not need to report anything for this.

Session inbox

Pane keeps, per Session, what its orchestrator has not acknowledged: reports (agent.report), missing reports (agent.report.missing), and questions on screen (agent.blocked, with screenLines). It is fed from the journal for every Pane associated with the Session (main/src/services/sessionInbox.ts) and saved with a journal epoch and replay watermark in the approvals table of sessions.db, one row per item; a blocked report shares its row with the question's card. A one-time import moved older session-inbox.json files there: the file is backed up first as session-inbox.json.before-import, the original is left in place, and a failed import changes nothing and retries on the next start. Restart replays committed events after the watermark, with stable item IDs, including a report whose inbox write failed. Acknowledgements and the watermark are saved together; replay does not resurrect handled items. Recovery is bounded by the journal's retention. If entries expired before projection, or the journal was replaced, Pane logs the history loss explicitly; already projected items remain available. A newer report replaces the panel's older report or missing report; a blocked item goes once its panel moves on (busy, ready, exited, or reported). Each Session keeps its newest 1000 items (retention.sessionInbox in config.json).

runpane inbox --session <id|name> [--json]       # defaults to $PANE_ORCHESTRATION_SESSION_ID
runpane inbox ack <item-id>... [--decision <D-n>] [--session <id|name>]
runpane inbox ack --all --session <id|name>

runpane inbox also lists answers: what the Session's workers were told, kept 7 days. Human output prints each one with no decision as needing a D-n, and runpane inbox ack <item> --decision <D-n> records it, even on an item already cleared.

An orchestrator runs runpane inbox when it starts or resumes, to catch what finished while it was down, its workers' unrecorded answers included. Pane never adds the inbox to the orchestrator's turns: worker output reaches it only as the result of a tool call it made.

What waits on the person: Approvals

While Approvals is on (Settings → Approvals, saved as notify.enabled, on by default), a Session has one voice to the person: its orchestrator.

  • Workers don't call notify. Approvals come from the orchestrator, not from the agents in the Session's Panes. A worker in a Session's Pane gets PANE_SESSION_DIR and no PANE_ORCHESTRATION_SESSION_ID; Pane's instructions (the user-level Notify block and the pane home skill) tell such a worker to report blocked with runpane report --state blocked --question "<question>" instead. A worker's notify call isn't shown to the person; it returns unavailable with a next that says to report blocked.
  • A worker's question is a card at once. Its blocked report shows in Approvals straight away. Its buttons are the report's own --choices or --questions (checked as runpane notify checks them) first. A question that ends with options in brackets ("(A / B)") and has no buttons from either source is refused with ERR_REPORT_PACKED_OPTIONS, showing nothing. A bracketed unit with a spaced slash ("(requests / second)") reads as options too; word a value's unit as prose ("in requests per second") or drop the spaces ("(requests/second)"). From a JSON status file or a bare needs_you block, the card takes its question and why as context, its question's options as answer buttons (a (recommended) suffix marks the recommended one; several questions get an answer box), and its files as links (past six, the card names the rest). When the journal cut the summary short, Pane reads the first 256 KB of the status file itself (a regular file holding JSON), so a long needs_you keeps its buttons and links; a needs_you past 256 KB gets none, and runpane report warns the worker. A worker on another machine keeps the 2,000 characters the journal sent, since its path names a file over there. Other JSON shows one line (summary, step or title) or none, never the raw text; the file itself opens as the worker's status link. It rings once the orchestrator relays it or after 10 minutes, so the orchestrator first settles what the plan already answers (D-79). The answer goes straight to the asking tab, whether or not the orchestrator is running: answer: Q-n → <answer> (by you), once its agent is at its prompt (docs/PANE_NOTIFY.md has the rule). An answer Pane can't type shows in runpane inbox as undelivered; the orchestrator passes it on unless its tab closed. A relayed question stays open after its worker's tab closes, since its orchestrator can still read a reply to it (the reply goes to the orchestrator). The tab can also receive closed: Q-n (by you) and correction: Q-n → <answer> (by you); workers and orchestrators treat those as the person's word.
  • Typed replies. Anything the person types on an approval arrives as reply: Q-n → "<their words>" (picked: <picks>) (by you) (or as the open call's {reply, picks?, id, replyId, next} result, whose replyId the reader passes to --took and --update). A worker's question's reply goes to the worker's tab; when the worker can't read it, to the orchestrator that relayed it; else to Autopilot. Pane records it as the answer once its reader gets it. When it asks a question instead, the reader runs runpane notify --took <id|Q-n> question, then runpane notify --update <id|Q-n> --asked "<their question>" --what-changed "<one line per change>" with any changed fields. That saves a new version of the same approval ("Updated · ready again", at most 10 kept) and waits for the answer; nobody posts a second approval for it. correction: Q-n → that was a question: "…" and correction: Q-n → that was your answer: "…" are the person's fix of how it was taken. A worker may run --took and --update: they aren't new asks. docs/PANE_NOTIFY.md has the lines, the reader order and what the approval shows.
  • Orchestrator mode. The generated orchestrator skill, the Session's AGENTS.md and the orchestrator guide (paneChatBundle/skills/pane-orchestration/SKILL.md, "What waits on the person") tell the orchestrator that only it asks the person; to keep a running list and keep the work moving; when the person asks about one thing while other work is open, to remind them and offer the next step; at the end of a turn, to have an approval waiting or be done. All three carry Pane's approvals text, "Asking the person in Pane" (main/src/services/approvalsRules.ts, also in the pane home skill): which card to use, what a card holds and how to read a reply (PANE_NOTIFY.md). These are instructions; Pane doesn't check turns, only cards.
  • The orchestrator relays and posts. The same three carry the posting rule: keep every item that waits on the person (a worker's needs_you or blocked question, a plan or design approval, a PR ready to merge, a next step only they can take) posted to Approvals exactly once, titled with its Q-n and with the worker's files and PR as --links. Post each one with runpane notify ... --json as a background command (in Claude Code, Bash with run_in_background), not the MCP notify tool, which returns waiting after a while, and never AskUserQuestion. A worker's question already has a card, so the orchestrator relays into it: runpane notify --relays <item> ..., with the id from runpane inbox, gives that card its choices, context and links and rings it, and the call waits on it as on any notify. The answer goes straight to the worker's tab, so the orchestrator doesn't forward it, except an answer runpane inbox lists as undelivered because Pane can't see what runs in the tab, which it passes on with runpane panels submit (one whose tab closed has no one left to tell). It records the decision with runpane inbox ack <item> --decision <D-n>, and the card reads "Recorded as D-n". When the worker takes a typed reply as a question, the orchestrator gets reopened: Q-n → … (by <worker>), an ack leaves that card open, and the answer to its new version comes as correction: Q-n → <answer> (by you). The older way (post a second card, ack, forward the answer) keeps working for one release. The orchestrator stays free to talk about the item in its tab while the card waits. Stopping an item's background call drops its own stale item. On start, resume or wake it reconciles against the status files, its ledger and runpane inbox, and records any answer with no decision. Approvals survive a restart, and an asker that posts the same question again joins the waiting card. When notify returns unavailable because Approvals is off, it asks in its own tab as before.
  • Filing. Pane files each item under the Session its Pane belongs to, and marks items from the orchestrator's own tabs. Claude permission prompts and chat tab prompts still come straight from the asking tab and are filed under its Session.
  • Closing with the Session. Closing or archiving a Session closes the waiting items connected to it, workers' and orchestrators' alike, within 5 s ("closed: Session closed", "closed: Session archived"). A worker's newer report closes its older question ("closed: the worker moved on").

See PANE_NOTIFY.md for the Approvals screen itself.

Skill contract

main/src/services/skillCacheManager.ts installs the skills that ship in main/src/services/paneChatBundle/ into <PANE_DIR>/skills/pane-chat/skills/ and into the .claude/skills/ and .codex/skills/ folders of the data directory. It also generates the pane-orchestrator entry skill (plus a Cursor rule at .cursor/rules/pane-orchestrator.mdc), the runtime context, and the helper subagents in .claude/agents/ and .codex/agents/. A manifest (skills/pane-chat/installed.json) records what it installed and a hash of the bundle: startup skips the install when the hash is unchanged, and later installs replace only the recorded entries. The bundled wrap-up skill is also copied into each Session folder when it is prepared (see Keeping a Session tidy).

To change Pane Chat behavior, edit the bundle or buildPaneOrchestratorSkill() in skillCacheManager.ts, then run paneChatBundle.test.ts.

Bundled workflow skills are available to Sessions and can be selected according to the user's task. The installed manifest lets Pane refresh its own skill files without replacing unrelated user skills.

shared/types/sessionProfile.ts defines the generic default profile and shared capability context. Generated guides and agent instruction files use this contract. The legacy shared Cursor rule is not always applied; Session-specific instructions belong to the Session's working directory. User-selected profiles and workflows determine behavior after the user supplies a task.

Terminal and Files

Each Session has a collapsible Terminal dock and a Files button beside its agent tabs. The shell and file browser use the Session's workspace folder. Selecting a file opens an editor tab alongside the agent conversation. Panels are saved with the Session and reused when you reopen the tools; switching Sessions keeps their shells and files separate.

Every Pane has the same dock: its first plain shell, titled Terminal, where the setup progress notices appear. It is not a tool or agent tab. runpane panels list marks it dock: true, and runpane panes list reports a Pane running only while one of its tool or agent terminals is live, not for the dock alone.

Plans, pages, and split view

Agents show pages and files with runpane panels open --file <path> or --url <url>. Files open in an editor tab with read-only previews for supported formats; HTML opens as editable source. Use --url with an HTTP, HTTPS or file URL for a live browser tab. By default the tab opens in split view: the first one splits the stage to the right of the conversation, and later ones join that side group as tabs. A page opened while you are looking at another Session or Pane is in that side group when you come back, without taking focus from the tab you left showing; tabs you have already arranged stay where you put them. --tab opens it as a plain tab instead. Reopening the same file or URL reuses and reloads its tab; without --tab, a reopened tab that sits in the conversation's group moves to the side group. This works the same in Sessions and in worktree Panes.

Generated Session instructions ask the orchestrator to write plans, reports, and other documents as self-contained HTML files in its Session folder and link them from one status document. It opens one with --url (rendered) or --file (source) only when the person needs to look at it now; see Keeping a Session tidy. Opening a Session never submits a prompt or starts work just to write a document.

While the stage is split, each group has its own tab strip, including the agent tab in its group. For a single Session, the strips align directly below the window title bar. Closing the last tab in the side group returns to a single group. Layouts are saved with the Session.

Drag any tab to rearrange the stage, as in a project Pane: drop it in the middle of a group to join that group, against an edge (the outer quarter) to split beside it, or between tabs on a strip to place it there. Dragging the last tab out of a group closes that group. In tiled Sessions a tab moves only within its own Session.

Tiling Sessions side by side

Two Sessions tiled side by side, both streaming

Sessions tile with the same gesture as tabs, one level up. Drag a Session from its sidebar row — or by its title row once tiled — onto another Session and drop it against an edge to put the two beside each other; drop it in the middle to show it in that slot instead. Edge bands are the outer quarter of the target, as they are for tabs, and the layout nests as deeply as you take it: a row of Sessions with one of them split into a column is an ordinary shape, not a special case.

Both halves stay fully live. A tile that is not focused keeps its agent running and its output streaming; nothing is throttled or suspended, so a Session you are watching out of the corner of your eye is the same Session you were just typing in. Each tile keeps its own tab splits, its own Terminal dock, its own Files, Changes and To-dos sidebar, and its own navigation.

The focused tile's Session is the selected one: its title row carries the focus ring, and clicking a Session in the sidebar focuses its tile when it already has one, or shows it in the focused tile when it does not. With one tile that is exactly the old behaviour — switching Sessions replaces the view.

The X on a tile's title row stops tiling that Session; the Session itself, its conversation and its panels are untouched, and the layout collapses back around the space. The last tile has no close button, since a window with no Session in it has nothing to show. Search carries the same commands for the keyboard: focus the Session left, right, above or below, and stop tiling the focused one.

A layout belongs to the host it was built on, like the remembered location it sits beside: Session ids only mean anything on their own host, so switching hosts loads that host's layout and every tile is revalidated against the Sessions that still exist there. Archiving or deleting a tiled Session retires its tile and collapses the split.

Reaching Pane and delegating work

The generated Session instructions tell the orchestrator how to reach runpane (PATH, then $PANE_RUNPANE_BIN, then the runtime context) and forbid substituting plain git worktrees or built-in subagents for delegated work; if runpane is unreachable the agent stops and reports it. Worktrees the orchestrator creates or adopts with runpane panes create or panes adopt become the Session's children in the same call.

Earlier development builds had an experimental progress view that rendered progress.html in a fixed side panel. It never shipped; Pane deletes its old .pane-progress.json switch and leaves any HTML files in place.

New worktrees launched from a Session default to unpinned. First association also clears a worktree's previous pin, including an explicit --pinned creation pin, so it appears as a Session child. Use panes pin manually afterward; repeated association does not undo that choice. Independent worktree defaults and existing historical pins are unchanged.

Generated instructions and Git

Session instructions and documents live under <PANE_DIR>/sessions/<id>/, outside the project. While the Session agent shows its folder-trust prompt, a banner across the top of the chat says the folder is Pane's own, holding the Session's notes and no project code. Session terminals and chats set GIT_CEILING_DIRECTORIES to <PANE_DIR>/sessions, so git run in a Session folder never picks up a repository above it, such as a home directory tracked as a dotfiles repo. Do not configure PANE_DIR inside a project repository.

Move an existing chat to a Session

Right-click a worktree and choose Move chat to Session…, then choose the chat if it has multiple agent tabs. You can also use Move chat to Session in the top bar of a selected Claude or Codex chat. Then enter a unique Session name, and choose Move chat. The agent must be idle and have a saved conversation ID. Pane stops the old terminal before transferring the existing panel and resumes the same conversation from a private Session folder. No initial prompt is submitted. The original worktree becomes a child; its branch, files, and uncommitted changes remain in place. Other tabs stay there.

Cursor and custom launch wrappers are not yet supported for promotion. Missing history, conflicting ownership, and active work are rejected before transfer. A durable Session record allows reopening to complete an interrupted transfer without copying the conversation. Terminal, Files, and split view capabilities are the same as for a newly created Session.

Promotion defaults to the worktree's current name.