Skip to content

Installation and first use ​

Requirements ​

  • Version 0.39.2 requires Pi 0.87.1 or later (>=0.87.1) and re-applies its marked policy block in the final provider payload.
  • Version 0.14.1 supports Pi 0.84.3 or later (>=0.84.3).
  • An authenticated Pi model in the current scope for every ordinary role you enable. Visual Design, Vision, Writing and Advisor are optional.

1. Install and reload ​

bash
pi install npm:pi-delegation-policy@0.39.2

Restart Pi or run /reload. Installing or upgrading changes no configuration: a session with no saved intensity starts at off.

2. Configure or disable the ordinary roles ​

Open /delegate in Pi's TUI, or press Alt+G. Small, Medium, and Large each need an explicit decision: an exact provider/model that Pi offers, or Disable for this session. A disabled role is a decision, not a missing model, and it is not validated. At least one ordinary role must stay enabled. Visual Design and Advisor are optional and do not count toward that minimum.

Every model selector pins Use global default and Disable for this session above the searchable list. The list shows the model ID first and [provider] last, and searches provider, model ID, and display name. When Pi supplies public model metadata, the focused row can show name, API, reasoning support, context window, and maximum output; that metadata is transient and is never stored. The panel uses text, not only colour, to distinguish disabled, not configured, and an exact reference.

Thinking is optional for each ordinary role and for Visual Design, and Advisor thinking is not a setting. Leave a thinking row unset to let the main agent choose a level for each launch, or configure one fixed level or an inclusive range. The panel lists only the levels that role's model supports, and a configured level is validated locally when the policy is loaded.

Changes stay in a draft until Apply to this conversation (A); closing a modified draft asks whether to keep editing or discard. For pi-subagents, a delegated launch carries the selected base and level as model: "provider/model:LEVEL", where LEVEL is the fixed level, a level inside the range, or the level chosen for that run.

3. Activate and inspect ​

Choose normal when the expected delegation benefit clearly outweighs briefing, supervision, review, and integration. Choose aggressive for suitable substantial, separable, independently checkable work. Choose orchestrator to delegate all transferable execution before it begins whenever an enabled capable role and an authorized launcher exist, regardless of size; direct work then needs a briefly stated exception, and final acceptance stays with the main agent. off injects no execution-delegation guidance.

Apply the draft, then run /delegate status. D:NORM, D:AGG, and D:ORCH mean every ordinary role is enabled with a valid exact reference or explicitly disabled, and at least one is enabled. D:ERR means a role is not configured, an enabled reference is unavailable, out of scope, or unauthenticated, no ordinary role is enabled, or a configured thinking level is unsupported; it removes delegation guidance. See commands and status to diagnose it.

4. Enable the Advisor when you want it ​

Configure Advisor 1 and optional Advisor 2 and Advisor 3 in /delegate, then select Advisor mode. The default mode is with-delegation, so a configured Advisor is consulted while delegation is active. Selecting on keeps consultation with delegation off, which shows as D:OFF A:ON.

Advisor launch defaults to tool, where the explicit consult_advisor() tool asks every valid entry through the authorized external executor, never from a hook. It requires stable pi-subagents SemVer >=0.76.1, with no upper bound, and the strict launch contract, and it rejects prereleases and invalid versions. It needs no arguments: the host composes the context from the task, and /delegate advisor context manual goes back to a question and a brief you write. Optional role mode asks the main agent to consult every valid entry in one background call instead. Every consultation runs in fresh context: the extension never sends the conversation, and it refuses a call that asks to fork the session for an Advisor. A fork default configured in pi-subagents itself is outside what the extension can read, so check that setting if your Advisors must never see it. Consultation sends a composed context, or the question and brief in manual mode, to another model and can add latency and cost, including with delegation off.

Validation is reported per axis: an enabled Advisor that is unusable produces A:ERR and removes only consultation, while A:PART means only some entries are valid and usable. Invalid delegation settings do not suppress a valid enabled Advisor. Configuration lists the per-axis cases, and limits and privacy states what each turn sends and retains.

5. Turn on ContextShunt only when needed ​

Choose Context protection in /delegate: start with observe, then choose enforce explicitly if the reported decisions help. off is the default and does no classification, metrics, archive I/O, or interception. observe changes neither a call nor its result. enforce covers recognized native reads, one conservative bounded Get-Content/gc form, and known successful text results. It never launches a worker, re-runs a command, or bypasses tool permissions. When it preserves a large known text result, context_shunt_recover returns one bounded line or byte range.

Limits and privacy states the caps, the reader contract, and what one request sends.

6. Know what is saved ​

  • Delegation defaults go to ~/.pi/agent/delegation-policy.json in schema 7, which also holds the ContextShunt configuration.
  • Advisor settings go to the delegation-policy.advisor.json companion next to it, and the main file never carries an Advisor mode.
  • Advisors 2 and 3 and launch mode live in delegation-policy.advisor-extension.json.
  • A branch saves a schema 2 off guard, extension entry, schema-8 companion, then schema-7 commit. A failure leaves the guard authoritative, so both features stay off for that branch.

Loading never rewrites a file: schemas 2 through 9 are normalized in memory only. Save as defaults (S) updates the global files, and the branch then inherits them. Persistence lists every file and the downgrade steps for older packages.

7. When a change takes effect ​

The policy is refreshed before each LLM request, so a change made during a turn affects that turn's next request. A request already in progress keeps its starting state, and host-owned role subagents keep their original one. Tool groups cancel on detected authorization changes. Turning everything off removes the injected block on the next application. Version 0.14.1 applies changes on the next agent run.

Local checkout (secondary) ​

For development, from the checkout's parent directory:

bash
pi install ./pi-delegation-policy

Next steps ​