pi-better-harness combines an opt-in foreground write sandbox, delegated subagents, durable background shell tasks, synchronous SSH commands, Goal continuation, and optional Goal & Todo.
Use Pi Better Harness when a Pi session needs to keep moving while related work runs elsewhere. Install the component packages and Harness-owned runtime with npx pi-better-harness install, or install only an individual component. Goal and Todo are available immediately. Automatic Goal execution defaults to Off in /harness-settings.
Install every harness extension with a standalone package identity:
npx pi-better-harness installRemove them all with npx pi-better-harness uninstall. Add --local to either command for project-local Pi settings.
Install only one part:
pi install npm:pi-better-sandbox
pi install npm:pi-better-subagents
pi install npm:pi-better-background-tasks
pi install npm:pi-better-ssh
pi install npm:pi-better-server
pi install npm:pi-better-goal
pi install npm:pi-better-model-routerThe backward-compatible bundled installation remains available:
pi install npm:pi-better-harnessBoth Harness install methods include the shared server for subagents and background tasks. Remote session commands are off by default. Set PI_BETTER_SERVER_ENABLE_REMOTE=1 before starting Pi to enable /remote and /detach. The same variable enables the pi-remote CLI.
With Harness installed through either route, use
/tool-output minimal to keep the conversation readable. Live calls show one
quiet, indented row with a tool-specific icon and inline arguments; result
bodies stay hidden. The icon is accent-colored while running, muted when
completed, and error-colored when failed. Names stay muted and arguments use
a distinct dim tone. Running and failed calls also retain text labels.
Once the foreground run fully settles, each consecutive block of tools folds
into one expandable line such as ▸ 4 tool calls · 1 failed. Assistant text
stays visible, and only the failure count uses the error color. Extension and
MCP calls fold the same way. The agent still receives the complete result;
execution, sandboxing, paging, and execution defaults are unchanged.
/tool-output normal restores each tool's ordinary renderer; /tool-output
toggles between the two modes. Ctrl+O reveals all original tool details and
folds them again on the next toggle. In Pi fullscreen mode with clickable rows,
click a folded block to reveal its call rows, then click a call for its original
details. Hover highlights clickable rows; icons sit centered in a three-column
gutter. Click the disclosure again to refold the block. The preference is saved
in the current session and restored on resume/reload; new sessions start in
normal mode.
This is an internal TUI adapter, tested with Pi 0.82.1, 0.99.1, and the bundled Pi 1.0.0 CLI, not a public renderer API. Future Pi upgrades may require adapter changes. An incompatible display API leaves ordinary output enabled and reports a warning. It does not apply to print/RPC mode or exported transcripts.
The installer includes this Harness-owned extension. To load it directly from a checkout:
pi -e ./packages/pi-better-harness/extensions/minimal-output/index.tsUse this repo when you want Pi to delegate independent work, supervise long shell commands, or keep an explicit objective open until background work has drained.
Do not use the bundle when you only need one extension; install that package directly instead.
pi-better-sandbox: an opt-in write sandbox for Pi's foreground tools.pi-better-subagents: detached, sandboxed subagent runs.pi-better-background-tasks: durable shell tasks, watchers, logs, and status inspection.pi-better-serverprovides the shared task runtime and opt-in remote session commands.pi-better-ssh: safe synchronous remote commands over reusable SSH connections.pi-better-goal: explicit triggers, pause/resume, and background-aware continuation.pi-better-model-router: price-based routing between DeepSeek and Ollama Cloud.- Harness Goal & Todo: session objectives and checklist progress, with optional automatic Goal execution.
To add model routing, install pi-better-model-router separately and select router/deepseek-flash-auto in /model. The router package includes the Ollama Cloud provider and requires Pi's registerVirtualModel API.
pi-better-read-aloud lives in this repo but is not published or included in the meta package yet.
| Requirement | Support |
|---|---|
| Pi | Required |
| Install method | pi install npm:... |
| Development runtime | Node.js 22+ |
External consumers can discover the shared role definitions through
agent-catalog.yaml. Subscribe to
1aboveio/pi-better-harness on main, resolve each update to a commit SHA,
and read the manifest and definitions from that same commit. Definition updates
do not require an npm release. The catalog currently contains roles only.
Run npm run catalog:check to validate the published catalog. See the
repository subscription contract
for discovery, revision handling, and consumer requirements. This repo publishes
the source contract; Agentier #2639
tracks the subscriber implementation.
Use Node.js 22 or newer.
npm install
npm run verifyLoad this checkout directly in Pi while developing:
pi -e .