omp packages

pi-daddy1.5.0

Capability governance for pi sub-agents: spawn Agent Skills (SKILL.md) definitions whose allowed-tools becomes a grant that can only narrow going down a delegation tree, enforced by pi's own --tools allowlist, with an append-only ledger.

GitHub Actions Published 3 days ago MIT ~8.3K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-daddy

Coordinate Pi's engineering work and see the evidence behind a result. Start here for the tested ecosystem install, a first task you can check, and recovery after /new. To install pi-daddy on its own, use Install and first run.

Capability governance and coordination for pi's multi-level agent system. An orchestrator grants each sub-agent a deliberate subset of what it holds and withholds the rest. A sub-agent may delegate further, but only ever a subset of what it holds. Enforcement is pi's own --tools allowlist on a separate child process, with an optional append-only, hash-chained governance ledger.

This file is the product description, present tense. If code and this file disagree, fix this file. Agents start at AGENTS.md, which carries the rules, the decisions still in force, the measured facts and the roadmap.

Highlights

  • One-command setup & diagnostics: npx --yes pi-daddy@latest setup --preset auto installs updateable Pi sources and writes ~/.pi/agent/ecosystem.json. Use pi update --extensions for later updates and npx --yes pi-daddy@latest doctor to check runtime requirements and package pins. Install Daddy on its own with pi install npm:pi-daddy.
  • 5-Tab Terminal & Web Side-Panel Dashboard: /dashboard split launches the CLI bundled with the loaded extension. Use /dashboard open for the browser view or /dashboard for the URL and the command for a second terminal.
  • Cross-OS delegate (portable-child.ts + inprocess-readonly.ts): native sub-agent execution on macOS, Windows, and Linux x64, plus sub-150ms in-process quick_review.
  • Parallel Worktree Tournaments (delegate_tournament), Smart Auto-Escalation & 2-Stage Classifier Auto-Harvesting: parallel isolated git-worktree candidates with cold-judge selection or, given a score command, selection by the best measured score that beats the starting state, or with explore no selection at all: up to six directions the caller names, none applied, a patch preserved per candidate for a person to choose from (see Bounds and configuration), 1-shot strong-model rescue on principal:thrash-detected:v1 or manual [x], and fail-closed 2-stage fast-LLM session harvesting into ~/.pi/agent/pi-daddy/harvested-evals/<repo>/ ([h] hotkey).
  • principal-pi-skills@6.x binding: validates both v6 3-phase (build, review, debug) and legacy v5 manifests in principal-agents.json.

Work mode

Standard is the default. Ambitious adds guidance on choosing methods, challenging assumptions and verifying the agreed outcome. Grants and approval gates apply in both modes.

On a root request, Balanced Ambitious can temporarily expose delegate_tournament when the session may delegate, and quick_review. With specific emphases, Broader approaches can expose the tournament and Better outcome or Deeper proof can expose quick review. Daddy restores the operator’s previous tool selection when the request settles. delegate_all and delegate_chain follow the operator’s selection throughout the request. If switched off, they stay off.

In Ambitious, the root request is asked to state its size on its own line (Size: small, Size: medium or Size: large), and delegation follows it. At small, delegate, delegate_all, delegate_chain and quick_review are refused. Medium, or a request with no stated size, allows two delegated children per request. delegate_tournament needs Size: large. A refusal names the limit and how to restate the size, and the operator's prompt may state it too. A delegate to review that a pending final sign-off asks for is always allowed and not counted. Standard and child sessions are not bounded this way. Session fanout is unchanged.

In both Standard and Ambitious, a root request allows two review rounds. A round is one call that starts review work: a delegate, delegate_all or delegate_chain naming review, review-perf or review-security, a quick_review in the review role, or the automatic cold review. Parallel reviewers in one call are one round. A third is refused with a request to fix only the verified blockers, rerun the tests and report the remaining findings, and the automatic cold review does not run after two rounds. The sign-off review is not a round; it has its own limit below.

An automatic cold review can make a separate provider call before the request settles. Deeper proof requests that review for every change. Balanced Ambitious requests it when the change touches two or more files or 60 or more diff lines. In Standard, automatic review depends on the configured review model and the same size threshold. The review sees only what changed since the request began: at request start Daddy writes a Git tree of the working copy (tracked and non-ignored untracked files) through a temporary copy of the index, leaving the user's index, files and refs untouched. The reviewer is told which paths already held uncommitted changes, that they are the user's work in progress and out of scope, and which of their lines are now missing. Without a snapshot (no Git, or more than 4,096 or 64 MiB of untracked files) the review diffs against HEAD as before.

An independent file review in the root checkout also activates final sign-off for that user request and its automatic continuations. The triggers are a governed review, review-perf or review-security assignment, a quick_review of workspace files in the review role, or a cold review of a nonempty diff in that checkout. A separate user request starts with its own review state. Sign-off gates a delivery only. When, at settlement, no file is new, deleted, or different in content or mode from the Git tree at request start, and HEAD still names the request-start commit, the request settles without a sign-off hold and any review that ran is simply its answer. Changes are measured from the working copy as the request found it, so uncommitted work present before the request is not a delivery. When no snapshot could be taken, the Git tree of HEAD is the start and such changes count as delivered; a checkout Daddy cannot pin or compare is treated as a delivery.

At settlement, Daddy asks for one fresh, read-only delegate with agent: "review" in the current checkout. The parent supplies the applicable requirements or their authoritative workspace references. The reviewer receives the paths changed since the working copy at request start, including new tests and changes committed during the request, plus bounded pre-images of deleted text files. A pass requires successful native file reads covering every changed present file and an affirmative final from the completed child. Read long files in successive chunks. Use ./@name or ./~name for literal filenames beginning with these characters. Each credited read range must match the delivered file text. A change during the review invalidates that attempt. Later changes to delivered contents or modes require another sign-off. At most two sign-off reviews with a verdict run per request: when a complete one reports blockers, the next is a fix check that covers only the files changed since and is asked only whether those blockers are resolved; after two, the request settles blocked. The assignment names the paths that held uncommitted work before the request and asks the reviewer to treat any removal of it as a blocker unless the request asked for it.

