Skip to main content
Create and manage isolated workspaces for agent work.

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)
This allows multiple agents to work on different features simultaneously without conflicts. Because each running workspace carries its own agent process, builds, and (when Dockerized) containers, several active at once add up. The dashboard’s Resources page (Settings → Experimental) shows host CPU, memory and disk, the running agents, each workspace’s Docker stack, a reclaim advisor, core services and host processes, so you can see what each workspace is costing before spinning up another.
Pair the Resources view with pan resources on the CLI, which lists RAM per workspace agent and conversation and flags orphaned claude processes (ones that belong to no workspace or conversation), so you can reclaim that memory before launching new workspaces.

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:
What it does:
  1. Creates the workspace (git worktree or custom command)
  2. Looks for a docker-compose file at the workspace root or under .devcontainer/
  3. Runs docker compose -f {file} up -d --build from the compose file’s directory (no -p: the compose file’s own name: sets the project name)
Docker Project Naming: Each workspace gets a unique Docker Compose project name to avoid container conflicts:
  • 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, or COMPOSE_PROJECT_NAME in the workspace’s dev script
  • Container names follow: {project}-{service}-1 (e.g., mind-your-now-feature-min-123-api-1)
This allows multiple workspaces to run simultaneously without port or name conflicts. Why this matters:
  • 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
Dashboard integration: the Plan dialog has a Start Docker containers checkbox. It is off by default and remembers your last choice in the browser (localStorage key 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 under workspaces/ in the current repository (run it from the project root), with each one’s branch and path. --all lists them for every registered project:
Options: --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:
Destroy removes every shape of the issue’s workspace (base, strike and slot worktrees), stops its Docker stack, and deletes the local feature branch with 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 CLI
  • pan workspace add-repo - add a repository to a progressive polyrepo workspace, see Progressive polyrepo
  • pan workspace update - refresh skills, agents and rules in a workspace, see Skills
  • pan workspace reap - clean up orphaned Docker stacks, see Troubleshooting
  • pan workspace rebuild, render-devcontainer - rebuild a workspace’s Docker stack
  • pan workspace deep-clean - interactive git clean -fd for a workspace
  • pan workspace use-config - apply a workspace config template
  • pan workspace migrate, ssh, sync-auth, start, stop - manage a remote Fly.io workspace
  • pan 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’s frontend, 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).
The stopped containers start again when:
  • 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.
Opening a stopped workspace’s app URL shows a short “Starting it…” page, starts the containers and loads the app once it answers. Scripts and agents get 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.
Change the timeout or the services per project in ~/.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 the main branch. All feature work happens in workspaces (git worktrees), never in the main project.
  • 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
This convention ensures:
  1. Specialists (review-agent, test-agent) always find the correct code
  2. Merge operations have a clean target
  3. Multiple agents don’t interfere with each other
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 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
The hooks are polyrepo-aware and will install in all git repositories within your project. Auto-revert behavior:
  • Agents & planning sessions: Automatically revert to main if they accidentally checkout a feature branch
  • Human users: Display a prominent warning (no auto-revert by default)
To enable auto-revert for humans:
Manual hook installation (for projects not in registry):

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:
  1. Run in workspaces only - Never in the main project directory
  2. Never checkout branches - They work with the branch already in the workspace
These safeguards are enforced through:
  • Launch-context rules - The bundled worktree-discipline rule, rendered into every managed session, forbids git checkout inside 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_PLANNING in the environment, or a tmux session named agent-*, planning-* or specialist-*)