pi-subagents 0.51.0 makes workflow orchestration safer and less fragile across long-running sessions. You can steer workflow children more directly, use external job providers, and set default context behavior with less per-call setup. Async runs now recover better from storage pressure, reloads, path limits, and multi-window sessions. This release also cleans up older workflow APIs, so the supported scripted workflow path is easier to explain and maintain.
Highlights:
- Steer workflow children by stable key from
workflowScript, with clearer receipts and safer launch tracking. - Use external job providers and the Surf GPT Pro profile through the new external-job runner path.
- Reload Pi on macOS with fewer watcher hangs and less idle filesystem work.
- Recover more async results after storage pressure, path-limit issues, or transient filesystem access errors.
- Open Herdr panes in the background by default, so inspector/project panes do not steal focus unless requested.
Need to know:
| Area | Change |
|---|---|
| Workflow scripts | prompts.render is removed from workflowScript. Pass explicit task text to runs.run or use /prompt-workflow for reusable prompt templates.
|
| Legacy chain controls | Old chain approval checkpoint controls and compatibility fields were removed. Use scripted workflows instead. |
| Async projection | Async workflows do not support inline live-card projection. Use the documented async status surfaces instead.
|
Added
- Add stable-key
runs.steertoworkflowScript, with routing for foreground and async children, structured receipts, trace entries, and checks for unawaited calls (#1186). - Add
runner.type: external-job, the exported provider bridge, the Surf GPT Progpt-proprofile, and docs for external advisor data boundaries (#1189). - Add
defaultSubagentContext: "fork"for launches that do not set an explicit context (#1161). - Allow
defaultSubagentContext: "fresh"to override agent fork defaults for launches that do not set an explicit context. - Add
PI_SUBAGENT_FS_RETRY_MAX_TOTAL_MSso hosts can cap filesystem retry waits. Unset by default. Thanks to @MarcusNeufeldt for #1143.
Changed
- Document rolling
workflowScriptfanout withruns.run,Promise.race,runs.steer, andPromise.all(#1187). - Document scripted chaining as the supported workflow API, with migration examples for removed top-level chain and task inputs.
- Clarify
workflowScriptfanout guidance: use awaitedruns.allfor ordinary parallel work, and use storedruns.runpromises only for fully observed advanced rolling fanout (#1229, #1230). - Clarify that async workflows do not have inline
live-cardprojection (#1229, #1230). - Describe
async:falseas a blocking parent wait, not a UI or foreground-only mode. - Clarify that subagent reviews and gates should stay async unless the parent must block until completion.
- Document that a host's session lifetime owns completion wakes, and how to key an idle check on live run state rather than parent activity. Thanks to @MarcusNeufeldt for #1144.
- Register the default
subagenttool prompt as split metadata with a short description,promptSnippet, andpromptGuidelines, while keeping explicitfull,compact, andcustomdescription modes. - Keep
worktree: trueworkflow children on the single-child path while preserving managed patch handoffs.
Removed
- Remove unused foreground chain and parallel execution and durable chain management surfaces.
- Remove legacy subagent tool compatibility fields for append-step control, schedule aliases, async recovery metadata, and string mission goals.
- Remove chain approval checkpoint steps and the
approve-checkpoint/reject-checkpointcontrols. - Remove
prompts.renderfromworkflowScript; pass explicit task text toruns.runor use/prompt-workflowfor reusable prompt templates.
Fixed
- Avoid Darwin reload hangs by disabling idle native filesystem watchers and using demand-gated delivery for live results, supervisor messages, controls, and steering. Thanks to @youlikemodernart for #1220.
- Bound async result session, run, active-run, and result-index path segments so long provider IDs do not break launches or waits with
ENAMETOOLONG. Thanks to @hlstwizard for #1131 and @zhouatie for #1135. - Hash result-index session segments that look like Windows paths or file names, keep reading previous URI-encoded keys, and treat
EPERMandEACCESas empty scans. Thanks to @apoapostolov for #1211. - Sanitize foreground workflow output path segments derived from provider run IDs, so Windows launches do not fail when tool-call IDs contain path-invalid characters. Thanks to @maxime-louward-shift for #1235.
- Keep async status and result persistence retrying after temporary
ENOSPC, quota, or file-descriptor exhaustion errors. Thanks to @ahmadaccino for #1227. - Route async completion notifications and cleanup only to the parent Pi process that launched the run, so concurrent windows sharing one session file cannot consume each other's results. Thanks to @wangjianming for #1225.
- Keep extension reload cleanup scoped to the replaced session runtime, so concurrent Pi sessions in one process do not remove each other's subscriptions or parent-session identity. Thanks to @ryanbbrown for #1222.
- Stop failing child runs when an explicit allowlist names
contact_supervisorwithout the legacyintercomcompanion. A loneintercomentry still requires a real external provider. Thanks to @MingTeer for #1207. - Add explicit
isolation: "none"for schema-driven workflows without Git worktree setup, while keeping strictisolation: "worktree"behavior. Thanks to @tlsneo for #1203. - Fail closed when an existing external-job
status.jsonis unreadable or malformed, including an invalidstepsshape. - Skip malformed agent definitions during discovery so valid agents still list and launch, while showing configuration errors in management diagnostics (#1200).
- Resolve
/subagents-generate-profilesprovider probes through the shared Pi executable resolver so configured and Windows-specific Pi commands work. Thanks to @Wumpf for #1199. - Resolve the workflowScript parser from pi-subagents instead of the caller's working directory, so workflows start in projects that do not install Acorn. Thanks to @xz-dev for #1214, following up #1190.
- Keep workflowScript child-launch tracking working on Bun-built Pi without a hard dependency on V8 promise hooks. Thanks to @rochecompaan for #1158 and @rholak for the version-window diagnosis.
- Treat provider subscription usage-limit errors as retryable model failures so
fallbackModelscan continue to the next configured model. Thanks to @dwizzle204 for #1215. - Skip fallback models that are unavailable in the active registry, so shared agent configs still run where their primary model is available. Thanks to @JPFrancoia for #1147.
- Preserve workflow async session roots for Herdr inspectors so workflow runs open with the same trusted session-root context as standalone runs. Thanks to @hank-warren for #1219.
- Keep Herdr project and inspector panes in the background by default, and move focus only when callers set
focus: true. The FleetView inspect key still focuses the pane it opens. Thanks to @boggylp for #1226. - Show FleetView transcript fallbacks for trusted session roots instead of warning about an untrusted session file. Thanks to @aliceisjustplaying for #1154.
- Route Fleet inspector steering for live in-process workflow children through their foreground routes instead of the detached async queue. Thanks to @ViktorBarzin for #1218 and #1216.
- Serialize same-worktree Orca progress-tab creation so numbered tabs appear left to right in sequence. Thanks to @hyein-cbio for #1196.
- Bound repeated async-state queries to active, exact-id, and recent-terminal indexes instead of scanning the full async history (#1162).
- Move retention directory discovery to a read-only worker so full scans do not block the extension event loop (#1188).
- Reclaim proven-safe async run and orphan result state after 30 days in bounded, locked cleanup passes with rename-first tombstones (#1163).
- Sweep expired wait subscriptions armed by another session, so stale records stop accumulating in the subscriptions directory. Thanks to @MarcusNeufeldt for #1142.
- Restore and list schedules after their project directory is deleted, and skip orphan schedule directories without letting create reuse stale state. Thanks to @ELA718 for #1171 and @colinb4987 for #1167.
- Fall back from an implicit
defaultContext: forktofreshwhen the parent session file or current leaf is not available yet. Explicitcontext: "fork"remains fail-fast. Thanks to @hyein-cbio for #1137. - Keep retained workflow children resumable when their managed worktree cwd is preserved in the handoff manifest (#1172).
- Preserve workflow child task output when neither the workflow nor child configures an output file (#1136).
- Preserve a child's file-only report when its output path also names the workflow summary output.
- Keep concurrent async result promotion from deleting a newer payload or another promoter's published result. Thanks to @albertgwo for #1130.
- Keep
mcp:<server>direct tools available when pi-mcp-adapter cache identity includes a request-header command. Thanks to @xz-dev for #1141. - Isolate test async state from the user temp root and write each missing-mission sync diagnostic only once (#1164, #1165).
- Keep structured delegation integration coverage active when the test process inherits a subagent-child environment marker.