The native session records pi-daddy-final-review-passed with the candidate digest and child identity. Missing coverage, unavailable authorization, an unsupported checkout or an exhausted three-continuation budget can leave a visible pi-daddy-final-review-blocked result. In plain print mode a blocked request also writes the reason to standard error and sets a nonzero process exit status. RPC and JSON consumers can use the typed boundary entries. The checkout observation is bounded at 32,768 files and 256 MiB. Full-text coverage is bounded at 8 MiB per reviewed file and 32,000 bytes for the changed-path list and deleted pre-images. An exact reviewed delivery can settle without rerunning earlier specialists.

Open Settings → Work mode → Choose work mode…. The editor is a draft until Apply work mode; Cancel leaves settings unchanged. Choose:

  • This session: applies to subsequent requests; replacing it clears a queued next-request override. Resuming the same session restores its saved selection.
  • Next request only: applies to the next Pi run and its descendants, including retries and continuations within that run. It is consumed at request start.
  • Optional combined emphases: Faster delivery, Better outcome, Deeper proof, Broader approaches. No emphasis selected means balanced guidance; these are useful directions, not required workflow stages.

The Overview keeps Work mode separate from permissions. Settings distinguish active now, session default and next request only. Changing a setting while work is running leaves that run and its children on their captured mode. /new starts Standard; it neither erases project memory nor repeats completed work. A fork retains its branch's session preference but does not carry a one-shot override.

Without a separate dashboard, use /work-mode for the interactive chooser:

/work-mode standard session
/work-mode ambitious session depth range
/work-mode ambitious next speed
/work-mode status

Principal and other installed runtime skills retain their assigned roles and definitions. Read-only work remains read-only. Bookie, Scout and Harness are optional; mode guidance requires no particular package, research run, memory write or evaluation. A missing optional tool narrows methods and evidence claims rather than stopping independent work. A mode does not grant standing monitoring or background work.

Selections are bounded metadata in Pi's native session, not instructions restored from project notes. Unsupported or unreadable optional metadata falls back to Standard with a settings notice. A failed save leaves the prior selection in force; an override whose consumption cannot be recorded is not used.

Local scripted checks establish control behavior and propagation. They do not establish that Ambitious improves a model's judgment, delivery quality or speed; that requires a separately designed comparison.

Reliable workflow handoffs

Native delegation accepts an optional stable operation_id. The session owner admits one matching request; a concurrent or later duplicate returns its existing execution reference. It does not launch another child, replay a completed mutation, or grant approval. A changed request under the same ID refuses. The request identity uses the selected definition's definitionId regardless of how Daddy obtained it. A describe or tree navigation between identical calls preserves the request identity. A changed definition makes it a different request. An intentional retry needs a new attempt after the previous operation is proven settled or never started; uncertainty stays blocked. Principal 4.12.0 introduced automatic operation IDs and exact candidate/report references for this contract.

Stable-ID attempts also retain private producer evidence under <PI_CODING_AGENT_DIR>/pi-daddy/operation-results (default agent directory: ~/.pi/agent). Admission is synchronized before dispatch; a restart with no published result leaves the attempt uncertain, not safe to rerun. Exact visible finals and available visible partial output remain distinct from native cleanup, successful work, review approval and current applicability. Diagnostics settings do not control this required result store. No raw session, reasoning, environment or task request is captured here.

OperationArtifactRef, openOperationArtifacts and readOperationArtifact are available from the package root without loading the extension, Principal or Bookie. Immutable references bind the original owner, operation, execution, manifest hash and authored bytes. Historical reads require the selected agent directory, check identity and confinement, and refuse missing, altered or oversized evidence. Authored content is bounded at 4 MiB per result; manifests at 64 KiB. There is no automatic lifetime quota or deletion: the operator owns retention and backup. Deleting evidence does not establish that an interrupted execution never started.

The live pi-daddy:operation-status:v1 reply retains its original meaning and may add operation.artifact. pi-daddy:operation-history:v1 accepts {version:1, requestId, sessionId, cwd, operationId, reply} for the currently bound session/canonical cwd only, returning history:true, the historical operation, optional artifact and exact final or explicitly partial content. It never claims live qualification or approval. Pi custom entries contain only pi-daddy:operation-artifact:v1 references. Bookie can register a reference afterward; a registration retry never dispatches the child again.

Shared task history and controls

Select a task through Bookie to see its title and latest recorded event at the top of Overview and Tasks. Open the row to inspect the reporting tool, event time and dispatch state. Each tool retains its own execution receipts. The task view covers recorded observations. Bookie can recover enrolled admission, control and cleanup facts from the owner journal.

When Bookie supplies progress details, the task preview shows the latest reported step and whether its latest file checkpoint is awaiting publication or saved to private history. Open the row for up to four recent steps and the file coverage. A worker heartbeat can refresh its observation while the last reported step stays visible. The display updates when Bookie publishes or the dashboard refreshes its source.

In task details, press p to pause new work, c to request cancellation, u to resume or b to set a budget. Press Enter to apply. Pause lets admitted work settle. Cancel signals participating workers and displays pending cleanup. Resume after cancellation requires confirmed cleanup. These controls apply to task-bound operations participating in the local protocol. The individual tool still determines what it may execute.

Pausing or cancelling also holds new root Pi shell and file-editing calls (including shell commands used only to inspect files). Direct file reads, searches and task history remain available. Already running inline commands and custom tools outside the task protocol have their own lifecycle. Inline calls consume no delegated attempts.

Use :task budget 12 to share twelve admitted attempts across participating operations, including children and their enrolled research or evaluation calls. Related subtasks inherit the parent’s allowance and pause state. Select the root task to change its shared controls. Each subtask retains its own observation history. Each distinct owner operation consumes one shared attempt. You can also limit an individual owner. For example, :task budget scout 4 allows four Scout attempts in total for this task. :task budget pi-daddy off removes the parent-delegation cap. Counts and controls follow the selected project and task across sessions in this Pi agent directory. Reusing a retained result consumes no attempt. A budget requires an explicit value. External services, token usage and money have separate accounting. Participating Daddy writers share one reservation per working copy. For parallel edits, choose separate registered Git worktrees. Reads and receipt reuse can proceed alongside a writer. If Pi exits during reservation, its successor can release the writer after proving the original process died before native execution began. A recorded launch intent still requires a native cleanup receipt. The original admitted attempt remains in history and retains its budget charge. Other processes can still edit the filesystem.

