@deathbeam/pi-delegate
Run subagents with delegate, delegate_list, delegate_steer, delegate_cancel, delegate_apply, and
delegate_discard.
Use /delegate command to inspect jobs in a full-screen TUI.
Installation
# Choose one:
pi install npm:@deathbeam/pi-delegate # this package
pi install git:github.com/deathbeam/pi-packages # all my packages
Configuration
Optional delegate settings live in ~/.pi/agent/settings.json or .pi/settings.json:
{
"delegate": {
"agentDirs": ["./.pi/agents"],
"models": {
"cheap": "anthropic/claude-haiku-5-5:low",
"balanced": "anthropic/claude-sonnet-5-5:high",
"strong": "anthropic/claude-opus-5-5:high"
}
}
}
Agents are Markdown files with frontmatter, the body becomes the child's system prompt:
---
name: scout
description: Explore the codebase
tools: read, grep
model: cheap
isolated: false
---
Explore the codebase and report relevant paths.
nameis required and must be uniquedescripionis requiredtoolsis optional, a comma-separated list of tool names. Defaults to the session tools.modelis optional, a tier name orprovider/model[:thinking]. Defaults to the session model.isolatedis optional, defaults tofalse. See Isolation.
Isolation
isolated: true (on a delegate call or in agent frontmatter) runs the delegate in its own git clone at
.pi/worktrees/<id>, starting from your current working tree including uncommitted changes.
delegate_apply merges the result into your working tree as uncommitted changes.
delegate_discard discards the clone and its changes.
Any later delegate can share that clone with clone: <job id>, for review, tests, or follow-up work.
Development
From this package directory:
npm install
npm test
pi install .