Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Manifest schema

Pitboss manifests are TOML files, typically named pitboss.toml. A manifest is either flat (one or more [[task]] entries) or hierarchical (exactly one [[lead]] entry). The two are mutually exclusive.

Always validate before dispatching:

pitboss validate pitboss.toml

[run] — run-wide configuration

KeyTypeRequired?DefaultNotes
max_parallelintno4Flat mode: concurrency cap. Overridden by ANTHROPIC_MAX_CONCURRENT env.
halt_on_failureboolnofalseFlat mode: stop remaining tasks on first failure.
run_dirstring pathno~/.local/share/pitboss/runsWhere per-run artifacts land.
worktree_cleanup"always" | "on_success" | "never"no"on_success"What to do with each worker’s worktree after completion. Use "never" for inspection-heavy runs or when you plan to resume.
emit_event_streamboolnofalseEmit a JSONL event stream (pause/cancel/approval events) alongside summary.jsonl.
max_workersintif [[lead]] presentunsetHierarchical: hard cap on concurrent + queued workers (1–16).
budget_usdfloatif [[lead]] presentunsetHierarchical: soft cap with reservation accounting. spawn_worker fails with budget exceeded once spent + reserved + next_estimate > budget.
lead_timeout_secsintno3600Hierarchical: wall-clock cap on the lead. Set generously for multi-hour plans (e.g., 21600 for a 6-hour plan executor).
approval_policy"block" | "auto_approve" | "auto_reject"no"block"Hierarchical: how request_approval / propose_plan behave when no TUI is attached.
require_plan_approvalboolnofalseHierarchical (v0.5.0+): when true, spawn_worker refuses until a propose_plan call has been approved.
dump_shared_storeboolnofalseHierarchical: write shared-store.json into the run directory on finalize.

[defaults] — task/lead defaults

Inherited by every [[task]] and [[lead]] unless overridden at the task level.

KeyTypeNotes
modelstringe.g., claude-haiku-4-5, claude-sonnet-4-6, claude-opus-4-7. Dated suffixes allowed.
effort"low" | "medium" | "high"Maps to claude --effort.
toolsarray of string--allowedTools value. Pitboss auto-appends its MCP tools for leads and workers. Default: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"]. See Security → Defense-in-depth → Read-only lead pattern for guidance on restricting this per worker.
timeout_secsintPer-task wall-clock cap. No default (no cap).
use_worktreeboolDefault true. Set false for read-only analysis runs.
envtableEnv vars passed to the claude subprocess.

[[task]] — flat mode (repeat for each task)

KeyRequired?Notes
idyesShort slug. Alphanumeric + _ + -. Unique within manifest. Used in logs, worktree names.
directoryyesMust be inside a git repo if use_worktree = true.
promptyesSent to the claude subprocess via -p.
branchnoWorktree branch name. Auto-generated if omitted.
model, effort, tools, timeout_secs, use_worktree, envnoPer-task overrides of [defaults].

[[lead]] — hierarchical mode (exactly one)

Same fields as [[task]]. The lead is a single Claude session that receives the MCP orchestration toolset. Mutually exclusive with [[task]].

Additional fields on [[lead]] for depth-2 sub-leads (v0.6+):

KeyTypeNotes
allow_subleadsboolDefault false. Set true to expose spawn_sublead to the root lead.
max_subleadsintOptional cap on total sub-leads spawned.
max_sublead_budget_usdfloatOptional cap on the per-sub-lead budget_usd envelope.
max_workers_across_treeintOptional cap on total live workers across all sub-trees.

[lead.sublead_defaults]

Optional defaults for sub-leads spawned via spawn_sublead. Any field omitted in the spawn_sublead call falls back to these values.

KeyType
budget_usdfloat
max_workersint
lead_timeout_secsint
read_downbool

[[approval_policy]] — declarative approval rules (v0.6+)

Zero or more policy blocks, evaluated in order. First matching rule wins.

[[approval_policy]]
match = { actor = "root→S1", category = "tool_use" }
action = "auto_approve"

[[approval_policy]]
match = { category = "plan" }
action = "block"

Match fields (all optional; unset fields always match):

FieldTypeNotes
actorstringActor path, e.g., "root→S1" or "root→S1→W3".
categorystring"tool_use", "plan", "cost", etc.
tool_namestringSpecific MCP tool name.
cost_overfloatFires when the request’s cost_estimate exceeds this value (USD).

Actions: "auto_approve", "auto_reject", "block" (forces operator review).

Rules are evaluated in pure Rust — deterministic, fast, never LLM-evaluated.


Annotated example

The pitboss.example.toml in the repository root has every field annotated with usage notes. It is a good starting point for new manifests.


Run artifacts

After dispatch, the run directory (~/.local/share/pitboss/runs/<run-id>/) contains:

FileContents
manifest.snapshot.tomlExact manifest bytes used
resolved.jsonFully resolved manifest (defaults applied)
meta.jsonrun_id, started_at, claude_version, pitboss_version
summary.jsonFull structured summary (written on clean finalize)
summary.jsonlIncremental task records as they finish
tasks/<id>/stdout.logRaw stream-JSON from the task’s subprocess
tasks/<id>/stderr.logStderr
lead-mcp-config.jsonHierarchical only: the --mcp-config pointing at the MCP bridge
shared-store.jsonHierarchical only: written when dump_shared_store = true