Current-session dashboard

Open 1 Overview to see what needs your attention, what Pi is doing and the latest finished tasks. 2 Tasks has the complete session list. 3 Reviews opens pending handoffs. 4 Activity groups related events into a timeline. 5 Evidence lists saved results. 6 Settings holds session controls.

Use the arrow keys to select an item and Enter to open it. A side-by-side preview appears on Overview, Tasks and Reviews when the pane is at least 92 columns wide. Press x for an expanded view from 82 columns. Esc returns to your selection. Press r for a session recap, m for models or v for package versions. Standalone ledger views and older owners retain the legacy display.

When a decision is pending, Overview directs you to the main Pi chat or to Reviews. Bookie handoffs show the command and the output to select. Memory and Research show current availability separately from saved topics, findings and gaps. Select either row and press Enter to browse the available content. Older producers retain their status-only display. A package can be installed while its live status is unobserved. After a disconnect the dashboard labels the last known state and withdraws current permission requests.

In a trusted interactive project, Bookie workspace memory starts by default and can save and recall routine notes for the current folder. Look for Bookie memory · Ready in this folder under Overview → Memory. With a Bookie version that reports saved choices, Overview and Tasks list them under Open choices. Select a question and press Enter to see its alternatives. A supported recommendation includes the reason and evidence. Pick an option or Write my own answer, check the answer, then save it in Bookie. Decide later leaves the question open. After /new in the same folder, Pi can recall the decision and the other questions stay open. Older Bookie versions can show questions in read-only mode. Turning off Bookie workspace memory in Ecosystem settings withdraws automatic memory access and hides those choices.

When Bookie supports corrections, Not a separate decision offers a separate confirmation: remove only that item from Open choices, keep the original note, and record no answer. Use it for a progress summary mistakenly presented as another decision. Decide later still leaves the choice open. Older Bookie versions retain their existing controls; no question is hidden by its wording.

The startup delegation summary may say checking available tools until Pi provides its first callable-tool inventory. It refreshes automatically when work starts, including after /new. A parent tool such as Scout can be available while a skill using it remains unavailable to children; use the parent Pi session identifies that restriction. More permission does not provide a missing child tool.

Task descriptions can come from a short public description supplied by the delegating model. When that description is unavailable, the dashboard uses the activity it actually observed. This works without a summarization request or JEV. Open details to inspect a source, and use x when offered to see exact references. Saved evidence, process completion and approval are separate facts. Explicit p and f reads use the existing retention controls.

The resource display covers the parent Pi process. Transcripts, private reasoning, shell commands and tool results are outside the session activity feed. The dashboard displays only the current owner's tasks and sources.

Optional remote LLM telemetry

The dashboard's Settings → Telemetry row enables or disables a session-local hardware probe; it is off by default and disabling it cancels its active local SSH process and stops further probe steps. Pi session shutdown and reload await that same cleanup. It uses the configured SSH client and existing remote amdgpu_top; it does not install software, start services, or start the model. Telemetry is display-only and never enters a model prompt. Failures are isolated from delegation and the rest of the dashboard.

Configure these three values before starting Pi (they are not stored in the project or displayed back as credentials):

export PI_DADDY_LLM_TELEMETRY_SSH_TARGET='user@host'
export PI_DADDY_LLM_TELEMETRY_SSH_IDENTITY="$HOME/.ssh/your-diagnostics-key"
export PI_DADDY_LLM_TELEMETRY_SERVICE='your-llm.service'
pi

The account needs non-interactive SSH access, permission to run ~/.local/bin/amdgpu_top, and permission to query the configured systemd service. Configure the service as a systemd unit name without shell punctuation; host targets must be a host or user@host form. Telemetry SSH settings are removed from delegated child environments. Each SSH command has its own timeout (2–4 seconds) and bounded output; the next probe starts at least two seconds after the previous probe finishes. In Settings select Telemetry and press Enter to enable; select it and press Enter again to stop. States distinguish disabled, missing SSH configuration/dependency, confirmed inactive model service, disconnected SSH, stale sample and connected. A failed service query other than systemd's inactive result is reported as disconnected. GPU activity and edge temperature are shown only when numeric samples exist. System RAM used/total comes from /proc/meminfo (MemTotal minus MemAvailable), including when the model is stopped. On an APU this is a shared system pool, not a GPU-only allocation; the amdgpu_top GTT/VRAM heaps are not substituted for physical RAM. Missing, malformed or inconsistent memory values remain unavailable. Prompt/generation speed remains unavailable; llama.cpp --metrics may expose aggregate metrics, but no verified per-token speed is claimed. A stopped model therefore remains stopped without an inferred rate.

To try a source checkout, build its dashboard before loading that checkout's extension; editing source does not change an installed package or an already running dashboard:

# From the checkout root, with its development dependencies already available:
npm run build
pi --no-extensions -e "$PWD/packages/pi-daddy/extensions/grants.ts"

This explicit test session loads only the selected extension. Keep other normal sessions separate. After testing, start Pi normally to use its installed extensions.

Controls remain the existing authenticated owner controls. Changes show pending, applied, refused or unconfirmed status. Unconfirmed mutations need owner inspection before retry. Auto changes current permission handling, and model/wall/idle edits apply to future children. Running children keep captured settings. The dashboard does not implement a new pause/cancel/stop route: use the owning Pi control, and treat a reported request as unconfirmed until its owner reports settlement.

Display storage is bounded and memory-only: at most eight source updates of 4 KiB, 32 parent activity observations, 16 recent producer-reference identities, and four metadata files of at most 2 MiB. Unchanged metadata is cached with a one-second file-check interval; package version inventory is cached for five seconds per owner. Versions includes optional Scout/Bookie observations and separates installed bytes from loaded generations; a local 0.0.0 Bookie manifest is not evidence of npm publication. The view does not scan historical artifact stores, make provider calls, or write durable records on redraw. Larger ledger files are reported unavailable in this view rather than silently truncated into a false complete history.

