Pi Subagents 0.59.0 makes scripted workflows easier to run, watch, and recover. You can now add host-owned command steps to workflow scripts, build parallel sequential lanes, and see clearer status for child sessions and worktree handoffs. Long-running delegation should feel less fragile when contexts reload, providers abort, files are missing, or Windows temporarily locks an output file. This release also improves live controls for non-TUI and RPC hosts.
Highlights
- Run host commands from workflow scripts with safer saved output and clearer command results.
- Build sequential parallel workflows with
runs.lanes(...), launch preflight labels, and better retained-resume behavior. - See cleaner async status, child labels, and worktree handoff details without extra setup.
- Recover more reliably from stale contexts, provider aborts, missing outputs, malformed MCP metadata, and Windows file locks.
- Control live workflow children from more places, including non-TUI and RPC hosts.
Full changelog
Highlights
- Run host commands from workflow scripts with safer saved output and clearer command results.
- Build sequential parallel workflows with
runs.lanes(...), launch preflight labels, and better retained-resume behavior. - See cleaner async status, child labels, and worktree handoff details without extra setup.
- Recover more reliably from stale contexts, provider aborts, missing outputs, malformed MCP metadata, and Windows file locks.
- Control live workflow children from more places, including non-TUI and RPC hosts.
Added
- Add
runs.host(...)command steps toworkflowScript, with required timeouts, saved output, and status and receipt evidence (#1648). - Add CI and gate monitor rows that record monitor kind, terminal verdict, freshness, and report pointers in workflow status and receipts.
- Persist workflow lane metadata in child status, receipts, and existing worktree handoff manifests, including display-only worktree paths and branches.
- Add
runs.lanes(...)for parallel sequential workflow stages with per-lane results and retained-resume support (#1633). - Add display-only
preflightlane metadata for workflowScript launches, with coverage warnings and planned-lane rendering in launch, status, and live-card views. - Add a plan-only
worktree.cleanupmanagement action that records a cleanup plan without removing worktrees or branches. - Give every subagent child session a human-readable display name, and include it in result, progress, status, workflow, nested, and intercom payloads. Thanks to @yanqianglu for #1615.
- Add
/subagents-steer <run-id> [--child <child-id>] <message>so non-TUI sessions and RPC hosts can steer live async runs. Thanks to @yanqianglu for #1608. - Add explicit
allowNestedSubagentsagent authorization for nested fanout without replacing inherited tools or extensions. Thanks to @tutu359 for #1587. - Accept a child id on
/subagents-stop <run-id> <child-id>so one child of a multi-child async run can be stopped without stopping the whole run. Thanks to @yanqianglu for #1603.
Changed
- Reduce noisy launch, status, output, settings, and worktree cleanup messages without changing behavior.
- Include a direct resumable child id in missing workflow receipt guidance when retained status proves it is safe.
- Clarify
workflowScriptcontracts for retained resume keys and durable child output paths. - Record merge or supersession evidence in existing worktree handoff manifests and show cleanup eligibility without removing anything.
- Show optional lane and work-item context in async status rows, including phase, gate, next action, output, run reference, and stale or blocked state.
- Show workflow child labels and phases in async status progress while preserving stable workflow keys.
- Remove assistant turn budgets, including hard termination, wrap-up prompt injection, and launch configuration.
- Split internal launch, status, settlement, evidence, and direct-MCP planning code into smaller modules without changing public behavior.
Fixed
- Match detached workflow completion by exact child identity, keep host gate rows in snapshots, and report missing host verdicts as inconclusive.
- Replace explicit
runs.host(...)output files atomically inside their verified directory, and retry transient Windows destination locks. - Reject malformed MCP direct-tool server and metadata-cache fields when JSON is loaded.
- Preserve live composite child tool-call ids for
cursor-native, so Cursor MCP results keep matching pending execs. Thanks to @moofone for #1677 and #1678. - Ignore stale cached UI contexts during background status refresh and session lifecycle cleanup (#1670).
- Compact workflow preflight status in default TUI and status views while keeping full details available when expanded (#1668).
- Give
runs.lanes(...)stage-0 retained-resume validation actionableruns.run(...)guidance instead of a generic error (#1657). - Remove the remaining
lane:prefix from operator-facing async status rows in the TUI (#1658). - Allow scheduled project roots shared through a registered Git worktree's
.pisymlink while rejecting unrelated or unproven Git-layout escapes. Thanks to @sususu98 for #1656. - Include delegated child usage in subagent tool results and
/subagent-cost, including completed async workflow children and parent compaction usage with persisted workflow-receipt recovery when needed (#1662, #1666). Thanks to @Geraldo-Morais for #1662 and @jf88888 for #1666. - Avoid false preflight mismatch warnings for generated
runs.lanes(...)stage keys (#1649). - Accept long host tool-call ids in workflow child summaries, matching the existing 4,096-byte session id bound. Thanks to @SudoKillMe for #1653.
- Keep an async
workflowScriptcontinuation live while an awaited child coordinates with its supervisor, so later sequential steps still run (#1634). - Stop stale extension and slash-command contexts from escaping during reload or session replacement.
- Include saved workflow child output paths and inline previews in completion notices (#1629).
- Format million-scale context limits as
1Minstead of1000kin live status displays. - Restore active workflow children under their workflow parent in Fleet Status after reload, while keeping unmatched shell rows visible.
- Prefer loaded workspace context over repeated internal workflow keys in async TUI lane rows (#1619).
- Accept path-like Pi session ids up to 4,096 characters when snapshotting background work. Thanks to @dvishoot for #1616.
- Accept bare leaf model ids reported by provider drivers when verifying provider-qualified launch candidates. Thanks to @lallenlowe for #1609.
- Resume compaction-induced child aborts once when retained state is safe, and report the exact recovery blocker otherwise.
- Report aborted or signalled no-output child runs with their terminal stop, stderr, or process signal before missing-output handoff diagnostics.
- Apply
globalConcurrencyLimittoworkflowScriptchildren launched throughruns.runandruns.all, not only legacy multi-child runners. Thanks to @mateominato for #1600. - Ignore nested
.piandsync-backupsdirectories during agent discovery so stale backup definitions cannot become executable agents. Thanks to @arlishansenn for #1596. - Let projects layer agent overrides by the active parent model provider without duplicating agent definitions. Thanks to @arichiardi for #1597.
- Let operators configure the default
subagent_waitwindow and report window expiry as non-error active work while preserving strict headless draining. Thanks to @Shujakuinkuraudo for #1591. - Degrade run status to the stored fan-out budget snapshot when persisted state is unavailable, instead of failing the entire run list. Thanks to @qsgy-edge for #1595.
- Enforce MCP server
includeToolsandexcludeToolspolicies for child direct-tool grants, including adapter-compatible glob matching. Thanks to @Shujakuinkuraudo for #1590. - Prevent Fleet prompt audit rendering from crashing on malformed non-string task payloads. Thanks to @bengidev for #1586.
- Resume a retained child session once after a provider or transport abort follows useful progress, without restarting the task or involving the parent model.
- Retry unused fallback models after a provider reports a plain-text
500orinternal server error. Thanks to @rafafortes for #1642. - Mark missing required child handoffs with useful mutation evidence as partial needs-attention results.