Overview
Workspaces are git worktrees - isolated working directories for each issue/feature. Each workspace:- Has its own feature branch,
feature/<issue-id>in lowercase (e.g.,feature/min-123) - Shares git history with the main repo (no separate clone)
- Can run independently (separate node_modules, builds, etc.)
- Is located at
{project}/workspaces/feature-{issue-id}/(issue ID in lowercase)
pan workspace create
Create a new workspace (git worktree) without starting an agent:--dry-run shows what would be created; --no-skills skips installing skills and
agents; --project <path> overrides the registry; --labels <labels> routes by
label; --remote / --local create the workspace on a Fly.io VM or locally (see
Workspaces).
Docker Integration
The--docker flag automatically starts containers after workspace creation:
- Creates the workspace (git worktree or custom command)
- Looks for a docker-compose file at the workspace root or under
.devcontainer/ - Runs
docker compose -f {file} up -d --buildfrom the compose file’s directory (no-p: the compose file’s ownname:sets the project name)
- Format:
{project-name}-feature-{issue-id}(e.g.,mind-your-now-feature-min-123) - The project name is whatever the workspace declares: the compose file’s top-level
name:field, orCOMPOSE_PROJECT_NAMEin the workspace’sdevscript - Container names follow:
{project}-{service}-1(e.g.,mind-your-now-feature-min-123-api-1)
- Containers start warming up while you review the issue
- Environment is ready when the planning agent starts asking questions
- You can test assumptions during planning without waiting for builds
overdeck.planning.startDocker). It applies only when planning creates the workspace; then the workspace is created as if you ran pan workspace create <issue> --docker.
Example workflow:
pan workspace list
List the issue worktrees underworkspaces/ in the current repository (run it
from the project root), with each one’s branch and path. --all lists them
for every registered project:
--all (every registered project), --json, --stale (merged
branches still on disk, with sizes: reclaim candidates), --kind main|issue|scratch with --archived.
Each workspace owns a feature branch, and when that branch is verified and ready
the dashboard’s Awaiting Merge page lists it for a human to merge: one
row per issue whose PR is approved, has green checks and is mergeable, with
links to UAT the workspace and a merge button. The CLI list
gives you the local view; the dashboard gives you the cross-workspace view of
which branches are queued for the final merge step.
pan workspace destroy
Clean up and remove a workspace:git branch -D. --shape base|strike|slot|all limits it to one shape;
--project <path> overrides the registry; --purge-memory also deletes the
workspace’s memory home (irreversible). Reclaim candidates: pan workspace list --stale.
Other workspace subcommands
pan workspace new,main,get,activate,archive,relocate- scratch and main workspaces, see Scratch and main workspaces from the CLIpan workspace add-repo- add a repository to a progressive polyrepo workspace, see Progressive polyrepopan workspace update- refresh skills, agents and rules in a workspace, see Skillspan workspace reap- clean up orphaned Docker stacks, see Troubleshootingpan workspace rebuild,render-devcontainer- rebuild a workspace’s Docker stackpan workspace deep-clean- interactivegit clean -fdfor a workspacepan workspace use-config- apply a workspace config templatepan workspace migrate,ssh,sync-auth,start,stop- manage a remote Fly.io workspacepan workspace up- start a workspace’s stopped Docker containers (idle-stopped or memory-reclaimed)pan workspace pin,unpin- keep a workspace’s containers running, or allow idle stops again
Idle workspace containers
A workspace’sfrontend, fe and dev containers stop on their own after
20 minutes unused, even while the issue’s work agent is running. A working
agent alone does not keep them running: a Vite frontend holds about 1.3 GB
whether or not anyone has the app open.
A workspace counts as in use, and its containers keep running, while any of
these holds:
- A browser has the app open (an inbound connection to the container).
- A session is attached to a container (
docker exec, VS Code, a container quality gate). - A test or UAT agent runs for the issue.
- The issue’s verification runs, or one of its quality gates is queued or running.
- The workspace is pinned with
pan workspace pin. - Overdeck cannot read a container’s state (it never stops what it cannot see).
- a test or UAT agent is spawned for the issue (any agent spawn except review starts them),
- the issue’s verification starts, including the polyrepo verification before a merge,
- you run
pan workspace up <issue>, - you open the app’s URL.
503
with Retry-After: 5 until then, so
curl --location --retry 12 --retry-delay 5 -f <url> waits for it (--location
follows the redirect to the host the app answers on). While the app is stopped, the Command Deck issue row shows a
start app button in place of the app ↗ link.
~/.overdeck/projects.yaml:
OVERDECK_DISABLE_STACK_IDLE_STOP=1 in the dashboard’s environment turns the
idle stop off for every project.
Main Project Branch Convention
IMPORTANT: The main project directory should ALWAYS stay on themainbranch. All feature work happens in workspaces (git worktrees), never in the main project.This convention ensures:
- Main project: Always on
main- serves as the stable reference point- Workspaces: Each has its own feature branch checked out
- Want to check something? Create a worktree, don’t checkout in main
- Quick test? Create a worktree
- Emergency hotfix? Create a worktree
If you see the warning “Main project directory is not on ‘main’ branch!”, something has incorrectly checked out a feature branch in the main project. Fix it with
- Specialists (review-agent, test-agent) always find the correct code
- Merge operations have a clean target
- Multiple agents don’t interfere with each other
git checkout main.
Git Hooks for Branch Protection
Overdeck provides git hooks to enforce the main branch convention. These hooks are automatically installed:- On
pan project add- Hooks are installed when registering a new project - On
pan sync- Hooks are updated in all registered projects
- Agents & planning sessions: Automatically revert to
mainif they accidentally checkout a feature branch - Human users: Display a prominent warning (no auto-revert by default)
Workspace Structure
Planning artifacts live under.pan/ in the project repo, committed on the feature branch (.pan/drafts/<issue>.md, .pan/specs/…xbrief.json, .pan/continues/<issue>.xbrief.json). The workspace keeps local, gitignored runtime state under .overdeck/ (for example continue.json).
See Planning for how these files are made and used.
Safeguards
Planning vs Work Agent Safeguard
The dashboard offers Start agent for an issue only after planning, and only when no agent is running for it. To stop a planning session without accepting a plan, open the Plan dialog and click the amber Stop button in its footer, or Abort Planning when you resume a session. Either one stops the planning agent and returns the issue to Todo, and keeps the workspace. See Planning.Specialist Agent Safeguards
Review and test agents are configured to:- Run in workspaces only - Never in the main project directory
- Never checkout branches - They work with the branch already in the workspace
- Launch-context rules - The bundled
worktree-disciplinerule, rendered into every managed session, forbidsgit checkoutinside a workspace - Code enforcement - Specialists spawn with workspace as cwd
- Git hooks - Auto-revert a checkout in the main project when it comes from an agent or planning session (detected by
OVERDECK_AGENT_ID/OVERDECK_PLANNINGin the environment, or a tmux session namedagent-*,planning-*orspecialist-*)