The optional event pi-daddy:dashboard-source:v1 takes a trusted {version:1, sessionId, cwd, producer, producerVersion, reply} registration for the actual current native owner and canonical cwd. A successful reply supplies {version:1, ok:true, generation, publish, close}. publish({sequence, items}) accepts strictly increasing nonnegative sequence values, no more than eight items and 4 KiB total. Each item has id, kind (goal, next, work, review, evidence, status), label, state (observed, running, dependency-wait, approval-wait, cancel-requested, settled, failed, unknown, unavailable), optional bounded details, and an optional opaque display reference. IDs are bounded to 160 characters, labels to 240, details to six strings of 240, and references to 512. Replacing a producer invalidates its prior publisher even at the same version; session/lifecycle changes invalidate all publishers. Registered extensions own refresh/closure; no callback conveys permission, review approval, a content resolver, or executable actions. The exported TypeScript interfaces document this seam without making other ecosystem packages mandatory.

The dashboard shows the selected task's last observed tool event and time since that event. Details include the actual recorded working directory and phase where available. Silence is not proof of a hang, and a finished process is not an approved task. Tool observations include names, times, local call references and bounded descriptions of the action. A delegating model can supply a short public dashboardSummary during its usual call. Metadata-only and off modes omit this model-authored text. Diagnostic retention remains operator opt-in.

The coordinator can use Principal's native tool-only Codemode adapter. Nested calls retain Pi's normal permission and cancellation hooks. Governed children cannot request codemode or principal_codemode; that child execution path is not qualified.

Install and first run

pi install npm:pi-daddy
pi

Open Pi and start your task. An interactive parent discovers the agents Pi has selected and restores the project's saved permissions automatically. Additional agents supplied by extensions become available before the first task. In a fresh project the session uses its observed tools and the existing permission gates. Run /dashboard split in Pi to open the 5-tab side panel. Run /dashboard for the browser URL and the command for a second terminal.

Use /grants to inspect access. To explicitly save a different project ceiling and enable the project governance ledger, use /grants init. It also creates the review copy at .pi/pi-daddy/settings.json and stores the enforced choice outside the workspace. Headless runs and children keep their existing setup. PI_DADDY_GOVERNANCE=off still disables governance. The standalone pi-daddy init command prepares review files.

Optional local public evidence capture

Set PI_DADDY_PUBLIC_EVIDENCE_DIR before starting the coordinating Pi process to retain exact public delegate_describe, delegate, delegate_all and delegate_chain return content. It is off by default, including source-byte retention. Create a private directory owned by your user first, then use its canonical absolute Linux path (no symlink components):

mkdir -m 700 "$HOME/pi-public-evidence"
PI_DADDY_PUBLIC_EVIDENCE_DIR="$(realpath "$HOME/pi-public-evidence")" pi

Each returned result keeps its authored text, runtime evidence, error state and structured details. An added Public evidence capture: text block gives status: "captured" and a reusable {path, sha256} reference to a versioned pi-daddy-public-evidence-v1 manifest. Read and hash-check that manifest and its referenced files; the manifest's response copies the exact public {isError, content} before the reference block is appended. This is the extension-return boundary, not a claim about downstream Pi hooks or provider wire serialization.

Selected definition sources are copied from the bytes admitted during discovery, including the inline skill, Principal binding manifest, package identity and delegated agent where applicable. The exact dispatched body is a separate file. Raw source-copy SHA-256 preserves every byte, including a BOM; sourceHash retains the runtime's existing decoded-text hash semantics. Changing a source path later does not rewrite the snapshot. Manifest requestedDefinitionId records the ID the caller supplied. It is null when Daddy pins the current selection or uses a remembered ID. Manifest definitionId records the planner's observed selection. Requested execution IDs are allocated occurrences, not proof that those children started. Runtime outcomes contain only the existing allowlisted final and process-receipt projection, in original child/step order; skipped steps have no invented outcome. The captured response holds the version 2 summary the model received, computed from that complete version 1 projection alone. finals also copies each complete attributed public final separately, with its ordinal, execution ID and native session/message/leaf identity. Its byte hash must match the native final hash; unavailable finals remain null. Consumers never need to reconstruct a final from report delimiters. Process settlement remains separate from workspace cleanup.

The configured root must already exist with owner-only permissions. Captures use exclusive ordinary files, held directory descriptors and fsync before publishing a reference; each capture is limited to 64 MiB and 64 files. Files are mode 0600 and capture directories mode 0700. The operator owns total retention and disposal; there is no automatic deletion or lifetime disk quota. Partial files can remain after a failure. An unavailable source snapshot, bad path, permission error or capture limit produces a loud failed status without a success reference. It does not rewrite work results, respawn children or turn a failed execution into success. Typed exceptions before a result is returned preserve their original behavior and have no returned capture. The directory setting is stripped from captured-child environments. The same Pi owner restores its own setting on extension reload; unrelated owners do not inherit it. Set the value to literal off to explicitly disable capture on reload; future calls use the replacement setting while in-flight calls retain their original root.

No request task text, tool arguments, credentials, private session/reasoning, raw details or hidden diagnostics are collected by this feature. Public authored output can itself contain sensitive information, so choose the local root deliberately. Hashes identify retained bytes; they do not authenticate against hostile processes running as the same user. Capture integrity establishes neither reviewer approval nor task completion and adds no grants, ledger events or automatic resumption. Future JEV/LoRA experiments may explicitly consume reviewed public evidence offline; this feature sends nothing to an external evaluator.

What a definition is

An Agent Skills SKILL.md. Its allowed-tools is the ceiling; its body is the child's system prompt. The standard specifies allowed-tools as "pre-approved" and marks it experimental: it declares intent and blocks nothing. Passed through --tools it becomes structural. That is the contribution.

---
name: review-security
description: Reviews a diff for authn/authz, injection and secrets handling.
allowed-tools: Read, Grep
---
Review ONLY the diff you are given, for security. Report findings; never edit.

The three tools

delegate({ agent: "review-security", task: "Review the diff." })
delegate_all({ children: [ { agent: "review-security", task: "…" }, { agent: "review-perf", task: "…" } ] })
delegate_chain({ steps: [ { agent: "plan", task: "…" }, { agent: "build", task: "Implement: {previous}" } ] })

Each child is a separate OS process with its own tool allowlist, its own instructions and no knowledge of its siblings. delegate_all runs children concurrently under the active descendant capacity limit. Within a batch, children that require a writer reservation on the same working copy take turns. Read-only children and writers in separate worktrees can run concurrently. delegate_chain runs steps in sequence; each step receives its predecessor's complete verified final inside a fenced, labelled, nonce-delimited block. A required final exceeding the 32 KiB handoff bound stops dependent steps; the complete result remains available to the caller. The chain is planned and gated before any step runs. A child may itself hold delegate and spawn further, with the same tools, one level deeper, under the same rules.

