Files
paseo/public-docs/workspaces.md
T
Mohamed Boudra 120df507a9 Start a workspace in an existing worktree, and branch off or check out any branch or pull request (#10190)
* feat(server): branch off a pull request and list every git worktree

A workspace.create worktree source with action "branch-off" and a
checkoutSource used to check the pull request out, because core took
any change request as a checkout. Branch-off now fetches the pull
request's head into a remote-tracking ref (origin/<head> for a
same-repo head, paseo-pr-<N>/<head> otherwise) and starts the new
branch there, with no upstream and no remote added. A request with no
action still checks the pull request out, as older clients expect.

checkout.worktrees.list returns all git worktrees of the repository,
not only the ones Paseo created, so the New workspace screen can offer
any of them. Bare and prunable entries are left out.

Hosts advertise both through server_info.features: worktreeRefActions
and checkoutWorktreeList. Older hosts ignore the branch-off action on a
pull request, so the app must gate on the flag.

* feat(app): pick an existing worktree, and branch off or check out a ref

Isolation now offers Project directory (was "Local"), New worktree, and
Existing worktree. Existing worktree is a local workspace at the chosen
worktree's path, not a third isolation value, so plugins, preferences, and
the create request still see "local". The list comes from
checkout.worktrees.list, so it includes worktrees Paseo did not create.

The ref picker gains Branches / Pull requests pills and a Branch off /
Check out toggle with a tooltip per action. Branches default to Branch off
and pull requests to Check out. On a host without worktreeRefActions the
toggle is hidden and the defaults apply.

Git keeps a branch in one worktree at a time. Picking a held branch in
Check out mode moves to the worktree that holds it, and creating from a
held branch that was never picked fails with an explanation. Without
this the server would silently check out a "<branch>-1" copy.

* docs: describe Existing worktree and Branch off / Check out

* fix(server): give a fork pull request branch-off a base the repository has

A branch off a fork's pull request stored the fork's head as its base, under
refs/remotes/paseo-pr-<N>. Create PR then asked for a pull request into a
branch the base repository does not have, and the ref piled up in base branch
pickers because no remote owns it. The new branch now starts at the fetched
head, kept under refs/paseo/change-requests/<N>, and its base is the pull
request's base branch. A same-repository branch-off still stacks on the pull
request's branch.

A routed create_workspace with a prNumber and no mode checks the pull request
out again, as before branch-off could start from a pull request.

The worktree list skips a locked worktree whose directory is gone, since it
cannot be opened.

* fix(app): start an existing worktree's agent in that worktree

Existing worktree created the workspace at the worktree, but the composer and
terminal still used the project directory, so the daemon rejected the first
agent as outside the workspace. The screen now derives one working directory
from the isolation and uses it for the workspace, the composer, and the
terminal. A worktree that left the list is no longer a choice.

The ref picker names change requests the way the project's forge does, so a
GitLab project shows Merge requests. The schedule form uses the isolation
labels Project directory and New worktree.

* fix(server): compare a fork pull request branch-off against the remote base

The base was stored as the bare branch name, which resolves to the local branch
first. A local main behind origin/main put upstream commits in the workspace's
changes for its whole life, and a base branch the clone never fetched failed
creation. The base branch is now fetched from origin and stored as its
remote-tracking ref.

* fix(server): take a pull request's base and a checked-out branch from the remote that has them

A fork branch-off fetched its base from origin. In a clone whose base
repository is upstream, origin is the user's fork or missing, so the base was
stale or the create failed. The base now comes from the remote that served the
pull request, and a failed base fetch falls back to the bare branch name.

Check out of a branch that only a remote other than origin has failed with an
unknown branch. The local branch is now created from the one remote-tracking
ref with that name, tracking it, as git does.

The fork branch-off test passes a git identity to commit-tree, which CI
runners do not have.

* fix(server): branch off a pull request from the remote that serves it

A same-repository pull request's head was fetched into refs/remotes/origin.
In a fork clone, upstream serves the pull request and origin is the fork, so
the base refresh replaced the head with the fork's branch of the same name and
the new branch started from code that is not the pull request. The head now
lands under refs/paseo/change-requests/<N>, the branch starts there, and the
base is fetched from the remote that served the head.

A routed create_workspace that branches off a pull request is refused, as it
is on the local host.

* fix(app): branch off a plugin's base ref whatever the branch action

setBaseRef chose the base but kept the user's Check out switch, so a plugin's base became a checkout or a held-branch error. A base is what a new worktree starts from, so setBaseRef switches branches back to Branch off.
2026-11-19 16:31:38 +07:00

3.9 KiB

title, description, nav, order, category
title description nav order category
Workspaces Understand how Paseo groups working directories, agents, terminals, and browsers into workspaces. Workspaces 10 Workspaces

Workspaces

Paseo is organized around workspaces, not chats.

A workspace is the place where a task happens. It has a working directory and can contain multiple sessions running at the same time. In the app, each session opens as a tab.

Projects contain workspaces

The sidebar starts with projects. A project can be a git repository, a GitHub project, or any directory on a machine running the Paseo daemon.

Inside each project are workspaces. For example:

my-app
├── main
├── fix-login-flow
└── redesign-settings

Each workspace is a separate place to work. You can keep one for your main checkout, create another for a feature, or open a GitHub PR as another workspace.

Use the CLI project commands to register, list, rename, or delete projects.

Workspaces contain sessions

Agents run inside a workspace as sessions. A workspace can have one agent session, several agent sessions, terminals, browsers, and diffs open at the same time.

That matters because real development rarely fits into one long chat. You might ask one agent to implement a feature, open a terminal to run a service, start another agent to review the diff, and keep the browser open next to both. Those belong together because they are all part of the same task.

In Paseo, the workspace is the stable container. The sessions are what you run inside it.

Choose the isolation

When you create a workspace, Isolation sets the directory it works in:

  • Project directory uses the project's own directory, such as your main checkout. Use it when sessions should share the files already on disk.
  • New worktree creates a git worktree with its own directory and branch. Use it when a task needs its own copy of the files.
  • Existing worktree uses a git worktree that is already on disk, on the branch it has checked out. Use it to continue work on a branch without a second copy. The list shows every git worktree of the repository, including the ones that Paseo did not create.

The workspace is the product concept; a git worktree is one way to isolate its files. More than one workspace can use the same worktree. Paseo removes a worktree that it created after the last workspace that uses it is archived. Paseo does not remove a worktree that it did not create.

Creating a workspace

For a desktop walkthrough from starting parallel agents to reviewing and testing their changes, see Run parallel tasks.

You can create a workspace in the app or from the CLI:

paseo workspace create --isolation local --path ~/dev/my-app --title main
paseo workspace create --isolation worktree --path ~/dev/my-app --base origin/main

You can also create a workspace without starting an agent right away. The workspace is still there with its working directory ready; you can open terminals, run services, or browse files, then start an agent later.

Either way, once the workspace exists you can add more sessions to it. Open a terminal alongside an agent, start a second agent to review changes, or open a browser tab to check a local service. Every session lives as a tab inside the same workspace.

Creating an agent and creating a workspace are separate actions. Pass a workspace ID when you want an agent in a specific existing workspace. A bare paseo run from a human shell creates a new local workspace; when one agent runs it, Paseo recognizes the caller and creates a subagent in the caller's workspace.

Worktrees

Every workspace in Paseo is backed by a working directory. When that directory is a git worktree, you get a separate branch and isolated environment for each task.

If you want the details on configuring setup hooks, scripts, and services, continue to Git worktrees.