Lanes & worktrees

How PaneScale isolates parallel agents with Git worktrees, how branches are named, and what Keep, Merge and Discard do when a lane is finished.

Two agents editing the same files at the same time is a recipe for confusion. A lane solves that: it is a Git worktree with its own branch, created from your current commit, where one agent can work without seeing — or breaking — anyone else’s changes. Your own working copy stays exactly as it is.

Where lanes come from

Created byWhen
A paneYou turn on Isolated worktree in the pane picker, or a launch set asks for it
A chat threadYou start a Thread with its own worktree in Chat
The Overnight AutopilotEvery task gets its own lane, plus one for the baseline measurement
Point & FixEvery change runs in a lane that includes your uncommitted work

Worktrees need a Git repository. In a folder without Git, the Isolated worktree switch is disabled.

How a lane is created

PaneScale:

  1. reads your current commit (HEAD),
  2. creates a new branch from it,
  3. adds a worktree for that branch in PaneScale’s data folder.
Created byBranch name
Panes and chat threadspanescale/grid/<run>/<label>
Overnight Autopilotpanescale/autopilot/<label>-<run>

Worktrees live in short paths under %APPDATA%\com.sherobi.panescale\w\ to stay clear of Windows path-length limits. Your repository only gains the branch and the worktree registration — your working copy is not touched.

Working in a lane

A pane in a lane shows Worktree in its header and a branch icon in the sidebar. The agent’s working directory is the worktree, so everything it does — edits, commands, commits — happens on the lane’s branch. You can open the worktree folder in Explorer, run its dev server in a terminal pane, or open it as a project of its own to browse it in the files panel.

Closing a lane

When you close a pane that has an open lane — or choose Finish worktree… in its menu — PaneScale shows the lane plan with the number of changed files, lines added and removed, and the full diff:

ChoiceWhat happens
KeepThe changes are committed on the lane’s branch as panescale: <label>. Nothing is merged or pushed; the branch stays for later.
MergeThe changes come into your current branch — by cherry-pick (default), fast-forward or apply only (as uncommitted changes). You confirm the exact method in a signed one-time approval.
DiscardThe worktree and the branch are removed, after one more confirmation. This can’t be undone.
LaterNothing happens. The pane closes and the lane stays open.

Nothing is merged, pushed or deleted without your choice. If a merge conflicts with changes you made in the meantime, PaneScale stops and tells you instead of guessing.

Dependencies in lanes

A fresh worktree has no node_modules or other build output. For the autopilot and Point & Fix, PaneScale links the node_modules folders of your main working copy — at the root and one level deeper — into the lane, so checks can run immediately without a fresh install. The links are directory junctions; nothing is copied.

Cleaning up

Lanes you kept accumulate over time. Settings → Storage lists leftover worktrees with their size and whether they still belong to a run. Open lanes are never offered for deletion. Select the ones you no longer need and click Remove selected, or Rescan. The autopilot report has its own button to remove all worktrees of a night.

Something unclear or missing? Tell us — we improve these pages every week.