A child names either agent or tools, never both. The definition's allowed-tools is the whole grant, so a tools list beside agent is refused before launch (NARROWING_VIOLATED) and the refusal names what the ceiling lacks; it is not ignored and not read as a narrowing.

What a child receives

By default a child gets its definition body, trusted locations for that selected definition, and the task. Parent conversation context is a capability. context:<mode> names how much of the parent's own session crosses, and it attenuates like every other id, so a child can never receive a richer handoff than the definition's ceiling and the parent's grant allow.

delegate({ agent: "review", task: "Independently inspect and review the current checkout diff." })

delegate({ agent: "build", task: "Implement it.",
           context: { mode: "files", files: ["src/kernel/resolve.ts"] } })
Mode What crosses
none nothing beyond the definition and the task; the default
files the contents of paths the parent names, confined to the working directory
pruned the last few turns of the parent's session, plus older turns naming those files
summary what the parent writes in its own words
fork the parent's whole session, as a fork; gated, so a human answers first

A delegate_chain step takes the same parameter, and because a chain is planned as one unit, a gate any step raises is answered before the first step runs.

The modes are ordered, and each subsumes the weaker ones: a parent holding context:fork may hand a child context:files. What crosses arrives inside a labelled, nonce-delimited fence marked as data rather than instructions, capped at 32 KiB, with anything that did not fit said inside the fence. The capability decision record names the mode the child actually received and how much crossed.

delegate_describe also returns contextContract: the selected definition's permitted modes, the explicit none default and bounds for file inputs. This describes a ceiling, not a grant. For an independent reviewer with read access to the same checkout, omit context; use files only when it is permitted and actual file contents need handing over. A summary is not valid for a definition capped at files, and must not be disguised as task or file content. Nothing automatically rewrites or drops a requested handoff.

A refused context request names the correction. If a new operation was recorded not-started, the error also explains recovery: a bound workflow recovers its original operation; a standalone caller can make one corrected attempt with a new operation ID. Existing operation IDs stay terminal and changed arguments never bypass their identity check. If the original record cannot be written or already belongs to another attempt, inspect that operation first; the current request's refusal is not proof that earlier work never ran.

pruned keeps recent turns plus turns naming the given files. The deterministic selector keeps those candidates against the task, keeping a subset. A probe over the operator's sessions measured 0.737 delivered term recall at the 20-turn default; that is not task-success evidence and is not enough to make pruned the default.

The guarantee, and its limit

effective = ( requested ∩ parentGrant ∩ ceiling ) \ (gated \ approved)

Escalation is impossible by construction on the tool surface: no policy engine, no model on the security path. Depth, active descendant capacity, approvals and workspace routing attenuate the same way. When a governance ledger is configured, each decision is recorded and the denied set is the signal: an agent repeatedly asking for what it does not hold is the escalation tell.

What it does not do: contain an agent holding an execution primitive. A child granted bash can start a wholly ungoverned descendant. Containing that is the operating system's job, so bash is gated by default in a governed session and gating is closed under subsumption (gating write also gates bash). The escape is not made impossible; it is made loud, which is what matters when the realistic threat is a confused or prompt-injected agent.

write, edit and edit-diff are gated too, since 0.40.0, and the reason is the same one. A review used pi's own write from a governed child to rewrite the operator's stored grant — widening it from tool:read to tool:bash — and to write the record that says which workspaces are routable. write takes an absolute path and performs no confinement, so it reaches every operator-state file on the same account. It is therefore much closer to bash than a tool allowlist suggests, and it is now loud for the same reason bash is. The cost is real: most useful delegations write something, so they ask once until an approval is banked. PI_DADDY_GATED is the escape hatch for an operator who wants the old behaviour, and an explicitly empty value gates nothing.

Approvals

With Auto OFF, a gated capability needs a valid approval or the UI of the session executing the delegation. Captured children use Pi's JSON mode and cannot answer local permission dialogs; a gate with neither a valid approval nor an available UI is denied. The answer is once, for this session, or always (persisted for a bounded period, offered only for a named definition, keyed capability@subject). Approvals inherit down the subtree intersected with each child's grant; a once never crosses a spawn. The approval store and governance ledger never store raw task text. /grants approvals lists what is persisted; /grants revoke <capability>@<definition> or --all removes it. The store lives in pi's agent directory, not in the workspace.

Auto mode lets the operator approve every Daddy permission request for the current session and its descendants. /grants marks an approval-only gate as AUTO when Auto is on. This is a preview of the permission step; actual delegation still rechecks Auto and all other execution conditions. Genuine refusals remain BLOCK. In a trusted interactive workspace, Daddy Auto starts on and approves eligible specialist requests, including shell commands and file edits. Bookie workspace memory starts when both startup settings are on. Switching Auto on or off also switches Bookie for that session. Changing Bookie alone leaves Auto as it is. Use Settings → Ecosystem to change either startup preference or turn off automatic review capture.

For an explicit launch override, set PI_DADDY_AUTO_MODE=1 or PI_DADDY_AUTO_MODE=0. Headless sessions default to Auto off. Descendants consult their owning session. In the connected dashboard, press a to switch it on or off. /grants auto on and /grants auto off control the same session setting; /grants shows the current state and source. Reload preserves the session choice; a new Pi session starts from the environment default. After /new in the same folder, use /grants auto on in the new chat if you want automatic project memory and your launch default is OFF.

Auto is checked again before each delegation or chain step. Turning it OFF stops future automatic admissions; already admitted work continues and independently granted manual approvals remain valid. Turning it ON can release an outstanding Daddy approval prompt. An unavailable owning session never grants automatic permission. Automatic decisions are recorded as source: auto, once for that admission, rather than banked as human or persistent approvals. Capability grants, definition identity, workspace routing and execution settlement checks still apply. JEV calls and LoRA storage retain their separate consent controls.

Monetary usage is observational. It never pauses, stops or authorizes a child. Available usage remains in lifecycle records and episode reports; missing or partial coverage is not a zero-cost claim. Permission approvals, depth, fan-out limits and execution timeouts are separate controls.

