# Panes & Worktrees

import { Callout } from "nextra/components"

Every pane is an isolated workspace.

## Creating a pane

<PaneCreator />

Creating a pane runs `git worktree add` in the background. Name the pane, choose a base branch, and Pane handles the rest. Deleting a pane runs `git worktree remove`. You never type either command.

## What isolation means

- **No shared files.** Each pane writes to its own directory on disk. Agents can't see or conflict with each other's changes.
- **Separate `.env`.** Each worktree reads its own environment file, so panes can have different credentials or feature flags.
- **Independent branches.** Merging one pane to main doesn't affect any other pane.
- **Parallel safe.** Run five agents at once. They operate in completely separate trees.

## Sidebar status cues

Pane's sidebar is built for a lot of parallel work without turning into visual noise.

- **Pinned panes stay newest-first.** Pin a pane and it rises to the top of the Pinned section; older pins drift downward.
- **Pinned navigation stays scoped.** If you open a pane from Pinned, <KeyCombo keys={["⌘", "↑/↓"]} /> on macOS or <KeyCombo keys={["Ctrl", "↑/↓"]} /> on Windows/Linux cycles through the pinned list. Open from Repositories and the same shortcut follows repository order.
- **Active work breathes.** Pane names subtly breathe while a terminal is producing output.
- **Finished-elsewhere panes are marked.** If a pane finishes while you're looking elsewhere, its name gets a dashed blue underline until you click into it.
- **Sections collapse.** Click Pinned or Repositories to hide that section when the sidebar gets too busy; open it again when you need the list back.

<Toggle title="Archive vs Delete">
**Archive** (<KeyCombo keys={["⌘", "⇧", "W"]} />) hides the pane and removes its worktree folder. Your branch stays. Pane checks first: uncommitted, untracked or unpushed work stops the archive unless you force it. Restore an archived pane any time and Pane recreates the worktree from the branch. Its terminal history is kept for 21 days.

**Delete** is only for panes you've already archived. It removes the pane from Pane for good. Your branch still stays.

So archiving is safe: your branch is never deleted.
</Toggle>

<Toggle title="How worktree paths work">
By default, Pane creates each worktree in a `worktrees` folder inside your project. For a project at `~/code/myapp`, a pane named `add-login` lives at `~/code/myapp/worktrees/add-login`.

Want them somewhere else? Set the project's **Worktree Folder**. It can be a folder name inside the repo or a full path anywhere on disk. Each worktree is a fully independent checkout of the repository.
</Toggle>

<Toggle title="After a restart">
When Pane starts again, it brings back your panes, tabs, layout and terminal output. If agents were running when Pane quit, a **Resume Previous Panes** dialog offers to resume them, one at a time or all at once. Claude Code, Codex and Cursor pick up their own conversations. Custom commands can too, if you gave them a resume template.

The agent processes themselves don't survive Pane quitting. Need agents to keep running while your laptop is closed? Run them on a [Remote Pane](/docs/remote-daemon) host.
</Toggle>

<Toggle title="Adopted worktrees">
If you already have worktrees created outside of Pane (via `git worktree add` or another tool), Pane can adopt them. An adopted worktree appears in Pane's sidebar like any other pane, but Pane won't delete it when you archive. Since Pane didn't create it, Pane won't remove it.

This is useful when migrating from a manual worktree workflow or when other tools manage worktrees alongside Pane.
</Toggle>
