@deathbeam/pi-delegate

Minimal extension for delegating tasks to subagents.

Packages

Package details

extension

Install @deathbeam/pi-delegate from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@deathbeam/pi-delegate
Package
@deathbeam/pi-delegate
Version
0.0.36
Published
Oct 26, 2026
Downloads
3,791/mo · 87/wk
Author
deathbeam
License
MIT
Types
extension
Size
112.3 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@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.
  • name is required and must be unique
  • descripion is required
  • tools is optional, a comma-separated list of tool names. Defaults to the session tools.
  • model is optional, a tier name or provider/model[:thinking]. Defaults to the session model.
  • isolated is optional, defaults to false. 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 .