Child usage reaches the Pi session that delegated it. delegate, delegate_all and delegate_chain report their children's observed model usage in Pi's tool-result usage field, which Pi adds to that session's usage totals, footer and cost (Pi 1.0.4 and 1.5.2 record it). Each call is counted once, also when a child delegates further: a child's lifecycle record and pi-daddy report keep its own calls, and its report to its parent adds what its own delegations reported. details.childUsage gives measured and unmeasured children and the cost of the usage reported; unmeasured usage is never estimated. A failed or timed-out child reports what it used, and so does a delegation that stops with an error after its children ran, such as a critical-assurance veto: Daddy adds their usage to Pi's error result, whose text stays unchanged. A reused operation reports nothing again. A child stopped while its own delegation was still waiting counts that delegation as unmeasured, and a figure no delegation could plausibly reach (over 1e13 tokens, $1e8 or 1e7 executions in one value) is counted as unmeasured rather than added. The dashboard's ledger frame, with the owning Pi session connected, and pi-daddy report say this usage is already in the delegating session's totals: compare, do not add. The dashboard line counts the session's own delegation results only; a delegate run from a Codemode script is in the session's totals through the codemode result, but not in that line. A scout_research call the session ran for a child is in its totals on the same delegation result, as the session's own usage, not in that line.

The ledger

When configured, .pi/pi-daddy/grants.jsonl holds capability decisions, child lifecycles, workspace leases, cost and session configuration, and episode outcomes. Each line is a record envelope {v, seq, prev, at, kind, id, body, digest}: prev is the hash of the previous line, digest the hash of the record. A damaged file is read up to the damage; the writer then refuses with LEDGER_DAMAGED until pi-daddy ledger repair <path> --yes drops the damaged tail. /grants ledger reports records, escalation attempts, integrity, executors and which definition bodies ran, by digest.

The activity timeline (activity.jsonl, parent turns, child lifecycles, runtime-skill reads) uses the same envelope and distinguishes extension-triggered custom runs from user turns. Extension turns retain their custom type and the starting message's text, not unrelated queued messages; details and image payloads are excluded. This is observation, not evidence of human authorization. The same content policy below applies to both kinds of turn. The timeline is enabled by default. It may store private prompt and final content in .pi/pi-daddy/content/; set PI_DADDY_ACTIVITY_CONTENT=metadata-only (or off) to keep only digests, or PI_DADDY_ACTIVITY_TIMELINE=off to disable observation.

The default location is prepared during session startup, before product snapshots. Fresh ignore rules cover activity/content and grants-ledger runtime files only; settings and unrelated files stay reviewable. Existing ignore rules are preserved. Already tracked runtime data, unsafe storage paths or insufficient exclusions report observation unavailable rather than silently changing repository policy. Custom and transported timeline locations keep their existing policy. Non-Git roles can still record without Git; an existing repository whose policy cannot be checked remains unavailable.

pi-daddy outcomes reads Git history, optional GitHub Actions results from gh, and narrowly recognized corrections in the next recorded operator turn, then appends only changed episode_outcome signals. Only commits carrying a Pi-Episode: <episode-id> trailer is considered; pi-daddy report can display attribution only when matching episode data exists in the local ledgers and shows the latest label beside each such episode. These labels are delayed for 48 hours and are operational heuristics, not quality acceptance. The contract is packages/pi-daddy/contracts/ledger-record/v1.

Workspaces and leases

/grants workspace <id> inspects one workspace without changing grants, acceptance or destination pins. It distinguishes saved acceptance, the current routing capability, pending activation, a moved or removed destination, and invalid worktrees. It names the selected grant directory and its source. An active route is only a current observation: candidate, selected task/input scope, approvals, writer lease and native settlement remain dispatch-time checks. The dashboard retains the last explicit inspection with its time and freshness; redraw does not scan repositories or refresh authority.

Startup uses the actual Pi working directory's existing root grant and runtime defaults, even when an embedding process started elsewhere. Explicit environment grants still win; descendants never adopt a target directory's broader root grant. Stored directory identity remains exact: an alias does not silently borrow or migrate another spelling's saved grant or approvals. Canonical aliases of registered workspace destinations continue to resolve through the existing Git/worktree validator.

A registered worktree is named workspace:<id> and routing a child there is a capability that attenuates like any other. Acceptance is trust on first use: the first session accepts and announces every id already in the registry. Later additions are refused until /grants workspaces accepts the current id set, effective next session. Each session pins accepted ids to their resolved destinations, so a destination changed during that session is refused; the next session repins an already accepted id without another acceptance step. A writer routed to a workspace holds an exclusive lease. A kernel flock serializes live writers; execution-bound helper receipts separately prove that the previous captured subtree settled. Unknown cleanup quarantines the workspace even after the lock disappears, refusing a successor until the original ownership evidence proves settlement. It coordinates governed children only; it is not a sandbox, path confinement, or proof of anything a child did.

Executors and the dashboard

Captured subprocess execution owns and reaps cooperating child subtrees on Linux x64 via the packaged native worker, and uses the portable Node process-group child runner on macOS and Windows. A packaged native helper owns and reaps the cooperating child subtree. The final is accepted only when Pi's native lifecycle protocol settles and matches the exact persisted current turn and active branch. Complete final text is preserved; work, final availability, subtree cleanup and optional observation completeness are separate result fields. A failed execution returns isError with its available evidence. Display, diagnostics and optional recording cannot replace the primary final. Unknown cleanup retains capacity and workspace exclusion. The coordinating model receives a version 2 runtime evidence summary per child: those states, any timeout, cancellation, spawn-failure or truncation flag, a bounded reason, the operation ID (or execution ID), and for a worker that did not exit normally the receipt's cause and signal. Complete final identities and process receipts stay in the result details, which Pi persists but does not send to the provider, and in opt-in public capture.

