Added
- Added optional
toolBudgetlimits for child subagent tool calls. Runs, steps, and agents can set{ soft?, hard, block? }; the child runtime nudges at the soft limit and blocks configured tools after the hard limit so runaway browsing can still finish with final text. - Added a stable v1 in-process event-bus RPC for other Pi extensions, with
ping,status, async-onlyspawn,interrupt, and asyncstopover versioned request/reply envelopes. - Added
toolDescriptionModewithfull,compact, andcustommodes for the parent-facingsubagenttool description. Compact mode reduces prompt bloat while keeping safety-critical orchestration guidance, and invalid custom descriptions fall back to full mode. - Added an optional read-only subagent fleet/status view with
/subagents-fleetandsubagent({ action: "status", view: "fleet" }), plusview: "transcript"to tail active async child output/session artifacts. - Added uniform per-child transcript artifacts (
<run>_<agent>_transcript.jsonl) for foreground and async subagent runs, gated bysubagents.artifacts.includeTranscript(default on). Each transcript is a versioned JSONL stream of child messages, tool starts/ends, and stdout/stderr lines with a byte cap and truncation marker. - Added
subagent({ action: "steer", id, message, index? })for non-terminal guidance to live async Pi child sessions, with file-backed control requests, per-child steering inboxes, status/event visibility, and queued delivery for pending indexed async children when the runtime supports mid-run steering. - Added an optional
turnBudget(maxTurnswithgraceTurns) for foreground and async/background subagent runs. At the softmaxTurnslimit the child is warned via its system prompt to wrap up; aftergraceTurnsadditional assistant turns the run is aborted and partial output is returned.turnBudget,turnBudgetExceeded, andwrapUpRequestedpropagate through results, async status, and nested summaries. - Added optional scheduled subagent runs so callers can defer a subagent launch until a future time.
subagent({ action: "schedule", agent, task?, schedule: "+10m" | "2030-01-01T09:00:00Z", scheduleName? })arms a one-shot timer that launches the run as a normal tracked async run once it fires, withschedule-list,schedule-status, andschedule-cancelmanagement actions. Schedules are persisted per session and restored after a Pi restart; jobs missed by more than the configured lateness window are markedmissedinstead of firing late. The feature is opt-in and requires{ "scheduledRuns": { "enabled": true } }in~/.pi/agent/extensions/subagent/config.json. Only schedule explicit delayed runs the user asked for. Thanks to @tintinweb for the concept. - Added a real Pi-session E2E test lane with faux provider routing to verify parent-child subagent result delivery without network model calls.
- Hardened the
waittool's wake path so an event wake cancels its poll-interval fallback timer instead of letting both run, and so an already-aborted turn resolves immediately. Added a test that verifies an event wakeswaitbefore the poll interval elapses. - Added smart completion batching for async subagent notifications. Successful sibling completions that finish within a short window now arrive as a single grouped message instead of separate notifications; a hard max-wait cap prevents holding them indefinitely, and late-finishing siblings join a shorter straggler group. Failed and paused completions bypass batching and fire immediately so failure and attention signals are never delayed. The debounce window, max-wait cap, and straggler windows are configurable via
completionBatchinconfig.json. - Added
subagent({ action: "eject" }),disable,enable, andresetmanagement actions for bundled and custom agents.ejectcopies a builtin or package agent to user/project scope as an editable custom file that shadows the original;disable/enabletoggle a reversibleagentOverrides.<name>.disabledsettings override without deleting the agent;resetremoves the scope's custom agent file and/or settings override to restore the bundled default. All four acceptagentScope: "user" | "project"(defaultuser) and are blocked from child-safe fanout mode alongsidecreate/update/delete. - Added fuzzy model resolution so callers can specify models with provider separator variations, optional date-stamp parts, and case differences instead of exact
provider/modelIdstrings. Whensubagents.modelScope: { enforce: true, allow: [...] }is configured, explicit caller-supplied out-of-scope models error while frontmatter/parent-inherited/fallback models warn. Inspired by @tintinweb's pi-subagents. - Added a parent-side
waittool for detached async subagent runs.wait()returns when the next active run finishes or needs attention,wait({ all: true })drains all active runs,wait({ id })targets one run, andwait({ timeoutMs })caps the block. This lets background-launching skills and non-interactivepi -pruns keep going without sleep/status-polling loops or abandoned children. Thanks to RoboBryce (@robobryce) for #365. - Added an opt-in
memoryfrontmatter field for agent definitions so recurring custom agents can maintain role-specific durable memory (e.g. a security reviewer accumulating threat-model notes).memory: { scope: "project" | "user", path: "<name>" }resolves a safeagent-memory/directory, injects the first 200 lines of aMEMORY.mdinto the child system prompt, and falls back to a read-only memory block for agents without write tools. Memory lives under a dedicated namespace that does not conflict with Pi's parent/session/project memory system. Inspired by @tintinweb's pi-subagents. - Added native supervisor coordination for child subagents. Children can use
contact_supervisorwithout installingpi-intercom, and parent-side requests are scoped to the exact session id that spawned the child. - Added native prompt workflow commands:
/prompt-workflowruns a prompt template through a subagent, and/chain-promptsturns prompt templates into native subagent chain steps.
Fixed
- Let foreground sequential chain tool calls launch directly when
clarifyis omitted; useclarify: trueto opt into the clarify UI. Addresses #385. - Tolerate execution-mode action aliases such as
single,parallel,PARALLEL, andtaskswhen the matching execution fields are present, while preserving clear runtime errors for unknown management actions, addressing #382. - Removed companion-package recommendation messages from session start,
subagent({ action: "list" }), and/subagents-doctor, addressing #381. - Scope async subagent completion notifications to the exact owning Pi session so another session in the same repo no longer receives result notices.
- Harden scheduled-run timestamp parsing and persisted store validation so ambiguous absolute times and corrupted job records fail clearly instead of being normalized or dropped.
- Derive live-detail and full-notification hints from Pi's configured expand key instead of hard-coding
Ctrl+O. Thanks to Kylegl (@kylegl) for #364. - Tolerate transient Windows
EPERM/EBUSY/EACCESlocks when atomically replacing async JSON files. Thanks to ThanhNT29Jacky (@ThanhNT29Jacky) for #380. - Hardened the async timeout integration test to wait for the mock child to spawn before asserting the timeout result, fixing a race where the timeout could fire before the child existed.