Skip to main content
Deep dive into Overdeck’s technical architecture and design decisions.

System Overview

Overdeck consists of three main components:
  • Dashboard: a React + Vite single-page app, served with the /api/* routes by an Effect HTTP server that runs on Node 22 (port 3011). The frontend gets live state over the /ws/rpc WebSocket and agent terminals over /ws/terminal.
  • CLI: the pan commands, plus the skills and hooks that pan sync installs for each harness.
  • Cloister: the agent lifecycle manager. It dispatches review, test and merge work, and its Deacon patrol watches running agents (see Health Monitoring).
Agents run in panes of the terminal backend: Herdr by default, or tmux when terminal.backend: tmux is set. Each issue gets its own workspace, a git worktree under workspaces/feature-<issue>/. Because the projects.yaml registry (see Directory Structure) lets one Overdeck instance manage many repositories at once, the dashboard’s God View (experimental: turn on Settings → Experimental → Experimental features to show it) gathers every project’s issues, agents and conversations on one cross-project canvas, so you can see what every agent is doing whichever repo it belongs to. See God View.

Conversation subagents

When a Claude Code or Codex conversation starts subagents, the conversation panel shows an Agents rail on the right. Each row shows the subagent type, description, live status, and nesting depth. Select a row, or choose Open subagent transcript from its expanded tool row, to read the subagent’s full transcript without leaving the parent conversation. The selected subagent is stored in the ?subagent=<id> URL parameter, so a direct link reopens the same transcript. The rail stays hidden when a conversation has no subagents. Codex children use the same interaction, including live updates and reopening completed transcripts. The rail includes nested children. Pi conversations do not currently expose subagents in this view.

Directory Structure

Overdeck keeps its machine-wide runtime state in ~/.overdeck/:

Agent State Management

Each agent’s state is tracked in ~/.overdeck/agents/{agent-id}/state.json:
State cleanup: pan kill closes the agent’s pane and marks its state stopped. Neither pan kill nor pan wipe deletes state.json or transcripts; pan wipe prunes only lock files, sockets and cached Codex files from the agent’s directory.

Remote Workspaces

Overdeck supports remote workspace execution via Fly.io Machines. Remote workspaces provide:
  • Cloud-hosted agent environments: run agents on remote machines without local resource constraints
  • Started like a local workspace: pan start <id> --remote creates the workspace on a Fly machine
  • Automatic hand-off: when a remote agent finishes, the Deacon patrol hands it to the review pipeline and stops its machine
See Remote workspaces on Fly for setup. Remote workspace management:

Deep Wipe

For issues that get into a stuck or inconsistent state, use pan wipe to completely reset:
Deep wipe cleans up:
  • Agent panes in the terminal backend (Herdr panes, or tmux sessions such as planning-min-123 and agent-min-123)
  • Lock files, sockets and cached Codex files in the issue’s agent directories under ~/.overdeck/agents/ (state.json and transcripts are kept)
  • Legacy planning directories (project/.planning/min-123/)
  • Workspace files, the workspace’s Docker stack, and the issue’s branches
  • Issue tracker status (reset to Todo; a GitHub issue is reopened and loses its pipeline labels)
Dashboard UI: When aborting planning, choose Reset to Todo from the issue’s right-click menu for a complete reset. (pan wipe remains available from the CLI.)

Health Monitoring (Deacon Pattern)

Cloister checks running agents every 60 seconds. An agent with no activity for 15 minutes is in warning, and one idle for 30 minutes is stuck. Cloister nudges both, at most once every 30 minutes per agent. It force-kills a stuck agent only when you set kill_on_stuck = true under [auto_actions] in ~/.overdeck/cloister.toml; that is off by default. The Deacon is Cloister’s background patrol. It also runs every 60 seconds, and each pass:
  • Nudges a work agent that has been idle for 20 minutes with commits not pushed to its upstream branch, at most once an hour per agent.
  • Nudges an agent that stopped on a transient API error to retry, at most once every 5 minutes per agent.
  • Compares the terminal backend’s live panes with the dashboard, and resumes a work agent whose harness died without a recorded stop.
  • Stops agents whose issue has closed, re-dispatches stalled or silent reviews, and hands finished remote agents to review.
Each Deacon action is logged to ~/.overdeck/logs/deacon.log. The dashboard’s Metrics page (experimental: turn on Settings → Experimental → Experimental features to show it) shows today’s cost, active and stuck agent counts, and the top agents and issues by cost, served by /api/metrics/summary and /api/metrics/costs from Cloister’s cost tracking.

FPP (Fixed Point Principle)

“Any runnable action is a fixed point and must resolve before the system can rest.”
Inspired by Doctor Who: a fixed point in time must occur; it cannot be avoided. Fixed Point Principle (FPP): Any runnable hook item or agent action represents a fixed point in execution and must be resolved immediately. Overdeck continues executing until no fixed points remain. FPP ensures agents are self-propelling:
  1. Work items are pushed to the agent’s hook (pan admin fpp push)
  2. On spawn/recovery, the hook is checked
  3. Pending work is injected into the agent’s prompt
  4. Completed work is popped from the hook

Development

Dev vs Production Strategy

Overdeck uses a shared config, switchable CLI approach:
Both dev and production versions read/write the same config, so you can switch between them freely.

Running in Development Mode

Switching Between Dev and Prod

Dashboard Modes

Note: Use pan up for normal usage. Only use dev mode when actively working on Overdeck’s codebase.

Working on Overdeck While Using It

If you’re both developing Overdeck AND using it for your own projects:
  1. Use npm link so pan runs your local build; run npm run build after CLI changes
  2. Run pan dev for hot reload on UI changes
  3. Config is shared - workspaces/agents work the same either way
  4. Test in a real project - your own usage is the best test

Planning artifacts

When you plan an issue, Overdeck writes its PRD to .pan/drafts/<issue>.md and its xBRIEF plan to .pan/specs/, and tracks which plan items are done in .pan/continues/<issue>.xbrief.json. These files are committed on the issue’s feature branch, so they merge with the PR. A polyrepo project keeps them in its plan home, the repo named by pan_records.repo in projects.yaml. See State model for the full layout.

Developer Skills

Overdeck has two types of skills: Dev mode is automatically detected when pan runs from an Overdeck source checkout (one with a src/ directory, as with npm link). Skills in sync-sources/dev-skills/ are:
  • Checked into the repo and version-controlled
  • Only synced to developers’ machines, not end users