A child whose tools only read (read, grep, find, ls, plus context handoff) is replay-safe, and delegate_describe (replaySafe), the /grants allow lines and the startup summary say so. When such a child fails without answering (it exited without a final, timed out, could not launch for want of system resources, or its model request failed), Daddy runs the same request once more in the same tool call: a new execution and process with the same task, definition, model and context, planned with nobody asked and bounded by the first attempt's wall-clock deadline. A child killed from outside the tool call (a person's kill, the OOM killer) exits like a crash and is retried once. Daddy never retries a child its parent's tool call cancelled, one whose cleanup is not settled, one that spent an approval (on a gated tool, or a gated context handoff such as the default-gated context:fork) or one carrying an operation_id, and it never retries twice. The summary then carries "retry":{"attempts":2,"firstFailure":"…"}, the details keep the first attempt complete, the result details link the two executions, and the usage reported to the Pi session covers both attempts. A failure carrying an operation_id that would otherwise have been retried is returned with "replayable":true instead, so its coordinator can retry it once as a new operation (Principal does). A complete answer is never retried, including after a later idle timeout. Bound operation failures retain optional owner-verified retry eligibility; a coordinator without that evidence keeps its manual retry path. PI_DADDY_REPLAY_RETRY=0 turns off the retry and the replayable mark; the replay-safe mark stays.

Pi and TypeBox are wildcard host-provided peers so Pi's extension loader supplies one shared runtime copy. Development dependencies pin Pi 1.0.4; the additional 1.1.0 and 1.4.0 checks have the execution scopes described above. Prefer a Pi-managed install under a measured host and executor combination. An ordinary standalone npm install may resolve untested peer versions. In a Pi-managed no-peer install, standalone help, version and reporting remain available; use /grants init inside Pi for an explicit persistent project ceiling. Delegate to a selected Principal phase by its exact name, such as build or review. Submit independent work in one delegate_all batch.

Final capture preserves whitespace and concatenates text blocks without inserting separators. Tool-call terminals, empty visible finals and non-stop reasons are unavailable. Persisted message comparisons ignore object key order while preserving array order and every field value. The shared final-conformance.json table checks these semantics in both runtime and harness. Capture remains bounded: 4 MiB visible final, 32 MiB protocol line, 64 MiB persisted session, and a 3-second bounded session read. Exceeding a limit reports an unavailable final and blocks dependent handoffs; it does not imply the worker failed to settle.

Retained capacity is rechecked against the original bound ownership and settlement receipt before a new single, parallel or chain dispatch. Exact later proof refunds the reservation once; missing, malformed or mismatched proof and unbound ownership remain retained. Recovery does not rewrite the original failed/unknown outcome or mint new capacity on reload. A single delegation reserves its available subtree; use delegate_all to allocate independent parallel children.

Captured subprocess execution is the sole executor across Linux, macOS, and Windows (native subreaper worker on Linux x64; portable child runner on macOS and Windows). Native receipts prove subtree cleanup.

The trusted extension event pi-daddy:runtime-snapshot:v1 supports Principal's explicitly armed resume checks. It reports the actual Pi session/canonical working directory, a stable owner scope, current backend qualification, outstanding execution identities and an exact settlement digest. A private runtime journal under the operator's Pi agent directory records pending launches before execution and native ownership before the gate opens. An OS lock excludes concurrent owners; clean same-session restart rechecks original receipts and preserves the digest. Missing or changed receipts, interrupted unbound launches, live owners and failed control finalization refuse resume. The journal contains process identities and receipts, never task text or an approval. A model-authored list of children, successful prose or a progress flag cannot supply these facts. Principal separately verifies operator authorization, candidate and artifacts before consuming its checkpoint and queueing a fixed continuation. This bridge never grants capabilities, approves work or calls external models. The ledger schema is unchanged. Same-user hostile filesystem or co-loaded-extension authenticity is outside this cooperative ownership boundary.

pi-daddy-dashboard and /dashboard show current work, live usage, and actual pending approvals first; completed history is collapsed by default. Use a to switch Auto, arrow keys to select a row, Enter for details, m for session models, h for history, and ? for help. The view fits the terminal and follows resize events. A disconnected control displays its state as unavailable until the owning session acknowledges a fresh snapshot.

On Pi versions that emit native prompt events, selections, confirmations and text-entry dialogs appear under Needs your input while they are open. The row shows the question and directs you to answer or cancel in the main Pi chat; it clears when the dialog closes or the session changes. A pending Daddy permission takes priority over a duplicate native dialog row. Generic custom panels are not inferred to be questions: informational views and loading screens stay out, while existing producer-owned approvals keep their own status. The dashboard never grants authority or changes Auto without explicit operator action.

A connected dashboard sends explicit Auto choices and model edits over a private session-local socket. Model edits use the same in-memory overrides and session_config audit path as /grants models; m <definition> <provider:model> <thinking> and m all ... remain available in command mode. A standalone dashboard is read-only. Execution history and cost remain observations, and incomplete usage is shown as unavailable rather than zero.

Press s for Settings. Select a setting with the arrows; Enter opens or changes it. For child wall and idle times, 0 restores the startup default. Settings belong to this owner session and survive reload; a different native session starts fresh. Wall/idle edits affect future child launches from this parent, never a running child's captured deadline. They are process safety controls, not model time/token budgets. /grants reports the effective overrides.

JEV controls require skill-harness in the owning Pi session. Enabling opens its existing paid-call and LoRA-storage consent prompts in that parent; the dashboard shows waiting-for-consent, key readiness, remaining calls, storage status and the selected provider/model, transport and shared local data root when reported by Harness. Auto cannot answer either consent prompt. Turning JEV off revokes its activation, including an outstanding enable request; the switch itself makes no provider call. No API keys, consent flags or training permissions can be set from this screen.

When Harness offers session controls, the Call limit row shows the session total, calls already used, and how many remain available. Select it to enter a nonnegative whole number in the main Pi session. The initial limit is 300; 0 stops new JEV calls. Raising the limit does not reset spending. Choose JEV model and storage opens the provider/model and consent choices. Tool hints lets you opt in separately: a hint names an available tool only when JEV rates its fit above 90%. Hints share the same call allowance. They do not execute the tool or grant permission. Older Harness versions keep their existing JEV switch.

Settings shows governed descendant capacity and maximum depth. An explicit startup override takes effect in a new session. With no fanout override, Daddy applies the selected mode’s capacity to each request. The per-call bound and live reservations also apply. Models and package versions keep their existing m and v views, keeping the main task view focused on work.

Press v for ecosystem versions. Pi, Daddy, Principal and Harness each show the loaded package generation, version currently installed on disk, source and path. A mismatch calls for a reload (restart for Pi itself). Older extensions without the reporter show their installed version with the loaded version explicitly unknown. Multiple sources are flagged for inspection rather than choosing one arbitrarily. Package versions describe what is present; they do not establish compatibility qualification or that npm has no newer release. Version details provide native Pi commands for changing an explicit npm pin and rechecking Principal's installed agent definitions. pi update --extensions retains pinned versions; use pi install npm:<package>@<version> to replace a pin, then deliberately reload. There are no background registry checks or silent installations.

: opens command mode, Tab changes the task filter, p/f shows retained prompt/final content, Esc returns to the previous view and q closes the dashboard.

Bounds and configuration

Every variable is PI_DADDY_*. Operator-facing controls are grouped below; the environment overrides stored configuration where both exist.

Area Variables
Governance PI_DADDY_GOVERNANCE, PI_DADDY_GRANT, PI_DADDY_GATED, PI_DADDY_MAX_DEPTH, PI_DADDY_FANOUT, PI_DADDY_LEDGER, PI_DADDY_APPROVAL_TIMEOUT, PI_DADDY_AUTO_MODE
Child execution PI_DADDY_CHILD_IDLE_TIMEOUT, PI_DADDY_CHILD_TIMEOUT, PI_DADDY_ALLOW_UNRESOLVED_MODELS, PI_DADDY_PARENT_TOOLS, PI_DADDY_CHILD_MCP, PI_DADDY_REPLAY_RETRY
Workspaces and retention PI_DADDY_WORKSPACE_REGISTRY, PI_DADDY_WORKSPACE_LEASE_DIR, PI_DADDY_EXECUTION_ARCHIVE, PI_DADDY_RETAIN_NATIVE_SESSIONS, PI_DADDY_NATIVE_SESSION_ROOT
Activity PI_DADDY_ACTIVITY_TIMELINE, PI_DADDY_ACTIVITY_CONTENT

PI_DADDY_FANOUT limits concurrently active governed delegates. The default is 8 in Standard and 24 in Ambitious. An explicit value pins the budget across modes. Zero exhausts it, and malformed values refuse delegation. A reservation covers the child and its descendant allowance, so a subtree may hold slots it is not currently using. Settled work returns capacity. Unconfirmed cleanup retains the reservation. Depth and per-call limits apply independently.

delegate_tournament uses a separate runner. Each tournament launches one candidate process per approach, two or three, in isolated Git worktrees. The caller must give approaches: a different method for this task each, not a code style. There are no built-in approaches, and a call without them is refused before any worktree is created. An explore run may be given up to six candidates and still runs at most three at once. Those candidates run outside the governed-delegate budget.

With score, a tournament picks its winner by measurement. score.command runs in a worktree and its last non-empty stdout line must be one finite decimal number. score.better is higher or lower. score.protect lists the files or directories that make up the measurement itself, such as a benchmark script and its data, and is empty only when no file in the repository is part of it. All three are required together, and a malformed request is refused before any candidate starts. After every candidate has finished, Daddy measures the starting state once in a fresh worktree, then each candidate that passed verifyCommand (or, when none is given, finished with changes), one at a time, under the verifier's time and output limits and platform rules. Only a score strictly better than that baseline is eligible. The best eligible score wins, an exact tie goes to the cold judge among the tied candidates, and nothing is applied when no candidate is eligible. A failing exit, a last line that is not one number, too much output or an expired limit makes that candidate ineligible, and the result says why. When the starting state cannot be measured, the result says so and candidates are ranked without the baseline check. An optional score.target is reported as met or not met. A winner that improves on the baseline is applied under the usual Auto rule even when it misses the target, so repeated calls can climb towards it.

Protected paths are returned to their starting contents after each candidate finishes, before verification, and again before scoring. Edits and deletions are undone and files added under a protected directory are removed. The result names the protected paths each candidate changed. A score is only as trustworthy as its command: a file the measurement reads that is not listed can be changed by a candidate, one measurement per state does not average out a noisy benchmark, and candidates hold a shell, so this is not containment. Without score, a tournament restores only test and verifier files that are uncommitted in the checkout, so list committed tests under score.protect when they must not change.

With explore: true, a tournament builds several different directions for the same request and applies none of them. A person chooses. The caller must give approaches: two to six directions, each a different way of meeting the request and not a code style. A missing, blank or repeated approach is refused before any candidate starts, and so is applyWinner: true. At most three candidates run at once, the same as a normal tournament, so six run in two rounds. No judge is consulted, no winner is named and nothing is written to the checkout, whatever Auto says. verifyCommand and score work as in a normal tournament, including the baseline check and the protected paths, and are reported for each candidate. Cross-candidate test runs are skipped, because they only inform the choice of a winner.

Every explore candidate with changes is preserved. The result lists each candidate's approach, summary, changed files, verification result, score when score was given, and patch: the path of a complete patch against the checkout the run started from. To take a candidate, run git apply <patch> from the repository root. Daddy has no command that applies a preserved patch, so the person does this, or the coordinating model does it with its own shell once the person has chosen. A patch holds the files the tournament reports as changed. As in any tournament, that leaves out new untracked files whose path begins with a dot or ends in .log, and looks at no more than the first 24 untracked files. A candidate whose patch cannot be built, or is larger than 8 MiB, has a patchProblem in place of a patch. Preserved files stay in the system temporary directory until it is cleaned.

For more variations of one candidate, call again with explore: true and moreLike set to that candidate's patch. The new candidates start from the checkout plus that patch. Their own patches are stated against the checkout, so each one applies on its own, and the baseline score and the protected paths stay those of the checkout. A moreLike value that is not a complete patch from an explore run, or whose patch no longer applies to the checkout, is refused before any candidate starts.

The retired PI_DADDY_EPISODE_COST_CEILING, PI_DADDY_ADVISOR, PI_DADDY_ADVISOR_KEY, PI_DADDY_ADVISOR_MODEL and PI_DADDY_ADVISOR_TASK_EGRESS inputs are inert compatibility inputs.

Interactive approval prompts wait for the human by default. Set PI_DADDY_APPROVAL_TIMEOUT to canonical whole seconds (1 through 2,147,483) for an explicit deadline; unset it or use literal 0 to wait indefinitely. Expiry, user dismissal and caller cancellation have distinct expired, dismissed and aborted outcomes. Each grants no permission and explains how to retry the delegation for a new prompt. Existing approva