@herbertgao/pi-extensions 2026.11.17 → 2026.11.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +3 -3
- package/THIRD_PARTY_NOTICES.md +2 -23
- package/node_modules/@estebanforge/pi-antigravity-bridge/CHANGELOG.md +956 -0
- package/node_modules/{pi-antigravity → @estebanforge/pi-antigravity-bridge}/LICENSE +1 -1
- package/node_modules/@estebanforge/pi-antigravity-bridge/README.md +240 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/extensions/index.ts +2117 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/package.json +61 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/acp/connection.ts +644 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/acp/driver.ts +1043 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/acp/events.ts +323 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/acp/home.ts +145 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/acp/jsonrpc.ts +243 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/acp/setup.ts +107 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/acp/usage-estimate.ts +61 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/agents.ts +64 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/agy-install.ts +93 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/agy-paths.ts +30 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/agy-setup.ts +81 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/agy-version.ts +289 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/approval-detect.ts +161 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/approval-gate.ts +233 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/approval-hook.ts +325 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/artifacts-ui.ts +88 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/artifacts.ts +144 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/ask-tool.ts +1221 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/background-watch.ts +225 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/bridge-catalog.ts +197 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/config.ts +523 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/daily-log.ts +196 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/dialog-lock.ts +48 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/diff-render.ts +207 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/driver-types.ts +168 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/driver.ts +907 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/engine-picker.ts +160 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/frame-guard.ts +38 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/handoff-toast.ts +21 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/mcp-registration.ts +376 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/mcp-server.ts +618 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/models.ts +404 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/native-tools.ts +104 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/parked-turn.ts +125 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/patch-cleanup.ts +523 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/poll-fold.ts +55 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/prompt-images.ts +92 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/provider.ts +2214 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/queued-messages.ts +152 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/quota-notice.ts +40 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/redact.ts +27 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/sessions.ts +197 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/skills.ts +207 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/stream-events.ts +161 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/stream-sanitizer.ts +180 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/subagent-roster.ts +245 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/sysprompt-agent.ts +130 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/tasks-ui.ts +90 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/tasks.ts +174 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/usage.ts +174 -0
- package/node_modules/@estebanforge/pi-antigravity-bridge/src/web-tools.ts +320 -0
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +12 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/prompt-editor.ts +3 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/index.ts +7 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/agent-badge.ts +244 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/ccstyle-tool.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +10 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +18 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +1 -1
- package/node_modules/@herbertgao/pi-inline-skill-commands/README.md +18 -0
- package/node_modules/@herbertgao/pi-inline-skill-commands/package.json +1 -1
- package/node_modules/@herbertgao/pi-inline-skill-commands/src/index.ts +80 -0
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +320 -102
- package/node_modules/@herbertgao/pi-subagents/SECURITY.md +2 -2
- package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +240 -30
- package/node_modules/@herbertgao/pi-subagents/docs/translations.md +63 -0
- package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +1 -1
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/agent-file-toggle.ts +2 -0
- package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +89 -6
- package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +6 -2
- package/node_modules/@herbertgao/pi-subagents/src/agent-types.ts +27 -13
- package/node_modules/@herbertgao/pi-subagents/src/cache-retention.ts +39 -0
- package/node_modules/@herbertgao/pi-subagents/src/completion-outbox.ts +5 -0
- package/node_modules/@herbertgao/pi-subagents/src/cross-extension-rpc.ts +217 -41
- package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +7 -0
- package/node_modules/@herbertgao/pi-subagents/src/group-join.ts +9 -0
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +126 -93
- package/node_modules/@herbertgao/pi-subagents/src/mention-clone.ts +3 -2
- package/node_modules/@herbertgao/pi-subagents/src/settings.ts +21 -0
- package/node_modules/@herbertgao/pi-subagents/src/subagent-info.ts +115 -0
- package/node_modules/@herbertgao/pi-subagents/src/types.ts +11 -7
- package/node_modules/@herbertgao/pi-subagents/src/ui/agent-widget.ts +2 -3
- package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/workflow/meta.ts +2 -2
- package/node_modules/@herbertgao/pi-subagents/src/workflow-info.ts +184 -0
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +10 -0
- package/node_modules/pi-commandcode-provider/README.md +3 -2
- package/node_modules/pi-commandcode-provider/index.ts +120 -13
- package/node_modules/pi-commandcode-provider/package.json +4 -3
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +11 -2
- package/node_modules/pi-commandcode-provider/src/pricing.ts +17 -1
- package/node_modules/pi-commandcode-provider/src/quota-command.ts +3 -2
- package/node_modules/pi-commandcode-provider/src/zdr.ts +163 -0
- package/package.json +12 -15
- package/node_modules/pi-antigravity/README.md +0 -298
- package/node_modules/pi-antigravity/docs/reader-guarantees.md +0 -35
- package/node_modules/pi-antigravity/package.json +0 -87
- package/node_modules/pi-antigravity/src/auth/accounts.ts +0 -327
- package/node_modules/pi-antigravity/src/auth/index.ts +0 -23
- package/node_modules/pi-antigravity/src/auth/oauth.ts +0 -445
- package/node_modules/pi-antigravity/src/client/client.ts +0 -602
- package/node_modules/pi-antigravity/src/client/enterprise.ts +0 -150
- package/node_modules/pi-antigravity/src/client/index.ts +0 -2
- package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +0 -104
- package/node_modules/pi-antigravity/src/diagnostics/index.ts +0 -1
- package/node_modules/pi-antigravity/src/features/generate-image.ts +0 -132
- package/node_modules/pi-antigravity/src/features/google-search.ts +0 -72
- package/node_modules/pi-antigravity/src/features/read-url-content.ts +0 -124
- package/node_modules/pi-antigravity/src/image/image.ts +0 -427
- package/node_modules/pi-antigravity/src/image/index.ts +0 -1
- package/node_modules/pi-antigravity/src/image/native.ts +0 -69
- package/node_modules/pi-antigravity/src/index.ts +0 -547
- package/node_modules/pi-antigravity/src/models/discovery.ts +0 -176
- package/node_modules/pi-antigravity/src/models/grouping.ts +0 -487
- package/node_modules/pi-antigravity/src/models/index.ts +0 -3
- package/node_modules/pi-antigravity/src/models/models.ts +0 -647
- package/node_modules/pi-antigravity/src/search/index.ts +0 -1
- package/node_modules/pi-antigravity/src/search/search.ts +0 -967
- package/node_modules/pi-antigravity/src/stream/index.ts +0 -1
- package/node_modules/pi-antigravity/src/stream/stream.ts +0 -1961
- package/node_modules/pi-antigravity/src/types/enums.ts +0 -52
- package/node_modules/pi-antigravity/src/types/index.ts +0 -2
- package/node_modules/pi-antigravity/src/types/types.ts +0 -329
- package/node_modules/pi-antigravity/src/usage/index.ts +0 -1
- package/node_modules/pi-antigravity/src/usage/usage.ts +0 -437
- package/node_modules/pi-antigravity/src/utils/address.ts +0 -180
- package/node_modules/pi-antigravity/src/utils/credits.ts +0 -149
- package/node_modules/pi-antigravity/src/utils/html.ts +0 -31
- package/node_modules/pi-antigravity/src/utils/http.ts +0 -96
- package/node_modules/pi-antigravity/src/utils/index.ts +0 -5
- package/node_modules/pi-antigravity/src/utils/security.ts +0 -278
- package/node_modules/pi-antigravity/src/utils/text.ts +0 -66
- package/node_modules/pi-antigravity/src/utils/util.ts +0 -217
- package/node_modules/pi-antigravity/src/web-fetch/document.ts +0 -83
- package/node_modules/pi-antigravity/src/web-fetch/fences.ts +0 -24
- package/node_modules/pi-antigravity/src/web-fetch/header.ts +0 -97
- package/node_modules/pi-antigravity/src/web-fetch/index.ts +0 -3
- package/node_modules/pi-antigravity/src/web-fetch/inspect.ts +0 -328
- package/node_modules/pi-antigravity/src/web-fetch/limits.ts +0 -4
- package/node_modules/pi-antigravity/src/web-fetch/markdown.ts +0 -744
- package/node_modules/pi-antigravity/src/web-fetch/mdn.ts +0 -164
- package/node_modules/pi-antigravity/src/web-fetch/media.ts +0 -11
- package/node_modules/pi-antigravity/src/web-fetch/metadata.ts +0 -9
- package/node_modules/pi-antigravity/src/web-fetch/representation.ts +0 -93
- package/node_modules/pi-antigravity/src/web-fetch/save.ts +0 -71
- package/node_modules/pi-antigravity/src/web-fetch/sites.ts +0 -138
- package/node_modules/pi-antigravity/src/web-fetch/vendor.d.ts +0 -9
- package/node_modules/pi-antigravity/src/web-fetch/web-fetch.ts +0 -957
- package/node_modules/pi-antigravity/tsconfig.json +0 -21
|
@@ -1,209 +1,427 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.26.
|
|
3
|
+
## 0.26.2-local.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#408](https://github.com/HerbertGao/pi-extensions/pull/408) [`9019008`](https://github.com/HerbertGao/pi-extensions/commit/901900815d94885beae9d4290e69dd24451ca7ea) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Subagents sync to upstream 0.26.2: bus RPC observations for agents and workflows, per-agent prompt cache retention settings, and expanded workflow result metadata on the RPC bus. Local mention-clone tool context, worktree preservation, unconsumed-result retention, and the fullscreen workflow-card redraw guard are preserved.
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
7
|
-
- [#
|
|
11
|
+
- [#410](https://github.com/HerbertGao/pi-extensions/pull/410) [`9c3ce2b`](https://github.com/HerbertGao/pi-extensions/commit/9c3ce2b433eaa06d08d70ef60271f700a7abecd9) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Restore session-scoped agent type registration over the event bus (`subagents:rpc:register-agents`, `list-agents`, `unregister-agents`, and `subagents:agents-changed`) after the upstream 0.26.2 replay. `agency_register` and ccstyle Agent badge rows work again; `renderAgentName` prefers a `general-purpose` run's own name. A `register-agents` batch is now atomic—name collisions with file/default types reject the whole payload with no partial types or missing `agents-changed` notification. Upstream `0.26.2` get/list/workflow RPC behavior is unchanged.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
All notable changes to this project will be documented in this file.
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
16
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
## [Unreleased]
|
|
14
19
|
|
|
15
|
-
## 0.26.
|
|
20
|
+
## [0.26.2] - 2026-11-20
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
> **⚠️ Behavior change — lifecycle events now fire for nested and workflow agents** ([#442](https://github.com/tintinweb/pi-subagents/issues/442)). `subagents:created`, `started`, `completed`, `failed`, `steered` and `compacted` used to cover only the session's own agents. Nested and workflow agents now send them too, with `parentAgentId` or `workflowId` set. To keep the old behavior, ignore events where either field is set.
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
> **⚠️ Behavior change — the `subagents:rpc:stop` reply can arrive up to 5 s later** ([#443](https://github.com/tintinweb/pi-subagents/issues/443)). It now waits until the stopped agent and every agent below it have finished. A caller whose stop timeout is under 5 s should raise it, or pass a smaller `settleTimeoutMs`.
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
> **⭐ New — set the prompt cache retention for subagents** ([#464](https://github.com/tintinweb/pi-subagents/pull/464)). Let short-lived subagents skip the main session's long cache tier: set `cacheRetention`, or `cache_retention:` per agent.
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
### Added
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
- **Lifecycle events carry the validated report and the session file** ([#415](https://github.com/tintinweb/pi-subagents/issues/415) — thanks [@BenedictP](https://github.com/BenedictP)). Every lifecycle event now carries the same agent fields, including `structuredJson` for a `structuredOutput` spawn and `sessionFile` when the session is saved to disk, so a bus caller no longer needs the `Symbol.for("pi-subagents:manager")` registry to read them.
|
|
31
|
+
- **`subagents:rpc:get` and `subagents:rpc:list` return agent state** ([#442](https://github.com/tintinweb/pi-subagents/issues/442)). Use them when your extension loaded after the events it needed had already fired. They include nested and workflow agents. A record stays readable for 10 minutes after the agent finishes. `subagents:rpc:ping` now also returns a `features` list, so a caller can check which of these additions a build has.
|
|
32
|
+
- **`get` and `list` flag a finished agent whose completion message has not been delivered yet** ([#103](https://github.com/tintinweb/pi-subagents/issues/103) — thanks [@ramhaidar](https://github.com/ramhaidar)). The message can wait a while before it starts a parent turn (until a busy parent's turn ends, or up to 30 s in a `group`). During that wait `hasRunning()` is already false, so an auto-continue extension could send its prompt and then get a second turn. `notificationPending: true` covers that window; README shows the check.
|
|
33
|
+
- **Observe `SubagentWorkflow` runs on the bus** (superseding [#460](https://github.com/tintinweb/pi-subagents/pull/460) — thanks [@simenM84](https://github.com/simenM84)). A background workflow run emitted nothing on `pi.events`, so a host mirroring background work could not tell a run was still going after the parent's turn ended, or what it was doing. A run now brackets itself with `subagents:workflow_started` and `subagents:workflow_settled`, each carrying a `WorkflowInfo` summary. Its live per-agent detail (phases, previews, per-agent state) is pulled on demand with the new `subagents:rpc:workflow_get` / `workflow_list` channels rather than pushed — a run's progress fires per tool call and message per agent, too hot for the bus. `workflow_settled` and `workflow_get` also carry the script's return value as `result`, untruncated, so a host no longer has to parse the model's notification, which cuts it at 4000 characters ([#417](https://github.com/tintinweb/pi-subagents/issues/417)). `workflow_started` and `workflow_get` carry the call's `args`, and `workflow_get` returns the script's `log()` lines as `logs`. `ping` advertises `workflow-events`, `workflow-get`, `workflow-list`, `workflow-result`, `workflow-args` and `workflow-logs`.
|
|
34
|
+
- **Set the prompt cache retention for subagents** ([#464](https://github.com/tintinweb/pi-subagents/pull/464), superseding [#456](https://github.com/tintinweb/pi-subagents/pull/456) — thanks [@0oAstro](https://github.com/0oAstro)). Subagents inherited the main session's retention, so with `PI_CACHE_RETENTION=long` every short-lived subagent paid Anthropic's 1-hour cache-write rate. The new `cacheRetention` setting (`inherit`, `none`, `short`, `long`; also in `/agents → Settings`) and per-agent `cache_retention:` frontmatter set it for subagents only. The default `inherit` changes nothing.
|
|
26
35
|
|
|
27
|
-
###
|
|
36
|
+
### Changed
|
|
28
37
|
|
|
29
|
-
- [#
|
|
38
|
+
- **Lifecycle events cover nested and workflow agents** ([#442](https://github.com/tintinweb/pi-subagents/issues/442) — thanks [@sergio-agosti](https://github.com/sergio-agosti)). An extension following every agent had to scrape session files to see nested ones start or finish. They now send the lifecycle events with their parent or workflow set, and still get no completion message, saved record or widget row. A new `ownUsage` field holds each agent's own spend: `usage` includes the agents below it, so adding `usage` up across a tree counts twice.
|
|
30
39
|
|
|
31
|
-
|
|
40
|
+
### Fixed
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
- **`subagents:rpc:stop` replies only once the stopped agent and every agent below it have finished** ([#443](https://github.com/tintinweb/pi-subagents/issues/443) — thanks [@VolodymyrMachekhin](https://github.com/VolodymyrMachekhin)). A nested agent's tool call that ignored the abort could finish after the reply and overwrite the caller's replacement work. The reply now waits up to 5 s, or `settleTimeoutMs`, and returns `{ settled }`. After `settled: false`, `get` shows the agent as `settling`, and sending stop again waits again.
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
## [0.26.1] - 2026-11-17
|
|
36
45
|
|
|
37
|
-
|
|
46
|
+
> **⚠️ Note — a resumed agent keeps the model and thinking level it ran with** ([#462](https://github.com/tintinweb/pi-subagents/issues/462)). Editing `model:` or `thinking:` in its file no longer changes them on resume.
|
|
38
47
|
|
|
39
|
-
###
|
|
48
|
+
### Fixed
|
|
40
49
|
|
|
41
|
-
- [#
|
|
50
|
+
- **Resuming an old agent no longer switches it to your current model** ([#462](https://github.com/tintinweb/pi-subagents/issues/462) — thanks [@hazydream](https://github.com/hazydream) for the report and [@zane668](https://github.com/zane668) for the confirmation). Once an agent had been cleaned up (after ten minutes, a reload or a restart), resuming it silently ran it on the parent's model and thinking level, which could cost more. It now resumes on the model and thinking level it ran with.
|
|
51
|
+
- **`@agent` mentions no longer send the working directory twice** ([#459](https://github.com/tintinweb/pi-subagents/issues/459) — thanks [@sjdhome](https://github.com/sjdhome)). The agent's system prompt repeated the `<cwd>` section; it now appears once.
|
|
52
|
+
- **Subagents that delegate now see what each agent they can spawn does** ([#457](https://github.com/tintinweb/pi-subagents/issues/457) — thanks [@WinPooh32](https://github.com/WinPooh32)). Their `Agent` tool listed agent names only. It now lists each allowed agent's description and tools, like the main session's, and follows `toolDescriptionMode: "compact"`.
|
|
42
53
|
|
|
43
|
-
## 0.
|
|
54
|
+
## [0.26.0] - 2026-11-16
|
|
44
55
|
|
|
45
|
-
|
|
56
|
+
> **⚠️ Behavior change — a workflow starts only when you ask for one** ([#451](https://github.com/tintinweb/pi-subagents/pull/451)). A request for a number of agents, like "use 10 agents to …", now runs parallel `Agent` calls instead of a `SubagentWorkflow`. To run a workflow, say so ("use a workflow") or name a saved workflow.
|
|
46
57
|
|
|
47
|
-
- [#
|
|
58
|
+
> **⚠️ Behavior change — `agent({ schema })` is validated strictly against draft-07** ([#455](https://github.com/tintinweb/pi-subagents/pull/455)). A schema with an unknown keyword (`prefixItems`, `x-*`) or a non-draft-07 `$schema` is now refused and the run ends before the agent starts; such schemas used to run. Remove the unsupported keywords, or express them in draft-07 (`items` as an array instead of `prefixItems`).
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
### Added
|
|
50
61
|
|
|
51
|
-
|
|
62
|
+
- **Token optimization: the `SubagentWorkflow` script reference can move out of the tool description.** The reference now ships as a `workflow-authoring` skill (`/skill:workflow-authoring`), and the new `workflowToolExposure` setting picks where the model gets it. The default, `"inline"`, keeps it in the tool description as before. Set `"skill"` in `subagents.json` or `/agents` → Settings to save about 4k tokens per session: the description then carries one line pointing at the skill file, which works only with a model that reads it before writing a script.
|
|
63
|
+
- **Workflows report why an `agent()` call failed** ([#439](https://github.com/tintinweb/pi-subagents/issues/439), superseding [#444](https://github.com/tintinweb/pi-subagents/pull/444) — thanks [@woksin](https://github.com/woksin) for the report and [@Swarneil1905](https://github.com/Swarneil1905) for the implementation). A failed call still returns `null`. The new read-only `agentError(label)` global returns why the most recent call with that label failed, and the journal entry records the reason. The completion notification lists every failure in `<failures>`, as Claude Code's does. `agentError` is pi-only: a portable script checks `typeof agentError === 'function'` first.
|
|
64
|
+
- **`workflowToolExposure: "deferred"` keeps `SubagentWorkflow` out of the tool spec until pi's `tool_search` loads it** ([#434](https://github.com/tintinweb/pi-subagents/issues/434), [#437](https://github.com/tintinweb/pi-subagents/pull/437) — thanks [@M1racleShih](https://github.com/M1racleShih)). Once loaded it carries the full inline reference. pi ships `tool_search` off, so enable it with `"defaultTools": ["+tool_search"]`; the extension warns at startup when it is inactive.
|
|
52
65
|
|
|
53
|
-
|
|
66
|
+
### Changed
|
|
54
67
|
|
|
55
|
-
|
|
68
|
+
- **Workflow scripts behave as Claude Code's do.** They run in strict mode, return values are copied rather than rejected, `pipeline()` stops an item on `null`, and `setTimeout`, `disallowedTools` and case-insensitive `effort` are supported. `agent({ schema })` is now validated by Ajv against draft-07 in strict mode, so a schema with an unknown keyword (`prefixItems`, `x-*`) or a non-draft-07 `$schema` is refused, and the run ends before the agent starts. FleetView rows show a progress bar and active phases, and the inspector lists each agent's tool calls. See [Coming from Claude Code](https://github.com/tintinweb/pi-subagents/blob/master/docs/workflows.md#coming-from-claude-code) for the details.
|
|
56
69
|
|
|
57
|
-
###
|
|
70
|
+
### Fixed
|
|
58
71
|
|
|
59
|
-
- [#
|
|
72
|
+
- **Asking for a number of subagents no longer starts a workflow** ([#451](https://github.com/tintinweb/pi-subagents/pull/451)). A pi-only `SubagentWorkflow` guideline sent requests like "use 10 agents to …" to a workflow instead of parallel `Agent` calls, overriding the tool description's rule that a workflow needs an explicit opt-in. The guideline is removed, as Claude Code has none; "use a workflow" or a saved workflow name still starts one.
|
|
73
|
+
- **Running workflow agents show live tool-call and token counts** ([#298](https://github.com/tintinweb/pi-subagents/issues/298), [#453](https://github.com/tintinweb/pi-subagents/pull/453), superseding [#299](https://github.com/tintinweb/pi-subagents/pull/299) — thanks [@cgngtr](https://github.com/cgngtr)). A row, its inspector **Activity** and the totals stayed at zero until the agent settled, including on resumed agents. Counts now update as each tool completes and each assistant message ends. `budget.spent()` now includes attempts stopped by a retry, so a script guarding on it sees a higher number after one. A resumed agent's row and `budget.spent()` now count only its continuation; both used to count the earlier run again.
|
|
60
74
|
|
|
61
|
-
## 0.
|
|
75
|
+
## [0.25.0] - 2026-11-13
|
|
62
76
|
|
|
63
|
-
|
|
77
|
+
> **⚠️ Behavior change — `general-purpose` can now spawn subagents of its own** ([#448](https://github.com/tintinweb/pi-subagents/pull/448)). A `general-purpose` agent may delegate instead of doing all the work itself; its children count toward `maxConcurrentNested`. Depth stays at `maxSubagentDepth` `2`: a subagent's children cannot spawn again, unlike Claude Code's default of 3; set it to `3` to match. Inside a workflow it does not, as in Claude Code: the script does the fanning out. To keep `general-purpose` from delegating, add a `general-purpose.md` agent file without `allowed_subagents`; it replaces the built-in. A `general-purpose.md` you ejected earlier is such a file, so it keeps the old behavior: add `allowed_subagents: all` to it, or delete it to use the built-in. Set `maxSubagentDepth` to `1` to turn nesting off entirely.
|
|
64
78
|
|
|
65
|
-
|
|
79
|
+
> **⚠️ Behavior change — `/agents` → Settings writes the global file unless the project has its own** ([#391](https://github.com/tintinweb/pi-subagents/issues/391), [#419](https://github.com/tintinweb/pi-subagents/pull/419)). Changes used to land in `<cwd>/.pi/subagents.json`, creating it in every repo you opened Settings in. They now go to `~/.pi/agent/subagents.json` unless that project file already exists; press Tab on the page to write the project file instead.
|
|
66
80
|
|
|
67
|
-
|
|
81
|
+
### Changed
|
|
68
82
|
|
|
69
|
-
|
|
83
|
+
- **`/agents` → Settings no longer leaves `.pi/subagents.json` in your repos, and Tab picks the file it writes** ([#391](https://github.com/tintinweb/pi-subagents/issues/391) — thanks [@danieltwagner](https://github.com/danieltwagner); [#419](https://github.com/tintinweb/pi-subagents/pull/419) — thanks [@xh123637](https://github.com/xh123637)). The page opens on the project file if the project has one, and on the global file otherwise; the header names the target and Tab switches it. A save writes only the setting you changed, so pi sessions sharing the global file no longer revert each other's changes, and built-in defaults are no longer copied into the file. The toast names the file written, and warns when a project value overrides a global save.
|
|
84
|
+
- **The built-in `general-purpose` agent delegates, matching Claude Code** ([#448](https://github.com/tintinweb/pi-subagents/pull/448)). In Claude Code, `general-purpose` keeps its `Agent` tool and `Explore`/`Plan` drop it. Here nested delegation required a custom agent with `allowed_subagents`, so asking for "a subagent that spawns subagents" got a `general-purpose` child with no `Agent` tool. The allowlist stays opt-in for custom agents: `general-purpose` already has every tool, so delegation grants it nothing new. When it can spawn, its prompt carries Claude Code's line telling it not to hand its whole task to a single child.
|
|
70
85
|
|
|
71
|
-
|
|
86
|
+
### Added
|
|
72
87
|
|
|
73
|
-
-
|
|
88
|
+
- **`/agents` → Settings shows where each value comes from, resets a row with Delete, and filters as you type.** A row set in a settings file is tagged `project` or `global`; Delete (or Backspace) removes that setting from the tagged file, so the row falls back to the other file's value or the built-in default. Rows are grouped by category, typing filters them by label, and the list fits the terminal and scrolls instead of pushing the header off a short one.
|
|
74
89
|
|
|
75
|
-
|
|
90
|
+
### Fixed
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
- **`/agents` → Settings refuses a number that would be dropped on restart.** The number prompt accepted values outside the range loading keeps, so a saved value like a max concurrency of `5000` silently vanished on the next start. Enter on a number row now opens an editor under the list that names the accepted range and refuses anything outside it.
|
|
93
|
+
- **Finished nested subagents no longer outlive their parent across a session switch.** On `/new` or a session switch, finished agents whose result was never read stay in memory. A nested child's result is only ever read by its parent, so nothing marked it read: it stayed for up to 10 minutes with its session still loaded, after its parent was gone. It is now removed along with its parent.
|
|
94
|
+
- **`get_subagent_result` now shows when a saved result finished** ([#436](https://github.com/tintinweb/pi-subagents/issues/436) — thanks [@EndUser123](https://github.com/EndUser123)). Once an agent's live record is gone, the tool answers from the session's saved record, which is kept for the whole session, so a result from days earlier looked current. The answer now includes a `Finished:` line with the time and age, e.g. `2026-11-10T14:14Z (2d ago)`. This matters most for handles: after a reload, `explore` returns the most recent saved `explore` run, however old it is.
|
|
95
|
+
- **A leftover schedule lock no longer freezes pi for 5 seconds** ([#247](https://github.com/tintinweb/pi-subagents/issues/247), [#266](https://github.com/tintinweb/pi-subagents/pull/266) — thanks [@ChakornK](https://github.com/ChakornK)). When a lock file was left behind, every schedule write blocked the UI for 5 s while it retried, then failed anyway. A leftover lock holding pi's own PID is now reclaimed immediately; any other held lock fails at once. If a job fires while the lock is held, the job still runs and only its status bookkeeping is skipped, reported as a `subagents:scheduled` error event.
|
|
78
96
|
|
|
79
|
-
|
|
97
|
+
## [0.24.0] - 2026-11-12
|
|
80
98
|
|
|
81
|
-
|
|
99
|
+
> **⚠️ Behavior change — nested spawns are refused once 10 nested subagents are running** ([#427](https://github.com/tintinweb/pi-subagents/pull/427)). Only agents with `allowed_subagents` are affected; the parent gets a tool error and does the work itself. To restore the unbounded behavior, set `/agents → Settings → Max nested concurrency` (`maxConcurrentNested`) to `0`.
|
|
82
100
|
|
|
83
|
-
|
|
101
|
+
> **⚠️ Behavior change — FleetView rows show each agent's own tokens, and the selection is marked `❯`.** A parent that delegates now shows a smaller figure in FleetView, because its nested children are listed with their own; every other surface still reports the rolled-up total. `●` now marks the view in front (`main` or the open agent) instead of the selection, as in Claude Code. In fullscreen mode a left press on a fleet row opens that agent instead of starting a text selection.
|
|
84
102
|
|
|
85
|
-
###
|
|
103
|
+
### Changed
|
|
86
104
|
|
|
87
|
-
- [#
|
|
105
|
+
- **`showModel` now also names the model on the fleet view rows, and both surfaces show the bare thinking level** ([#445](https://github.com/tintinweb/pi-subagents/issues/445)). The fleet row carried only the agent type, description, elapsed and tokens, so two same-type agents differing only by model or thinking level were indistinguishable without opening each viewer; with `showModel` on, each row now names the model and level after the description. The level renders bare (`sonnet 4.6 · high`) on both the fleet row and the widget running line, dropping the earlier `thinking:` label; the `Agent` tool result and conversation viewer keep the labelled form.
|
|
88
106
|
|
|
89
|
-
|
|
107
|
+
### Added
|
|
90
108
|
|
|
91
|
-
|
|
109
|
+
- **`maxConcurrentNested` caps how many nested subagents run at once** ([#427](https://github.com/tintinweb/pi-subagents/pull/427), part of [#352](https://github.com/tintinweb/pi-subagents/issues/352)). Nested children skip both queueing pools, so nothing bounded a parent's fan-out. A nested spawn over the limit (default `10`, `0` = unlimited) is refused rather than queued, since queueing a child behind its waiting parent would deadlock. Top-level and workflow agents neither count nor are refused. In `/agents → Settings`, "Max concurrency" is now "Max background concurrency", next to the new "Max nested concurrency" and "Nested depth".
|
|
110
|
+
- **FleetView lists nested subagents under their parent, with a `❯` cursor and mouse support.** Agents spawned through `allowed_subagents` were hidden from every surface, so a delegating agent's fan-out was invisible until it returned. They now appear indented under their parent (`├`/`└`), and open, steer and stop like any other row. In fullscreen mode, hovering a row moves the cursor and clicking opens it. `/agents → Running agents` lists them the same way, and keeps a finished child there after FleetView drops it. Workflow agents stay in the workflow inspector. New `AgentRecord.ownUsage` holds an agent's spend without its descendants'.
|
|
92
111
|
|
|
93
|
-
|
|
112
|
+
## [0.23.2] - 2026-11-10
|
|
94
113
|
|
|
95
|
-
|
|
114
|
+
### Added
|
|
96
115
|
|
|
97
|
-
|
|
116
|
+
- **Partial README translations in Simplified Chinese, Japanese and Korean** (`README.zh-CN.md`, `README.ja.md`, `README.ko.md`). They cover the intro, Features, Install, Quick Start and the `/agents` command, and link to the English `README.md` for everything else. A language switcher sits at the top of each README.
|
|
98
117
|
|
|
99
|
-
|
|
118
|
+
### Fixed
|
|
100
119
|
|
|
101
|
-
|
|
120
|
+
- **Conversation viewer honors `tui.altScreen.top`/`tui.altScreen.bottom`.** The fullscreen observer's scroll-to-top and jump-to-latest keys, and the jump-to-latest divider label, now resolve through your keybindings the way its scroll and expand keys already did. Remapping those actions in `keybindings.json` no longer leaves the observer on the stock `Ctrl+Home`/`Ctrl+End` while the main transcript uses the remap. `Home`/`End` keep working as aliases, and `Ctrl+Home`/`Ctrl+End` now also scroll in the windowed viewer ([#438](https://github.com/tintinweb/pi-subagents/issues/438)).
|
|
102
121
|
|
|
103
|
-
|
|
122
|
+
## [0.23.1] - 2026-11-04
|
|
104
123
|
|
|
105
|
-
|
|
124
|
+
### Added
|
|
106
125
|
|
|
107
|
-
|
|
126
|
+
- **The conversation viewer draws tool calls the way pi's own transcript does** ([#413](https://github.com/tintinweb/pi-subagents/pull/413) — thanks [@pf-sjtu](https://github.com/pf-sjtu)). Each call renders through the renderer registered in the agent's session, with its result folded into the same block: bash shows its command and output, `read` its line numbers, `edit` its diff, and an extension tool its own view. The viewer used to show just the tool name and the result as dim plain text. `ctrl+o` (pi's `app.tools.expand`) unfolds shortened output, and the `viewerMarkdown` setting no longer applies to tool calls.
|
|
108
127
|
|
|
109
|
-
|
|
128
|
+
### Fixed
|
|
110
129
|
|
|
111
|
-
|
|
130
|
+
- **`get_subagent_result` still finds a finished agent by handle after a reload** ([#429](https://github.com/tintinweb/pi-subagents/pull/429), fixes [#428](https://github.com/tintinweb/pi-subagents/issues/428) — thanks [@HerbertGao](https://github.com/HerbertGao)). The tool accepts an agent id or its handle (a `name`, or the type handle such as `explore`). That worked while the process was up, because a handle still resolved through the in-memory tombstone. After a reload the tombstone is gone and the saved `subagents:record` was matched on `id` only, so the same handle came back not found. The saved record's handle and alias now match too.
|
|
112
131
|
|
|
113
|
-
|
|
132
|
+
## [0.23.0] - 2026-11-03
|
|
114
133
|
|
|
115
|
-
|
|
134
|
+
> **⚠️ Behavior change — `direct`-mode mentions of an `inherit_context: true` agent now carry the conversation** ([#300](https://github.com/tintinweb/pi-subagents/issues/300)). Such an agent started with only the typed text; it now gets the whole conversation prepended, so its prompt is larger and slower to start. The model-mode fallback changes the same way. Remove `inherit_context` from the agent file to restore the previous behaviour.
|
|
116
135
|
|
|
117
|
-
|
|
136
|
+
> **⚠️ Behavior change — reopening an agent whose file sets `isolation: worktree` no longer builds a fresh worktree** ([#420](https://github.com/tintinweb/pi-subagents/pull/420)). This affects `@handle` after the agent's record is evicted, and the new `Agent({ resume })` and workflow `resume` reopens. If the first run's worktree held changes, the reopen is refused, and the work is on the branch named in its result. If it held none, the agent continues in the main checkout without isolation. Previously `@handle` reopened such an agent in a fresh worktree from HEAD, which lacked its earlier edits. This matches Claude Code. To keep a follow-up isolated, start a new agent on the branch.
|
|
118
137
|
|
|
119
|
-
- [#
|
|
138
|
+
> **⚠️ Behavior change — the built-in Explore runs on the session's model instead of Haiku** ([#175](https://github.com/tintinweb/pi-subagents/issues/175), [#350](https://github.com/tintinweb/pi-subagents/issues/350)). On a Sonnet or Opus session it is now slower and costlier per call. To keep Haiku, eject Explore (`/agents` → Explore → Eject) and add `model: anthropic/claude-haiku-4-5`.
|
|
120
139
|
|
|
121
|
-
|
|
140
|
+
### Changed
|
|
122
141
|
|
|
123
|
-
|
|
142
|
+
- **The built-in Explore inherits the session's model, as in Claude Code** (fixes [#175](https://github.com/tintinweb/pi-subagents/issues/175), [#350](https://github.com/tintinweb/pi-subagents/issues/350) — thanks [@DraconDev](https://github.com/DraconDev), [@renatomoselli](https://github.com/renatomoselli); supersedes [#390](https://github.com/tintinweb/pi-subagents/pull/390) — thanks [@yukukotani](https://github.com/yukukotani)). Its `anthropic/claude-haiku-4-5` pin outranked the caller and resolved through any provider with a key, so sessions on local, GLM, MiniMax or Codex models ran every Explore on another provider's Haiku and drained its credits.
|
|
143
|
+
- **An agent file's `inherit_context` applies to every `@handle` mention** (fixes [#300](https://github.com/tintinweb/pi-subagents/issues/300) — thanks [@vlamai](https://github.com/vlamai)). Direct-mode mentions, and the fallback when model mode's clone cannot start the agent, began with only the typed text, so an agent written to read the conversation summarized one it never saw. Such agents now get the conversation on those paths too, which makes their prompts larger. Cross-extension RPC still leaves the choice to its caller.
|
|
124
144
|
|
|
125
|
-
|
|
145
|
+
### Fixed
|
|
126
146
|
|
|
127
|
-
|
|
147
|
+
- **Claude Code tool names work in agent files** (fixes [#396](https://github.com/tintinweb/pi-subagents/issues/396)). `tools: Read, Glob, Bash` gave an agent none of pi's built-ins; names now match in any case, `Glob` means `find`, and the `disallowedTools` key is read as `disallowed_tools`, so an agent that ignored its `disallowedTools` loses those tools. As in Claude Code, an agent whose `tools:` resolve to nothing is refused instead of started with no usable tool.
|
|
148
|
+
- **Bare `mcp__<server>__<tool>` entries in `tools:` select MCP tools** (part of [#370](https://github.com/tintinweb/pi-subagents/issues/370)). They were dropped as unknown built-ins, leaving every MCP tool reachable; they now narrow MCP tools as pi's `--tools` does and keep the `codemode`/`tool_search` bridges in scope. A server-level `mcp__<server>` selects the whole server, as in Claude Code.
|
|
149
|
+
- **The `Agent` tool no longer suggests `Explore` when it cannot be spawned** (fixes [#330](https://github.com/tintinweb/pi-subagents/issues/330) — thanks [@shkrabov](https://github.com/shkrabov)). With `disableDefaultAgents: true`, or an `Explore.md` that sets `enabled: false`, the exploration guideline pointed the model at an agent that does not exist. As in Claude Code, it names Explore only when Explore is available.
|
|
150
|
+
- **`get_subagent_result` answers after an agent's record is evicted or lost to a reload** (fixes [#397](https://github.com/tintinweb/pi-subagents/issues/397), [#398](https://github.com/tintinweb/pi-subagents/pull/398) — thanks [@lluppi](https://github.com/lluppi)). The completion notification points at it for the full result, but about ten minutes after an agent finished it answered "Agent not found". It now reads the result from the session's saved record.
|
|
151
|
+
- **`resume` reopens an agent whose record was evicted, under the same id** ([#420](https://github.com/tintinweb/pi-subagents/pull/420), fixes [#331](https://github.com/tintinweb/pi-subagents/issues/331), [#385](https://github.com/tintinweb/pi-subagents/issues/385)). `Agent({ resume })` and a workflow's `agent({ resume })` failed once the agent had been finished for ten minutes, or after a reload, although its session was still on disk. Both now reopen the saved session, running under the agent type's current definition; resuming from a `/fork` or `/clone` of the parent forks the agent's session too. As in Claude Code, a reopen never gets a worktree: an agent whose worktree held changes is refused (its work is on the branch named in its result), and one whose worktree was clean continues in the main checkout. This also applies to `@handle`, which used to reopen such an agent in a fresh worktree from HEAD, without its earlier edits. Builds on [#286](https://github.com/tintinweb/pi-subagents/pull/286) — thanks [@zenworr](https://github.com/zenworr).
|
|
152
|
+
- **Package-name aliases cover directory-style `pi.extensions` declarations** (extends the [#143](https://github.com/tintinweb/pi-subagents/issues/143) fix). Packages declaring a directory such as `["./dist"]` previously lacked their package-name alias when pi registered `dist/index.js`. Every registered file under the declared directory now receives that alias, while path-derived names continue to work.
|
|
153
|
+
- **Workflow completion notifications count agents, not progress events.** The runtime logs an entry per agent transition, and every entry was counted, so a 28-agent run reported "27/138 agents" to the model and finished runs could still read as running. Each agent is now counted once.
|
|
128
154
|
|
|
129
|
-
|
|
155
|
+
## [0.22.1] - 2026-10-30
|
|
130
156
|
|
|
131
|
-
|
|
157
|
+
### Added
|
|
132
158
|
|
|
133
|
-
|
|
159
|
+
- **`subagents:rpc:steer` lets a cross-extension caller message an agent it spawned** ([#292](https://github.com/tintinweb/pi-subagents/pull/292) — thanks [@efpiva](https://github.com/efpiva)). The bus-side half of `steer_subagent`: id only, the same ownership guard as `stop`, `Agent is not running` once the agent has settled, and it emits `subagents:steered` like the tool does. Outside the `ping` handshake like `consume`.
|
|
160
|
+
- **Per-message `subagents:usage` event for every agent, and `subagents:disposed` at shutdown** (closes [#376](https://github.com/tintinweb/pi-subagents/issues/376), [#377](https://github.com/tintinweb/pi-subagents/pull/377) — thanks [@erikdarlingdata](https://github.com/erikdarlingdata)). Another extension could not keep a live, accurate ledger of subagent spend: the lifecycle events report top-level agents only, once, at the end, and the ancestor records fold a nested child's spend into every parent. `subagents:usage` now fires once per assistant message for every agent, nested and workflow children included, carrying `type`, `model`, the effective `thinking` level (plus `requestedThinking` when the agent did not get what it asked for), `depth`, `parentAgentId`, `workflowId` and that one message's spend as a pi `Usage`. It is not gated by `reportUsage`. `subagents:disposed` fires at the end of `session_shutdown`, after every agent is stopped, as the point after which a final synchronous flush is complete. See [Events](README.md#events).
|
|
134
161
|
|
|
135
|
-
###
|
|
162
|
+
### Fixed
|
|
136
163
|
|
|
137
|
-
-
|
|
164
|
+
- **Steering from the conversation viewer or the fleet list now emits `subagents:steered`.** Only the `steer_subagent` tool and an `@handle` steer did before, so an extension watching the event missed every steer typed into a viewer. The event now fires from `AgentManager.steer`, which every path except the steer tools goes through.
|
|
165
|
+
- **Resumed agents are bounded by `max_turns` again, and their turn counter moves** (fixes [#368](https://github.com/tintinweb/pi-subagents/issues/368) — thanks [@mratsim](https://github.com/mratsim)). The steer → grace → abort machine ran only over a spawn's first prompt, so a resume — from the `Agent` tool, an `@handle`, a nested agent or a workflow — had no turn limit at all and its widget row stayed at `↻1`. A resumed run now gets a fresh budget counted from the resume prompt, resolved as for a spawn, and can end `steered` or `aborted` like the first run.
|
|
166
|
+
- **Subagents inherit the parent session's thinking level** (fixes [#305](https://github.com/tintinweb/pi-subagents/issues/305), [#306](https://github.com/tintinweb/pi-subagents/pull/306) — thanks [@luongnv89](https://github.com/luongnv89)). When neither the call nor the agent file set `thinking`, a subagent ran at pi's `defaultThinkingLevel` (e.g. `max`) instead of the level the parent session was using, contrary to the documented `inherit` default. A level from the call or the agent file still wins; `@handle` mentions already inherited.
|
|
167
|
+
- **Append-mode subagents no longer list the parent's skills and cwd a second time** (fixes [#399](https://github.com/tintinweb/pi-subagents/issues/399), [#400](https://github.com/tintinweb/pi-subagents/pull/400) — thanks [@xulongwu4](https://github.com/xulongwu4)). An append-mode agent such as `general-purpose` inherited the parent's whole rendered prompt, including its `<skills>`, `<cwd>` and extension sections, and then its own session rendered them again. The parent's skills also reached agents set to `skills: false`. The child now inherits the parent's prompt up to its skills section, so the preamble, `APPEND_SYSTEM.md` and project context still carry over once.
|
|
138
168
|
|
|
139
|
-
## 0.
|
|
169
|
+
## [0.22.0] - 2026-10-13
|
|
140
170
|
|
|
141
|
-
|
|
171
|
+
> **⚠️ Possibly breaking — background completion delivery changed ([#388](https://github.com/tintinweb/pi-subagents/pull/388)):**
|
|
172
|
+
>
|
|
173
|
+
> - **`smart`, the default join mode, no longer combines a turn's background agents into one notification.** Each result reaches the parent at its next boundary, so a parent waiting idle on several agents can take one turn per finish. Set the join mode to `group` for one notification per turn's batch.
|
|
174
|
+
> - **A completion pending when you press Esc now starts a turn once the interrupted turn stops.**
|
|
175
|
+
> - **`group` no longer groups a lone spawn, or spawns from different parent turns.**
|
|
142
176
|
|
|
143
|
-
|
|
177
|
+
> **⭐ New — pi packages can ship subagents and workflow scripts** ([#109](https://github.com/tintinweb/pi-subagents/issues/109)). Declare them in a package, and `pi install` replaces copying `.md` files into `.pi/agents/`.
|
|
144
178
|
|
|
145
|
-
|
|
179
|
+
### Added
|
|
146
180
|
|
|
147
|
-
|
|
181
|
+
- **A pi package can ship subagents and workflow scripts** ([#109](https://github.com/tintinweb/pi-subagents/issues/109), [#262](https://github.com/tintinweb/pi-subagents/pull/262) — thanks [@iamfj](https://github.com/iamfj), [@RicardoMonteiroSimoes](https://github.com/RicardoMonteiroSimoes) and [@Brambovich](https://github.com/Brambovich)). Distributing an agent used to mean telling users to copy `.md` files into `.pi/agents/`. A package now declares them instead, and `pi install` is the whole setup:
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"pi": {
|
|
185
|
+
"subagents": { "agents": ["./agents"], "workflows": ["./workflows"] }
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
The top-level `pi-subagents` key works too, so one manifest serves both this extension and [`nicobailon/pi-subagents`](https://github.com/nicobailon/pi-subagents). Only packages pi has actually installed are read — never `node_modules` — and a package configured by an untrusted project stays invisible. Package agents rank **below every agent you wrote**, so one can offer a `reviewer` but never take the name from yours, and `/agents` shows them read-only with _Eject_ and _Disable_. On by default, since installing a package already lets pi run its `extensions/`; `packageAgents` and `packageWorkflows` (`true`, `false`, or an allowlist) narrow it. Full guide: [`docs/packages.md`](https://github.com/tintinweb/pi-subagents/blob/master/docs/packages.md).
|
|
148
190
|
|
|
149
|
-
|
|
191
|
+
### Changed
|
|
150
192
|
|
|
151
|
-
- [#
|
|
193
|
+
- **Background completions that finish together reach the parent as one message, and none waits for its siblings, as in Claude Code** ([#388](https://github.com/tintinweb/pi-subagents/pull/388)). A busy parent gets everything that finished during its tool batch in one message before its next model call; an idle parent gets a turn about 200 ms after a completion, with anything else that finished in that window. The default `smart` join mode no longer holds a finished agent for up to 30 s until its siblings finish (`async` now means the same as `smart`). `group` batches by parent turn instead of a 100 ms spawn window, so worktree agents group reliably. A completion pending when you press Esc is no longer dropped: it is delivered once the interrupted turn stops, starting a turn, as Claude Code does. `get_subagent_result` now suppresses a notification any time before it is sent, not only within 200 ms.
|
|
152
194
|
|
|
153
|
-
|
|
195
|
+
### Fixed
|
|
154
196
|
|
|
155
|
-
|
|
197
|
+
- **`session_shutdown` now disposes the widget and group-join manager** (fixes [#256](https://github.com/tintinweb/pi-subagents/issues/256), [#316](https://github.com/tintinweb/pi-subagents/pull/316) — thanks [@joshua-zyy](https://github.com/joshua-zyy)). The handler released the fleet, scheduler and manager but left the `AgentWidget` render interval and the `GroupJoinManager` group timeouts running. Because `session_shutdown` also fires on reload and session replacement, where the Node process survives, those timers outlived the activation and fired into the next session's UI and group state, accumulating across reloads. `session_before_switch` still keeps both, since a vetoed switch continues the session.
|
|
156
198
|
|
|
157
|
-
|
|
199
|
+
## [0.21.0] - 2026-10-12
|
|
158
200
|
|
|
159
|
-
|
|
201
|
+
> **⚠️ Possibly breaking — four fixes below change what an existing setup does:**
|
|
202
|
+
>
|
|
203
|
+
> - **An agent file with `isolation: worktree` now fails to start outside a git repo** on mention and RPC spawns, where it used to run in the main checkout.
|
|
204
|
+
> - **An agent file's `isolated:` and `isolation:` now override the RPC caller.** A caller's `isolated: false` or `isolation: "worktree"` no longer wins over the file.
|
|
205
|
+
> - **Every subagent with `extensions: true` starts its own `mcp.json` servers.** To keep the old behavior, add `exclude_extensions: builtin:mcp` to the agent, put `-builtin:mcp` in pi's `extensions` setting, or start pi with `--no-mcp`.
|
|
206
|
+
> - **Subagents in an untrusted project no longer load its `.pi` extensions or settings.**
|
|
160
207
|
|
|
161
|
-
|
|
208
|
+
> **⭐ New — fullscreen conversation observer** ([#357](https://github.com/tintinweb/pi-subagents/pull/357)). In pi's fullscreen mode, an opened agent fills the terminal, with mouse scrolling and clickable controls.
|
|
162
209
|
|
|
163
|
-
|
|
210
|
+
> **⭐ New — `ctrl+b` sends a running foreground agent to the background** ([#261](https://github.com/tintinweb/pi-subagents/pull/261)). The run continues and reports back like any background agent.
|
|
164
211
|
|
|
165
|
-
###
|
|
212
|
+
### Added
|
|
166
213
|
|
|
167
|
-
- [#
|
|
214
|
+
- **Fullscreen conversation observer** ([#357](https://github.com/tintinweb/pi-subagents/pull/357) — thanks [@sadiksaifi](https://github.com/sadiksaifi)). In pi's fullscreen mode, the default, an agent opened from FleetView, `/agents` or the workflow inspector now fills the terminal with mouse-wheel scrolling, a draggable scrollbar that follows pi's `fullscreenScrollbar` setting, clickable footer controls, and a `Ctrl+End` jump-to-latest marker that counts new messages. Regular mode keeps the floating viewer.
|
|
215
|
+
- **`ctrl+b` sends a running foreground `Agent` call to the background, as in Claude Code** ([#261](https://github.com/tintinweb/pi-subagents/pull/261), supersedes [#233](https://github.com/tintinweb/pi-subagents/pull/233) — thanks [@titouanmathis](https://github.com/titouanmathis)). The run keeps going, the blocked call returns as a `run_in_background` spawn would, and completion arrives as the normal background notification. `ctrl+b` hands off every running foreground call while the prompt editor has focus; `b` in the conversation viewer hands off one. Also fixed: a child whose parent was interrupted before it started is no longer prompted. See [Sending a foreground agent to the background](README.md#sending-a-foreground-agent-to-the-background).
|
|
168
216
|
|
|
169
|
-
|
|
217
|
+
### Changed
|
|
170
218
|
|
|
171
|
-
|
|
219
|
+
- **Background completions reach a busy parent after its current tool batch, as in Claude Code** ([#387](https://github.com/tintinweb/pi-subagents/pull/387), supersedes [#190](https://github.com/tintinweb/pi-subagents/pull/190), closes [#188](https://github.com/tintinweb/pi-subagents/issues/188) — thanks [@xz-dev](https://github.com/xz-dev)). Completion notifications for agents, groups and workflows were sent as pi follow-ups, held until the parent would stop, so a parent busy with tool calls could see a finished child minutes late, after its final answer. They now use pi's steering queue: a busy parent sees a completion before its next model call, running tools are not interrupted, and an idle parent still gets a new turn.
|
|
172
220
|
|
|
173
|
-
|
|
221
|
+
### Fixed
|
|
174
222
|
|
|
175
|
-
|
|
223
|
+
- **The FleetView list no longer sits flush against pi's footer** (fixes [#351](https://github.com/tintinweb/pi-subagents/issues/351) — thanks [@KKinsz](https://github.com/KKinsz)). pi places below-editor widgets directly on its status bar with no gap, so the last agent row ran into the model/context line. The list now ends with a blank line, matching the one above `main`.
|
|
224
|
+
- **FleetView arrow keys work when another extension replaces the prompt editor** (fixes [#374](https://github.com/tintinweb/pi-subagents/issues/374) — thanks [@BarrMan](https://github.com/BarrMan)). The list only handled keys while an `Editor` subclass had focus, so an editor installed via `ui.setEditorComponent` that implements pi's `EditorComponent` interface without extending `Editor` (e.g. pi-voice-stt's) left `↓`/`←` dead. The list now recognizes any focused component with `getText`/`setText`, lifting the limitation noted in the #123 fix; pi's own dialogs and selectors still keep their keys.
|
|
225
|
+
- **`SubagentWorkflow` honours an agent file's `isolated: true`** ([#339](https://github.com/tintinweb/pi-subagents/pull/339) — thanks [@ajaynomics](https://github.com/ajaynomics)). The workflow host never forwarded the flag, so script-spawned children of a hermetic agent loaded every host extension and its MCP and web tools.
|
|
226
|
+
- **An agent file's `isolated:` now holds on every spawn path.** Direct-mode `@handle` mentions (`agentMentionMode: "direct"`), the fallback when a mention clone fails, reclaimed agents, and cross-extension RPC or registry spawns that omitted `isolated` ran an `isolated: true` agent with every host extension loaded. The agent file now wins on all paths, as "Frontmatter is authoritative" promises: an RPC caller's `isolated: false` no longer overrides a file's `true`, and the caller's value still applies when the file leaves the field unset.
|
|
227
|
+
- **An agent file's `isolation:` now holds on mention and RPC spawns.** Only the `Agent` tool and nested tools applied it, so direct-mode and fallback `@handle` mentions, reclaimed agents, and RPC spawns that omitted `isolation` ran an `isolation: worktree` agent in the main checkout, and an RPC caller's `"worktree"` overrode a file's `isolation: off`. The file now wins on those paths, and the widget's `worktree` tag shows for every worktree agent. Workflow `agent()` calls are unchanged: as in Claude Code, only the script's option decides. An agent whose file says `worktree` now fails to start outside a git repo instead of running in place.
|
|
228
|
+
- **Subagents can use pi's built-in MCP, codemode, and tool search** (supersedes [#379](https://github.com/tintinweb/pi-subagents/pull/379) and [#383](https://github.com/tintinweb/pi-subagents/pull/383) — thanks [@misbahulard](https://github.com/misbahulard); partly addresses [#370](https://github.com/tintinweb/pi-subagents/issues/370)). pi only hands these to the loader its own CLI builds, so a subagent never had them and `builtin:<name>` in `extensions:` matched nothing. They now load as in the main session, which means every subagent with `extensions: true` starts its own `mcp.json` servers; opt out per agent with `exclude_extensions: builtin:mcp`, globally with `-builtin:mcp` in pi's `extensions` setting, or by starting pi with `--no-mcp` (`--no-extensions` drops all three built-ins). Bare `mcp__<server>__<tool>` names in `tools:` are still rejected.
|
|
229
|
+
- **Subagent tool scoping follows pi's tool exposure and covers tools called from other tools.** A subagent declared every in-scope tool to the model, including `codemode`/`deferred` ones such as pi's MCP tools and tools marked `defaultActive: false`; it now activates only what pi would. Calls a tool makes through `ctx.executeTool()`, such as a codemode script calling an MCP tool, skipped the scope check entirely and now hit it too.
|
|
176
230
|
|
|
177
|
-
|
|
178
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
231
|
+
### Security
|
|
179
232
|
|
|
180
|
-
|
|
233
|
+
- **Subagents inherit the parent session's project trust.** A subagent built its settings with pi's default of trusted, so in a project the user declined to trust it still loaded that project's `.pi` extensions and settings — and, with pi's built-in MCP, would start the servers in its `.pi/mcp.json`. The parent's decision now applies to every subagent. A subagent spawned into another directory (`SpawnOptions.cwd`) still uses the parent project's settings but reports that directory as untrusted, so extensions that read `<cwd>/.pi` — pi's MCP among them — never act on it.
|
|
234
|
+
|
|
235
|
+
## [0.20.0] - 2026-10-09
|
|
236
|
+
|
|
237
|
+
> **⚠️ Breaking — this release requires pi 1.1.0 or newer** (`peerDependencies` moves from `>=0.84.0`; [#384](https://github.com/tintinweb/pi-subagents/pull/384)). pi 0.86 and 0.87 moved the system prompt and conversation history into the session transcript, and the fixes below are built on that model. On an older pi, a mention clone starts its agent without the conversation history.
|
|
238
|
+
|
|
239
|
+
### Changed
|
|
240
|
+
|
|
241
|
+
- **The pi peer floor moves from `>=0.84.0` to `>=1.1.0`** ([#384](https://github.com/tintinweb/pi-subagents/pull/384)). The `@handle` clone now seeds itself through `SessionManager.inMemory(cwd, undefined, entries)` and a resource-loader prompt override, both 1.x mechanisms; the devDependency pin and the CI floor job move to 1.1.0 with it. pi skips peer installation for packages it manages, so the range is a statement, not an install-time block.
|
|
242
|
+
- **`typebox` is a `"*"` peer dependency, and `@sinclair/typebox` is no longer declared** (via [#384](https://github.com/tintinweb/pi-subagents/pull/384); fixes [#358](https://github.com/tintinweb/pi-subagents/issues/358), [#362](https://github.com/tintinweb/pi-subagents/issues/362), [#366](https://github.com/tintinweb/pi-subagents/issues/366), [#382](https://github.com/tintinweb/pi-subagents/issues/382); supersedes [#359](https://github.com/tintinweb/pi-subagents/pull/359) — thanks [@Arteiimis](https://github.com/Arteiimis), who reported and fixed it first — and [#360](https://github.com/tintinweb/pi-subagents/pull/360), [#364](https://github.com/tintinweb/pi-subagents/pull/364), [#367](https://github.com/tintinweb/pi-subagents/pull/367), [#371](https://github.com/tintinweb/pi-subagents/pull/371), [#372](https://github.com/tintinweb/pi-subagents/pull/372)). pi 1.x warns at startup about extension packages that list host-provided modules in `dependencies`. pi already substituted its own `typebox` for both imports at load time, so nothing changes at runtime under pi; a non-pi host must now provide `typebox` itself.
|
|
243
|
+
|
|
244
|
+
### Fixed
|
|
245
|
+
|
|
246
|
+
- **Model-mode `@handle` mentions start through the conversation clone again on pi 1.x** (fixes [#365](https://github.com/tintinweb/pi-subagents/issues/365) via [#384](https://github.com/tintinweb/pi-subagents/pull/384) — thanks [@jeremy7687](https://github.com/jeremy7687), whose diagnosis proposed this approach). The clone set `agent.state.systemPrompt`, a read-only getter since pi 0.86, so every mention fell back to a direct start with a warning. The parent's history now reaches the clone as session entries and its live system prompt through the resource loader. The clone also no longer loads extensions, which ran their setup code once per mention without ever being bound.
|
|
247
|
+
- **Agent `.output` transcripts no longer repeat the prompt or record pi's system messages** ([#384](https://github.com/tintinweb/pi-subagents/pull/384)). pi 1.x puts a `system` message ahead of the first user message and adds one whenever the tool set changes, so the spawn prompt was written twice and each system message landed as a `toolResult` entry. The stream now starts after the first user message and skips system messages.
|
|
248
|
+
- **The workflow stand-down now recognises a lowercase `workflow` tool** ([#283](https://github.com/tintinweb/pi-subagents/issues/283) — thanks [@zampierilucas](https://github.com/zampierilucas)). The match is exact on purpose, and the set held `Workflow` and `SubagentWorkflow` only, so `@quintinshaw/pi-dynamic-workflows` — which registers lowercase `workflow` — never tripped it: with `workflowsEnabled` unset, both orchestrators reached the model and nothing warned. Adding the third name is the whole fix; exactness is kept, so a `list_workflows` still cannot take the feature down.
|
|
249
|
+
|
|
250
|
+
## [0.19.0] - 2026-08-25
|
|
251
|
+
|
|
252
|
+
> **⚠️ Breaking — this release requires pi 0.84.0 or newer** (`peerDependencies` moves from `>=0.81.0`). `SubagentWorkflow` needs two host APIs that do not exist below it, and both fail the typecheck rather than degrading quietly — see the `Changed` entry below for which, and why neither was worth reimplementing to hold the old floor. npm flags an older pi at install time.
|
|
253
|
+
|
|
254
|
+
> **ℹ️ Context cost — a session with workflows on carries ~5k tokens more system prompt.** `SubagentWorkflow`'s description is Claude Code's, ported verbatim — about 22 KB of scripting contract, since a model that has to guess the API writes scripts that fail on the first call — and it sits in the tool spec of every turn, not only the ones that run a workflow. `workflowsEnabled: false` is how to get that context back: the tool is never registered, so none of it reaches the prompt.
|
|
181
255
|
|
|
182
256
|
### Added
|
|
183
257
|
|
|
184
|
-
-
|
|
185
|
-
- **
|
|
258
|
+
- **A `SubagentWorkflow` tool runs a deterministic script that orchestrates many subagents.** Parallelism was previously the model's to arrange — several `Agent` calls in one message, joined by their completion notifications — which cannot loop, branch, or fan out over a list discovered at runtime. A workflow script is ordinary JavaScript with `agent()`, `parallel()`, `pipeline()`, `phase()`, `log()` and `args` as globals; it opens with a pure-literal `export const meta = { name, description, phases }` that is read before execution so the phases render from the first frame. `pipeline(items, ...stages)` is the reason the tool exists: it has **no barrier between stages**, so one item can be in stage 3 while another is still in stage 1, where `parallel()` is an explicit barrier that idles every fast agent until the slowest finishes. The tool returns a task id immediately and the run continues in the background, notifying through the same channel background agents already use; `/agents → Workflows` opens a live inspector, and each invocation's script is persisted so iterating means editing that file and re-running rather than resending it. Ported from Claude Code down to its state model — progress is an append-only event log whose agent entries are keyed by index, last write wins — so a script written for Claude Code runs here unchanged.
|
|
259
|
+
- **Workflow scripts run in a `node:vm` context inside a worker thread, and cannot be non-deterministic.** `Date.now()`, `new Date()` and `Math.random()` throw, because a script that varies run to run cannot be replayed from a journal later; stamp times after the workflow returns or pass them in through `args`. Code generation is disabled, so `eval` and `Function(...)` throw `EvalError`; only the workflow globals are injected, with `Object`/`Array`/`JSON`/`Promise` coming from the vm realm itself rather than the host, since a host built-in's `.constructor` is the host `Function`. Values crossing in or out are checked for cycles, non-finite numbers, sparse arrays, symbol keys and exotic prototypes. Concurrency is capped at `max(1, min(16, cpus - 2))` — the raw `min(16, cpus - 2)` is 0 on a two-core machine — with 1000 agents per run and 4096 items per `parallel`/`pipeline` call. Treat the sandbox as a determinism and accident boundary, not a defence against a hostile script: the injected globals are host closures, and disabled code generation is what actually stops one being used to compile anything.
|
|
260
|
+
- **`agent()` takes `schema`, and resolves to a validated object rather than text.** The child is given a `StructuredOutput` tool built from the caller's JSON Schema, and answers through it under three soft pressures rather than one hard one: `constrainedSampling` (`strict: "prefer"`, so a provider that cannot constrain falls through rather than failing the call), the tool's own description and guideline, and validation here. Claude Code _forces_ the call and this cannot — `toolChoice` exists in pi-ai's provider layer but is not plumbed through `AgentSession`. A payload that does not match is rejected straight back to the child so it can correct itself, a child that answers in prose instead gets one further prompt, and one that still does not comply fails — so the call returns `null` rather than something unparseable downstream. The validated payload lands on `record.structuredJson` and not `record.result`, which picks up the worktree branch note and would corrupt the object. The retry is a second `session.prompt` inside `runAgent`, before the worktree is cleaned up, so a corrected answer still sees the tree it was working in. Schemas are validated with typebox v1 — `@sinclair`'s own validator throws on a raw JSON Schema, which is exactly what a workflow script hands us. Mutually exclusive with `resume`, whose session was created before the tool existed.
|
|
261
|
+
- **`agent()` takes `gate`, so a workflow can verify work by running a command rather than asking another model.** `agent(prompt, { gate: "npm test" })` runs the command after the agent finishes and fails it on a non-zero exit, folding the command's output into the existing failure shape — no new state, so the card, the inspector and the returned `null` all handle it with the code they already had. With `isolation: "worktree"` the gate runs **inside that child's worktree**, which required a new `onBeforeWorktreeCleanup` hook on the manager: the settle path commits the copy to a branch and removes it before the spawn resolves, so a gate that read the path afterwards would silently verify the main tree and could pass while the child's actual changes were broken. `agent()` also takes `resume: "<label>"`, continuing the child that ran under that label instead of re-paying its context; a resumed child keeps its stored agent type, model and tree, so `agentType`, `model` and `isolation` are rejected alongside it rather than silently dropped. A gate-rejected child stays resumable, which is what makes "here is what the tests said, fix it" a loop.
|
|
262
|
+
- **`agent()` takes `effort`, the reasoning level for that one child.** One of pi's thinking levels (`minimal` … `max`). Omitted, the agent definition's own `thinking` decides and then the parent's — the same precedence `model` already followed, so the two options behave alike rather than each having its own rule. It is what lets a script spend depth where the thinking actually is: `low` for a mechanical stage, a high tier only for the hardest verify or judge step.
|
|
263
|
+
- **`budget` is present and always reports no token target.** Claude Code's scripts guard on it — `while (budget.total && budget.remaining() > 50_000)`, `budget.total ? Math.floor(budget.total / 100_000) : 5` — and pi has no `+500k`-style directive for it to read. Rather than omit the global and turn every one of those guards into a `ReferenceError`, `total` is permanently `null` and `remaining()` is `Infinity`, so each takes the branch it was written for: the loop does not fire, the fallback fleet size is used. `spent()` is real — output tokens this run's agents have used — so a script that only reports spend still reports something true.
|
|
264
|
+
- **`workflow(nameOrRef, args?)` composes a saved workflow inline, one level deep.** The child runs in the _parent's_ worker and vm context, as a function whose parameters shadow the globals, which is why it shares the concurrency semaphore, agent counter, abort signal, journal and budget by construction rather than by being handed each of them — there is only ever one of each. What it does not share is ambient phase state, which lives on the scope, so a child's `phase()` cannot rename its parent's groups; its agents appear under their own `▸ name` group instead. A `workflow()` inside a child throws naming the limit rather than failing with `workflow is not defined`, which is what Claude Code's one-level rule reads like from inside a script.
|
|
265
|
+
- **A workflow that finishes with an un-awaited `agent()` fails instead of discarding it.** A dropped `await` in a pipeline stage would otherwise let the script return while children were still running, throwing their results away silently. The check is host-side — the runtime already tracks every launch — so it needs no `Promise` proxy in the sandbox, and it fails fast rather than draining: waiting out a hung agent that ignores its abort signal would wedge the run's completion indefinitely. An intentionally aborted run does not report un-awaited launches.
|
|
266
|
+
- **Saved workflows: `name: "<name>"` resolves `<name>.js` from `.pi/workflows/`, `.agents/workflows/` or the user's agent dir.** A script worth running twice belongs in a file rather than in a tool call that re-sends its source every time. The roots mirror `loadCustomAgents`', so a workflow follows the user the same way an agent does, and project shadows global. Those are ordinary folders that may hold anything, so only files carrying an `export const meta =` declaration are listed or resolved — naming a build artifact reports that it is not a workflow rather than erroring out of the parser several frames deep. Nothing in the file is executed to decide that: the check is a regex over the source, and even a real parse evaluates only the `meta` object literal, in an empty `node:vm` context under a 100ms bound.
|
|
267
|
+
- **`resumeFromRunId` replays a run's unchanged prefix instead of re-paying for it.** Every run journals each settled `agent()` call beside its persisted script as `<run id>.workflow.jsonl`; resuming replays the leading calls that still match and runs the first changed one — and everything after it — live. It is a _prefix_ and not a lookup: a later call that still matches is deliberately not reused, because its recorded answer was produced downstream of work that no longer exists. A journaled failure is never replayed as a failure, so resuming a run that died at agent 5 retries exactly agent 5. A run that used `agent({ resume })` declines the cache whole — a replayed agent is text from a file, so there would be no live conversation in the new run for the `resume` to continue. Same session only, and the run has to have finished. Replayed rows are annotated `from resume journal` on the card and in the dialog, and the completion notification counts them, so a resume never looks like a run that was simply fast.
|
|
268
|
+
- **`/agents → Workflows` opens a two-level inspector with live run controls.** The outer level is the phases and their agents; `⏎` descends into one agent's prompt, tool activity and outcome. `p` pauses, which stops _starting_ agents while the running ones finish — killing model work mid-turn discards everything it has already spent — and the held time comes off the run's clock rather than inflating its duration. `s` skips the selected agent: its `agent()` call returns `null`, exactly as a terminal failure does. `r` retries one, stopping the child and running the same call again so the script's still-pending promise receives the new answer; running agents only, since a settled call has already handed its value to the script and a re-run would have nowhere to put one. Skipping is immediate for a running agent and for one held at a pause, while an agent parked behind the concurrency limit takes its skip when it reaches the front of the queue.
|
|
269
|
+
- **A run shows as a single `workflow` row in the fleet list, and owns its agents.** `⏎` on the row opens the same inspector `/agents → Workflows` does, rather than a conversation overlay. The run's own agents are not listed separately anywhere: they are filtered out of the fleet list, the above-editor widget, the `/agents` menus and `@handle` resolution exactly as nested children are, because they report through the run and surfacing them twice would double-count the same work in the places a person reads. They are outside the `maxConcurrent` pool for the same reason, and outside `maxConcurrentForeground` too — the run already caps its own fan-out, and charging it to a session limit as well would let one workflow queue behind, or starve, everything else you are doing.
|
|
270
|
+
- **`pi --subagents-workflow-file=<path>` runs a workflow at startup.** Useful for a scripted or headless run (`pi -p --subagents-workflow-file=review.js`). The flag is registered at activation but read at `session_start`, because pi applies CLI values only after every extension has loaded — reading it earlier yields the registered default. Prefer the `=` form: the bare `--flag value` spelling consumes the next argument, so a flag written before a prompt eats the prompt. With no tool call to attach to, the run renders as a session entry through the same layout the tool result uses, and its outcome is handed to the model as context for its next turn rather than forcing one.
|
|
271
|
+
- **`workflowsEnabled` (default on, and an unset value means _auto_).** Off is not a soft hide: the tool is never registered, so the model is not told the feature exists and pays no tool-spec context for it, the `/agents → Workflows` entry is hidden, and `--subagents-workflow-file` refuses with a pointer to the setting rather than doing nothing. Left unset it is on _unless_ another extension already offers a `Workflow` or `SubagentWorkflow` tool, in which case this one warns — naming the source and the setting that keeps ours — and stands down for the session: two orchestrators in one tool spec is worse than either alone, since the model has to guess which to call and pays for both descriptions to find out. Setting it explicitly pins the answer in either direction, because a default may be overridden by what else is loaded and a choice may not. The check cannot gate registration — `getAllTools` throws during extension loading, and load order means a registration-time check could not see an extension that has not loaded yet — so the tool registers and is withdrawn from the active set at `session_start` through `setActiveTools`, which rebuilds the system prompt before any turn runs. Matching is exact against those two names and never a substring, so a `list_workflows` or `github_workflow_run` from some CI integration cannot silently take the feature down. `snapshotSettings()` persists the user's answer rather than the effective one, so a session-scoped stand-down is not frozen into an explicit `false` by an unrelated toggle three menus away — and cannot outlive the extension it was deferring to.
|
|
272
|
+
|
|
273
|
+
### Changed
|
|
274
|
+
|
|
275
|
+
- **The pi peer floor moves from `>=0.81.0` to `>=0.84.0`.** The `SubagentWorkflow` tool needs two host APIs that did not exist at the old floor, and both are typecheck failures there rather than features that quietly do nothing: `constrainedSampling` on pi's `ToolDefinition` (0.82.0), which is how an `agent()` call carrying a `schema` holds the child's payload to that schema at sampling time, and pi-tui's `stripTerminalSequences` (0.84.0), which the workflow card and the `/agents → Workflows` inspector use to strip the resets `truncateToWidth` wraps its ellipsis in. Reimplementing the latter here would have held the floor at 0.82, but it has to match the host's own truncation behaviour exactly to stay correct, and duplicating a host utility to buy back two minor versions is the worse trade. The CI floor job installs 0.84.0 and runs the full typecheck and suite against it, since a green run there is the only evidence behind the range; the e2e that set the previous floor still runs unconditionally, it just no longer pins the lower edge.
|
|
276
|
+
- **Worktree isolation no longer blocks the UI: its twelve git calls moved from `execFileSync` to `pi.exec`.** They ran synchronously on the TUI's event-loop thread with timeouts up to ten seconds, so a `git worktree add` on a large repo froze the whole interface — and workflows make that worse, since a parallel fan-out of worktree children turns one blocking call into several run back to back. `AgentManager.spawn()` keeps its synchronous signature and still returns an id immediately, which the tool, the scheduler and the cross-extension RPC all depend on; worktree creation moved instead into the async run path, behind a new `awaitStartup(id)` that resolves once the run is underway and rejects with the strict-isolation error `spawn()` used to throw. Failure handling is preserved on both paths: an immediate spawn drops the record so no orphan appears in `listAgents()`, while a queue-drained one records the error. The pool slot is now claimed before the awaited copy rather than after, or `drainQueue`'s synchronous loop would start every queued agent at once and `abort()` could not reach one mid-start. `pi.exec` reports a timeout as exit code 0 with `killed` set, so that flag is checked separately — the one failure that would otherwise read as success.
|
|
186
277
|
|
|
187
278
|
### Fixed
|
|
188
279
|
|
|
189
|
-
- **
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
280
|
+
- **The conversation viewer no longer re-scans the output it is hiding, or re-parses Markdown it already knows throws** ([#263](https://github.com/tintinweb/pi-subagents/issues/263) — thanks [@HerbertGao](https://github.com/HerbertGao)). The 16k-character result cap counted the omitted tail by splitting it on newlines, so every render _and_ every scroll walked and allocated the whole hidden remainder — 70ms per frame on a 32MiB result, against 0.7ms for the `length` subtraction that replaces it. The notice now reports characters rather than lines, abbreviated past a thousand (`1.1M more characters`) so it survives `truncateToWidth` on a narrow frame. Separately, the per-message Markdown cache cleared its `failed` flag on every streaming delta, so a message that had already overflowed pi-tui's recursive renderer was retried — and thrown out of — on each append; the literal fallback now sticks until the content is replaced or shortened, which is the only way a failing prefix can become parseable again.
|
|
281
|
+
|
|
282
|
+
## [0.18.2] - 2026-08-24
|
|
283
|
+
|
|
284
|
+
### Added
|
|
285
|
+
|
|
286
|
+
- **`maxConcurrentForeground` — an opt-in concurrency limit for blocking subagents** ([#253](https://github.com/tintinweb/pi-subagents/issues/253) — thanks [@WinPooh32](https://github.com/WinPooh32)). `maxConcurrent` never covered foreground agents, and pi dispatches a message's tool calls through `Promise.all`, so several `Agent` calls with `run_in_background: false` in one message ran with no ceiling at all — expensive rather than fast on local models, where parallel agents thrash the prompt cache. They now queue in a second pool, deliberately independent of `maxConcurrent`: a foreground agent blocks the parent anyway, so charging it to the background pool would let a saturated pool starve the main session. Default `0` = unlimited, which is the existing behaviour exactly; set it at `/agents → Settings → Max foreground concurrency` or in `subagents.json`, applied live. A waiting agent shows in `/agents` as `queued` and can be stopped there or with Esc. Nested children are exempt — their parent is blocked _awaiting them_, so queueing a child behind its own parent would deadlock — as are detached spawns and foreground `resume`.
|
|
287
|
+
|
|
288
|
+
### Fixed
|
|
289
|
+
|
|
290
|
+
- **`scopeModels` is enforced on the cross-extension RPC spawn path** ([#240](https://github.com/tintinweb/pi-subagents/issues/240)). The allowlist was applied by the `Agent` tool and the nested delegation tools but not by `subagents:rpc:spawn`, so every cross-extension caller passed straight through it: an orchestrator on OpenRouter passed `model: "sonnet"` via pi-tasks `TaskExecute`, it fuzzy-resolved to `anthropic/claude-sonnet-4` and ran — billed to OpenRouter, with `anthropic/*` nowhere in `enabledModels`, and `scopeModels: true` giving no protection. A model on the RPC payload is an orchestrator-level choice exactly like `Agent({ model })`, so it now gets the same hard error listing the allowed models, returned as an error envelope the caller reports as a failed spawn. The check reads the _resolved_ model, since resolution is fuzzy enough to land on a provider the caller never named. Frontmatter-pinned and parent-inherited models are untouched and keep warn-and-proceed. The guard covers a `Model` object as well as the serialized string form; `null` still means inherit. The scheduler is deliberately unchanged — a job's model is scope-checked when the job is created, and a stored job is user-level config, which the policy trusts.
|
|
291
|
+
|
|
292
|
+
## [0.18.1] - 2026-08-24
|
|
293
|
+
|
|
294
|
+
### Added
|
|
295
|
+
|
|
296
|
+
- **`subagents:rpc:consume` — a cross-extension caller can say it has already shown an agent's result** ([tintinweb/pi-tasks#62](https://github.com/tintinweb/pi-tasks/issues/62) — thanks [@felipe3dfx](https://github.com/felipe3dfx)). `get_subagent_result` suppresses the completion notification for a result it hands back, but it is a tool the parent model calls; an extension that joins an agent on `subagents:completed` and reports the result itself had no way to do the same, so the notification still arrived — after the parent had answered — and cost a turn to dismiss. The new RPC marks a settled agent's result consumed, exactly as the tool does. Running and unknown agents are refused, so a caller cannot silence an agent whose result nobody has read yet. Deliberately outside the `subagents:rpc:ping` version handshake: it is additive and best-effort, and an extension built against protocol v2 simply never calls it.
|
|
297
|
+
- **`showModel` — the model and thinking level on the widget's running rows.** A row reads `Explore inspect code · sonnet 4.6 · thinking: high · ↻3 · 8.2k token · 4.1s`. Off by default, and the only surface that is gated: the row already carries the description, turns, tool uses, tokens and elapsed time, and every character it gains is one the description loses on a narrow terminal. Finished rows and the `◦ N queued` summary are untouched — a fan-out that queues ten agents would otherwise push every finished agent out of the twelve-line widget. Toggle at `/agents → Settings → Show model`; applied live.
|
|
298
|
+
|
|
299
|
+
### Fixed
|
|
300
|
+
|
|
301
|
+
- **Ctrl+C closes the conversation viewer** ([#255](https://github.com/tintinweb/pi-subagents/pull/255) — thanks [@elrond298](https://github.com/elrond298)). The overlay closed on `Esc` and `q` but swallowed `Ctrl+C`, the reflex key for backing out of a full-screen TUI view, leaving the viewer stuck on screen for anyone who reached for it.
|
|
302
|
+
- **The subagent surfaces name the model the run actually used** ([#168](https://github.com/tintinweb/pi-subagents/pull/168) — thanks [@xz-dev](https://github.com/xz-dev), whose PR is the report and the design here). The model was shown only when it differed from the parent's, so the common case — an agent that inherits it — rendered `thinking: max` with nothing to attach the level to, and no way to tell from the widget alone what was driving a given agent. It is now shown unconditionally, and it is the _effective_ model rather than the requested one: pi resolves its own defaults and clamps the thinking level to what the model supports at session creation, and none of that reached the record. The child session is now read back onto `AgentRecord.invocation` once, at session creation, and every surface reads that one place instead of each re-deriving "the session, else the request" for itself. Tight rows get a short label (`haiku 4.5`); the conversation viewer's `↳` row, which has the width for it, gets the canonical `provider/model-id`, since two providers can serve models whose short names read alike. Agents started outside the `Agent` tool — cross-extension RPC, `@handle` mentions — carried no invocation at all and so had no `↳` row; they now get one naming their model and level.
|
|
303
|
+
- **A resume renders the session it reopens, not the parameters of the resume call.** `resumeAgent` only prompts the existing session — it cannot re-apply a model or a thinking level — but the result rendered the resume call's parameters, so `resume: <id>` with `model: google/gemini-3-pro` displayed Gemini for a run that never left the model it was created with. Both resume paths, foreground and background, now render the record.
|
|
304
|
+
- **Configuration a spawn could not honour is disclosed rather than presented as what was asked for** ([#182](https://github.com/tintinweb/pi-subagents/issues/182)). An agent file's pinned `model` or `thinking` outranks the matching tool-call parameter, and pi clamps a level the model cannot reach; both silently replaced the request, which is the comparison the invocation snapshot exists to support ([#62](https://github.com/tintinweb/pi-subagents/issues/62)). The request is now kept beside the effective value — `thinking: low (asked max)`, `haiku 4.5 (asked anthropic/claude-opus-4-6)` — on every surface that renders either. Models are compared after resolution, not as spelling: input is fuzzy, so `model: "haiku"` against a pinned `anthropic/claude-haiku-4-5` is the same model and discloses nothing, while a spelling that resolves to no available model is disclosed precisely because it cannot have taken effect. This is the _disclose_ half of #182 and only for these two fields; `max_turns` is still silently overridden, and rejecting a conflicting parameter outright remains open.
|
|
305
|
+
- **Scheduled runs record how they were configured.** A job spawns with no tool call to build an invocation snapshot from, so its conversation viewer said nothing about the thinking level, turn budget or isolation the schedule set. The job's own configuration is now the snapshot, with the model left to the session read-back and an unlimited turn budget (`max_turns: 0`) normalised out rather than rendered as the misleading `max turns: 0`.
|
|
306
|
+
|
|
307
|
+
## [0.18.0] - 2026-08-20
|
|
308
|
+
|
|
309
|
+
> **⚠️ Breaking — an `Agent` call that doesn't say now runs in the background** (`backgroundByDefault`). Following Claude Code, where the agent backgrounds unless the caller passes `run_in_background: false`. An unqualified spawn no longer blocks the turn and no longer returns the agent's output inline: it returns an ID immediately, and the completion notification carries a preview (500 chars solo, 300 grouped) with the full text behind `get_subagent_result`. Set `backgroundByDefault: false` to restore the previous behaviour globally; an explicit `run_in_background` on the call or in frontmatter overrides the setting in both directions. **Nested spawns are unchanged** — an agent spawning its own agent still defaults to foreground, because a detached child is stopped by `abortOwnedChildren` when its parent settles and has no notification path of its own. Two consequences worth planning for: `maxConcurrent` now applies to nearly every spawn where foreground used to bypass it (its default is raised 4 → 10 to compensate), and Esc interrupts the turn without stopping the agents it started — stop those from `/agents → Running agents`, which is also how Claude Code separates the two.
|
|
310
|
+
|
|
311
|
+
### Added
|
|
312
|
+
|
|
313
|
+
- **`reportUsage` — subagent tokens and cost count towards this session's own totals** ([#193](https://github.com/tintinweb/pi-subagents/issues/193), [#203](https://github.com/tintinweb/pi-subagents/issues/203) — thanks [@johnstegeman](https://github.com/johnstegeman) and [@unrelentingfox](https://github.com/unrelentingfox)). Subagents run in their own pi sessions, so nothing they spent reached the parent's `getSessionStats()`: a session that delegated most of its work read as nearly free in the footer, the statusline and `/cost`. With the setting on, each `Agent` / `get_subagent_result` / `steer_subagent` result carries the spend accumulated since the last one, which pi folds into the session totals and attributes to `/cost`'s "Tools/summaries" bucket. Off by default — it changes numbers you may already be tracking. Agents that finish in the background have no result of their own to ride on, so their spend lands on the next call rather than the moment they finish; nested agents are covered, counted once each, on the top-level result. Cost is pi's own per-message figure, and the context-window percentage is unaffected. Implemented independently in [#202](https://github.com/tintinweb/pi-subagents/pull/202), whose `cacheRead` reasoning corrected this one: the cached prefix is genuinely re-read and re-billed per call, and pi counts it that way for the session's own messages, so the report includes it even though the extension's own token displays still exclude it ([#38](https://github.com/tintinweb/pi-subagents/issues/38)).
|
|
314
|
+
- **`showCost` — an estimated cost beside subagent token counts** ([#194](https://github.com/tintinweb/pi-subagents/pull/194) — thanks [@daanzu](https://github.com/daanzu), whose PR is the display design here). Shown in the widget, FleetView, the conversation viewer, foreground results, `get_subagent_result` and completion notifications, with a batch total when several background agents finish together. Off by default, and shown only when there is a cost to show: a model pi has no pricing data for reports zero, and `$0.00` beside its tokens would say the run was measured and found free rather than never measured. Figures keep cents at minimum and four decimals at most (`~$0.0042`, `~$1.24`), because rounding everything to cents printed one number for runs that differed fourfold.
|
|
315
|
+
- **Lifecycle events carry the run's spend as a pi `Usage`** ([#137](https://github.com/tintinweb/pi-subagents/issues/137), [#138](https://github.com/tintinweb/pi-subagents/pull/138) — thanks [@leset0ng](https://github.com/leset0ng)). `subagents:completed` and `subagents:failed` gain a `usage` field alongside `tokens`, carrying the token components — `cacheRead` included — and `cost.total` in USD. It is pi's own `Usage`, the shape pi puts on `ToolResultEvent` and `AssistantMessage`, so the money is where a listener already looks and anything pi adds to `Usage` needs no change here. Omitted when nothing was spent, so _spent nothing_ stays distinguishable from _never ran_. `tokens` is unchanged and still the display total, which excludes `cacheRead` ([#38](https://github.com/tintinweb/pi-subagents/issues/38)) — the two answer different questions and neither derives from the other. This is the aggregate only — the per-message `{timestamp, provider, model, usage}` records those asked for, and the per-model attribution they enable, remain out of scope (#137 was declined and #138 withdrawn by its author).
|
|
316
|
+
|
|
317
|
+
### Changed
|
|
318
|
+
|
|
319
|
+
- **The pi peer floor moves from `>=0.80.0` to `>=0.81.0`.** `reportUsage` is built on pi folding `toolResult.usage` into `getSessionStats()`, which pi only started doing in 0.81.0 — every 0.80.x sums assistant messages alone and drops the field, so the setting would have been present and silently inert there. The CI floor job installs 0.81.0 and runs the suite against it, which is what caught this; the e2e that pins the behaviour runs unconditionally rather than skipping, so the range cannot quietly stop being true. Nothing else in the extension needed 0.81.
|
|
320
|
+
- **Top-level `Agent` spawns default to background, behind a new `backgroundByDefault` setting** (see the breaking note above). Configurable at `/agents → Settings → Background by default` and in `subagents.json`; applied live. Nested spawns pass `false` unconditionally and ignore the setting.
|
|
321
|
+
- **The background concurrency limit's default is raised from 4 to 10.** Foreground agents bypass the `maxConcurrent` pool entirely, so while foreground was the default a six-way fan-out ran six; with background as the default every top-level agent takes a slot, and a limit of 4 would have silently queued the tail of exactly the parallel fan-outs the `Agent` tool description tells the model to send. Still configurable — the ceiling is unchanged.
|
|
322
|
+
- **The agent-file writer emits `run_in_background: false` rather than dropping it.** It wrote the field only when truthy, which was lossless while omission and `false` meant the same thing; under `backgroundByDefault` they no longer do. No current path reaches it — `serializeAgentFile`'s only caller is Eject, which is offered for built-in defaults, and those omit the field — so this is the writer half of the format keeping pace with the loader, not a fix for observable behaviour.
|
|
323
|
+
|
|
324
|
+
### Security
|
|
325
|
+
|
|
326
|
+
- **`nanoid` bumped to `^5.1.16`** ([#245](https://github.com/tintinweb/pi-subagents/issues/245) — thanks [@jyn514](https://github.com/jyn514)). The `^5.0.0` range resolved to 5.1.15, inside the affected range of [GHSA-28wg-ghj8-5hjv](https://github.com/advisories/GHSA-28wg-ghj8-5hjv), so `npm audit` failed on a clean install. Not reachable at runtime — the one call site passes a fixed positive size (`nanoid(10)`, for scheduled-job ids).
|
|
327
|
+
|
|
328
|
+
### Fixed
|
|
329
|
+
|
|
330
|
+
- **Subagent sessions now close the extension lifecycle they open** ([#242](https://github.com/tintinweb/pi-subagents/issues/242) — thanks [@bsv9](https://github.com/bsv9)). Every child session binds extensions so `session_start` fires and they can set up per-session state, but nothing emitted the matching `session_shutdown`: `AgentSession.dispose()` only invalidates the `ExtensionRunner`. Whatever an extension armed in `session_start` — timers, fs watchers, sockets, temp dirs — therefore leaked one set per spawn, teardown a `session_shutdown` handler owns (killing runs started by that child, say) never ran, and the 10-minute record sweep turned the leak into a crash: disposing invalidated the runner while a leaked timer was still armed, so its next tick threw `assertActive()` from a bare `Timeout._onTimeout` — an `uncaughtException` that took interactive pi down with it. Both eviction and quit now emit `session_shutdown` (reason `quit`) before disposing, which is what pi itself does in `AgentSessionRuntime.dispose()`. Quit waits for those handlers rather than exiting past them, bounded at three seconds per session so one that hangs cannot strand you at a torn-down TUI; a session whose extensions register no handler is untouched and still disposes synchronously. Independently fixed in [#228](https://github.com/tintinweb/pi-subagents/pull/228) and [#170](https://github.com/tintinweb/pi-subagents/pull/170) — thanks [@v-kuskov](https://github.com/v-kuskov) and [@liu-qingyuan](https://github.com/liu-qingyuan).
|
|
331
|
+
- **The `Agent` tool no longer tells the model that foreground agents run one at a time** ([#232](https://github.com/tintinweb/pi-subagents/issues/232) — thanks [@willfenton](https://github.com/willfenton)). _"Foreground calls run sequentially — only one executes at a time"_ was never true: pi's agent loop dispatches a message's tool calls through `Promise.all` unless the whole batch opts out via `toolExecution: "sequential"` or some tool in it declares `executionMode: "sequential"`, and this extension sets neither — two foreground `Agent` calls in one message start within microseconds of each other. Nothing serialized them at this layer either; `agent-manager` deliberately exempts foreground agents from the `maxConcurrent` queue, since they block the parent anyway. The claim was self-inflicted rather than inherited: `d0cb511` replaced a correct bullet with it, and the later upstream-alignment pass grafted it onto the end of Claude Code's real sentence instead of replacing it, which also left an invented `with run_in_background: true on each` qualifier in the middle — upstream says a single message with multiple tool uses runs concurrently, full stop. Both are gone, restoring upstream's wording (minus its build-validator/test-runner example, consistent with the examples already omitted for token cost). The cost of the error was steering: an orchestrator that wanted parallelism was pushed into background spawns it did not need, paying a queue slot and a notification round-trip for concurrency it already had. Investigating where the sentence came from is what surfaced the default divergence in the breaking note above, so the two ship together — the remaining foreground/background prose is now Claude Code's own, including the `Don't race` bullet that only earns its place once background is the default.
|
|
332
|
+
- **Scheduled and RPC-spawned agents show their token counts in the widget, and finished agents keep theirs in the conversation viewer.** Both surfaces read spend from the live activity tracker, which only `Agent`-tool spawns get and which is deleted the moment an agent finishes — so those agents rendered with no token stats at all. Every surface now reads it from the agent's record instead: the record is the only total that outlives the run and the only one a nested child's spend is folded into, so the figure no longer jumped upward at completion as the read switched from one to the other. The tracker keeps what is genuinely live — tool activity, turn count, context percentage — and no longer accumulates a second copy of the totals. Spotted in [#194](https://github.com/tintinweb/pi-subagents/pull/194) — thanks [@daanzu](https://github.com/daanzu).
|
|
333
|
+
- **Agents started outside the `Agent` tool say what they are doing, instead of `thinking…` for their whole run** ([#181](https://github.com/tintinweb/pi-subagents/pull/181) — thanks [@xz-dev](https://github.com/xz-dev)). The widget's activity line and turn counter come from an activity tracker that only the `Agent` tool handler created, so an agent started through cross-extension RPC (the path `TaskExecute` uses), through an `@handle` mention, or through the `Symbol.for("pi-subagents:manager")` registry showed a permanent `thinking…` while the same row's tool-use count climbed beside it and the conversation viewer showed the real work. The tracker now belongs to the one funnel all three spawn paths pass through, so none can be missed and none can supply half-wired callbacks of its own; the `Agent` tool reaches the manager directly, so nothing is double-tracked. Its turn ceiling is resolved exactly the way the run resolves the limit it enforces — explicit value, else the agent's own `max_turns`, else the project default — rather than read off the caller's options, which a mention deliberately omits so the agent file can decide: the row would otherwise render `↻3` where the tool renders `↻3≤20`. Scheduled jobs still spawn through the manager and so still render without per-tool detail.
|
|
334
|
+
|
|
335
|
+
## [0.17.1] - 2026-08-18
|
|
336
|
+
|
|
337
|
+
### Fixed
|
|
338
|
+
|
|
339
|
+
- **A `model`-mode mention now actually reaches the agent it starts.** The off-screen clone was built with an empty tool allowlist, which stripped its own `Agent` tool, so every start fell back to a direct spawn with a warning. Fixing that surfaced a second bug behind it: the clone spawned in the foreground, answering into a session disposed moments later, so the agent ran and reached nobody. Its spawn is now forced to the background.
|
|
340
|
+
- **`@` offers files again.** Handle rows are merged into pi's own suggestion list instead of replacing it — the provider asked pi only when no agent matched, and prefix matching meant an empty token matched every handle, so a bare `@` listed no files at all.
|
|
341
|
+
|
|
342
|
+
## [0.17.0] - 2026-08-17
|
|
343
|
+
|
|
344
|
+
> **⚠️ Note — an agent file's frontmatter `name:` now substitutes for the filename as its `subagent_type`.** Following Claude Code, the declared name is the dispatch identity and the filename is only the fallback, so `blubb.md` with `name: code-review` is spawned, mentioned and listed as `code-review`. Any value is accepted except one containing `:`, which Claude Code reserves for plugin scoping; such a file — like any unparseable one — is skipped with a warning rather than loaded under a name nothing honours, and `strictAgentFiles` turns that into a startup failure.
|
|
345
|
+
|
|
346
|
+
> **⚠️ Breaking — subagent sessions now persist to disk by default** (`rememberAgents`). Transcripts that used to be in-memory are written to the session dir and appear nested under their spawner in pi's `/resume`. Per-agent `persist_session:` overrides it in both directions — `false` keeps that agent in memory, `true` persists it even with the setting off. Set `rememberAgents: false` to restore the previous behaviour globally.
|
|
347
|
+
|
|
348
|
+
### Added
|
|
349
|
+
|
|
350
|
+
- **Subagents are addressable from the prompt: `@handle message` goes to that agent instead of the main model.** Reaching one previously meant spending a main-model turn on `steer_subagent`, or walking the FleetView. The handle names the agent, not one process, so a running or queued agent is messaged, a finished one is resumed in the background, and one that never ran is started — the reply arrives as the ordinary background-completion notification either way. Every agent gets a handle from its type, numbered on collision (`explore`, `explore-2`), offered by `@` completion alongside pi's file completion. Only a leading `@handle` followed by a message is a send, so a bare `@explore`, a mid-sentence mention and `@src/index.ts` still reach the model; toggle with `agentMentions`.
|
|
351
|
+
- **Mentioning an agent that isn't running now starts it through an off-screen clone of the conversation.** A throwaway copy of the session takes a turn holding only the `Agent` tool, so the model writes the agent's prompt from the conversation instead of forwarding your typed line — the context-aware prompt Claude Code gets from its own mention flow, without a visible turn narrating a decision the handle already made. Nothing enters the chat but a `Starting @plan…` toast, and what starts is an ordinary top-level agent with a transcript, widget detail and a handle. `agentMentions` accordingly takes `"model"` (default), `"direct"` — the previous behaviour, started from your text with no model call — or `"off"`; the old booleans still read as `"model"`/`"off"`. Messaging a running agent and resuming a finished one are direct in both modes, a clone that cannot run falls back to a direct start rather than losing the mention, and `"model"` lifts the TUI-only restriction for starts, so `pi -p '@plan the migration'` now works.
|
|
352
|
+
- **`@handle` keeps working after the agent's record is gone.** Handles used to expire with the in-memory record ~10 minutes past completion, silently flipping `@explore anything else?` from _resume_ to _start fresh_. An evicted agent now leaves a tombstone and the mention reopens its session from disk (requires `rememberAgents`, below). Only the definition is re-resolved, so a continuation runs under the type's current frontmatter — and a resume whose type has since been deleted or disabled is refused rather than falling back to another agent. Tombstones cap at 100 and clear on `/new` and session switch.
|
|
353
|
+
- **The model can `name` an agent, and names work wherever ids do.** `Agent` takes an optional `name`, so an agent can be `@auth-audit` instead of leaving you to tell `@explore-2` from `@explore-3`. Naming is additive — the type-derived handle is still assigned, and both draw from one namespace, so neither can shadow the other. `steer_subagent` and `get_subagent_result` now accept a handle as well as an id, ids first, so existing calls are unchanged.
|
|
354
|
+
- **`@main <message>` forces text to the main model; `@agent-<type>` is a synonym.** `main` is reserved and can never be allocated to an agent, so a leading `@main` is stripped and the rest passes through with its attachments — the escape hatch for text that only looks like a mention. `@agent-explore fix it` is Claude Code's manual spelling; the handle as written wins, so an agent actually called `agent-explore` stays reachable. Handles cap at 64 characters.
|
|
355
|
+
- **`worktreeIsolation` project setting — turn worktree isolation off for a whole repo** ([#184](https://github.com/tintinweb/pi-subagents/issues/184) — thanks [@tinysnake](https://github.com/tinysnake)). On a repo large enough that every worktree costs real time and disk, the only defence was asking the model not to request one. Set `"worktreeIsolation": false` in `subagents.json` (or `/agents → Settings → Worktree isolation`) and the `Agent` tool's `isolation` parameter is dropped from the schema entirely, along with the usage-note bullet describing it and the `/agents` generator's frontmatter field — the same trade `schedule` already makes when scheduling is disabled, and necessary, since prose left behind teaches the model to pass a parameter that is no longer declared and to report a branch that was never created. The refusal is enforced below the tool boundary as well, so it also covers agent files, scheduled jobs and the cross-extension RPC path, and a requested worktree is downgraded to a normal run rather than failing the call. Default is unchanged (`true`); the parameter and its prose appear or disappear on the next pi session, since both are built at tool registration, while the refusal applies immediately.
|
|
356
|
+
|
|
357
|
+
### Fixed
|
|
358
|
+
|
|
359
|
+
- **The `Agent` tool no longer tells the model a worktree's path is returned in the result.** It never was: `cleanupWorktree` removes the worktree directory before returning and the record keeps only `{ hasChanges, branch }`, so a model acting on the promised path would have been sent to a deleted directory. The neighbouring claim that the worktree is "automatically cleaned up if the agent makes no changes" was misleading in the same way — the directory is removed in both cases; what is conditional is whether a branch survives. Both had been in the tool description since worktree isolation shipped, inherited from Claude Code's wording; the README's completion summary said the same thing loosely and has been corrected too.
|
|
360
|
+
- **`isolation` accepts `"off"`, so a model that fills every optional parameter can decline a worktree** ([#231](https://github.com/tintinweb/pi-subagents/issues/231), [#184](https://github.com/tintinweb/pi-subagents/issues/184), via [#201](https://github.com/tintinweb/pi-subagents/pull/201) — thanks [@Munsen](https://github.com/Munsen)). As a single-value optional literal, `isolation` was the one parameter whose only expressible value had an expensive side effect, and every other optional field has an inert filler — so a model that fills everything in reflexively ended up reviewing a staged diff inside a fresh copy of the repo that contained none of the work, over and over, against its own stated intent to omit the parameter. `"off"` is now a legal value — listed first and described as the default — and is also accepted in agent frontmatter (`none`, `no` and `false` too), where it becomes a genuine veto: frontmatter outranks tool-call parameters, so it refuses a worktree even when the caller asks for one, which no value could previously do. The parameter description now also warns that a worktree cannot see uncommitted or staged work, the specific trap here. One behaviour change to note: an agent file already carrying `isolation: none`/`no`/`false` used to parse to nothing at all, leaving a caller free to supply `worktree` anyway; it now parses to `off` and refuses one.
|
|
361
|
+
|
|
362
|
+
### Changed
|
|
363
|
+
|
|
364
|
+
- **Frontmatter `name:` is now the agent's _type_ rather than a display-label alias** (see the note above). `display_name:` still sets the label, and a file setting only `name:` badges as that name, since the label falls back to the type. A file whose `name:` differs from its filename changes `subagent_type`; rename the field to `display_name:` to keep the old identity.
|
|
365
|
+
- **Subagent sessions are persisted by default (`rememberAgents`)** (see the note above). They previously ran in-memory unless the agent file set `persist_session: true`, which left nothing for a handle to reopen once the record was evicted — the reason handles expired. Nested children are excluded, since nothing can address them and so nothing could reopen their transcript.
|
|
366
|
+
- **The selected FleetView row renders in the theme's primary `text` color** ([#230](https://github.com/tintinweb/pi-subagents/issues/230), [#234](https://github.com/tintinweb/pi-subagents/pull/234) — thanks [@kunaaal13](https://github.com/kunaaal13)). Agent name, description and the elapsed/token stats previously kept their muted/dim tokens while selected, so the highlighted row read as several emphasis levels rather than one selection; the `●` marker keeps its accent. A configured agent color still badges on the selected row and is bolded there, matching Claude Code's own FleetView — the color is what identifies the row you are reading, and leaving the badge in place keeps the row's width fixed as the selection moves.
|
|
367
|
+
|
|
368
|
+
## [0.16.1] - 2026-08-15
|
|
369
|
+
|
|
370
|
+
### Changed
|
|
371
|
+
|
|
372
|
+
- **The pi compile baseline is declared instead of inferred.** The `@earendil-works/pi-*` packages were peers only, so 0.80.6 came from npm's peer auto-install and the committed lockfile rather than from any decision — the emergent pin the 0.14.0 entry below had to diagnose. They are now exact devDependencies, pinned to the current release (`0.84.2`); the peer range stays `>=0.80.0` and consumers are unaffected.
|
|
373
|
+
- **`compat-latest-pi` now runs typecheck and the full suite** instead of two hand-picked e2e files, so drift can't hide in an unlisted test — against pi 0.84.2 the job reported green while typecheck and four e2e suites were failing. Still `continue-on-error`, but both steps pass as of the new baseline, so a failure there is now fresh breakage rather than known debt.
|
|
374
|
+
- **The suite runs against pi 0.84.2, so the `modelRegistry` → `modelRuntime` migration is exercised by default rather than only by a `continue-on-error` job.** Two places had been carrying it as known-broken: the `modelRuntime` compat shim in `src/agent-runner.ts` typechecked only pre-migration (an opaque `unknown` read off the private facade field can't satisfy the newer `ModelRuntime` parameter type), and the e2e faux backend faked auth through a structural `modelRegistry` that post-migration pi no longer accepts, so every faux run died with "No API key found for faux". The faux registry and its post-migration counterpart — auth via `getAuth`/`hasConfiguredAuth`, the turn itself streaming through `modelRuntime.streamSimple` — now live together in `test/helpers/faux-model-backend.ts`, and both are passed to `createAgentSession`, each pi ignoring the option it doesn't know.
|
|
375
|
+
- **CI covers the floor of the declared peer range, not just the pin.** `>=0.80.0` used to be tested incidentally, because the inferred pin _was_ a 0.80.x; moving the baseline to 0.84.2 would have left the range asserting support for versions nothing built against. A `compat-floor-pi` job now installs 0.80.1 — the earliest published release satisfying the range — and runs typecheck plus the full suite. Unlike the latest-pi canary it is blocking: that run is the only evidence behind the range, and if the floor becomes unsupportable the peer range is what should change.
|
|
376
|
+
- **`publishConfig.access` is set to `public`**, so publishing this scoped package no longer depends on `--access public` or on the access already set from a prior publish.
|
|
377
|
+
|
|
378
|
+
## [0.16.0] - 2026-08-14
|
|
379
|
+
|
|
380
|
+
### Added
|
|
381
|
+
|
|
382
|
+
- **Custom agents can set `name` and `color`, so agent files shared with Claude Code keep their display identity** ([#216](https://github.com/tintinweb/pi-subagents/issues/216) — thanks [@HerbertGao](https://github.com/HerbertGao)). `name:` is accepted as a display-name fallback (`display_name:` still wins, and the filename still determines the `subagent_type` and dispatch identity), and `color:` renders the agent name as a badge — the color is the background — in the `Agent` tool header, the widget, FleetView, and the conversation viewer. Claude Code's eight color names render with Claude Code's own values; six-digit hex and the Agency Agents palette aliases are accepted too, quantized to the xterm-256 palette on non-truecolor terminals the way pi's own theme does. A missing or invalid color preserves each surface's existing theme styling. Badge text is black or white by WCAG contrast against the rendered background, where Claude Code uses a single inverse color for every badge. In the `Agent` tool header the line paints the tool block's row tint itself and leaves it open: the badge has to close its own background, so it restores that tint, and the TUI pads a line to width _after_ rendering it, so closing the line would leave that padding untinted. The tint is painted only when there is a badge, so an uncolored agent's header renders exactly as it did before.
|
|
383
|
+
- **`run_in_background` now works on `resume`, so continuing an agent no longer blocks the session** ([#214](https://github.com/tintinweb/pi-subagents/pull/214) — thanks [@akram-ahrardi](https://github.com/akram-ahrardi)). The `Agent` tool's resume branch returned before its background branch, so the flag was accepted and silently ignored: every resume ran inline and held the main loop for the whole turn, however long that agent took. A resume with `run_in_background: true` now detaches exactly like a background spawn — it returns immediately, queues behind `maxConcurrent`, streams to the widget and FleetView, and notifies on completion — while a resume without the flag still runs inline and returns its result, unchanged. Detaching required the differences from a spawn to be handled rather than inherited: the run is _not_ wired to the tool-call abort signal (a background spawn omits it too, and forwarding it would kill the agent when the parent turn is interrupted while spawns from that same turn kept going); a second resume of an agent whose run is still in flight is refused instead of replacing the live run's abort controller, which would have put it beyond the reach of `/agents` stop; the transcript is appended to rather than truncated, since the path is deterministic per agent and the previous run's turns — including any the session has since compacted away — are what the completion notification points at; output streaming is wired when the run actually starts, so a resume stopped while still queued leaves no subscription behind; and the `subagents:created` event reports the record's own type, since resume ignores `subagent_type` and a mirror keyed by id would otherwise re-register the agent under a type it never had. The widget's finished-agent age is cleared on resume, or an agent that had already completed once would vanish instead of showing the new run's completion line.
|
|
384
|
+
|
|
385
|
+
### Fixed
|
|
386
|
+
|
|
387
|
+
- **RPC-spawned agents now appear in the live Widget and FleetView while they are running** ([#224](https://github.com/tintinweb/pi-subagents/pull/224) — thanks [@dereknex](https://github.com/dereknex)). Cross-extension RPC calls entered through `AgentManager.spawn()` instead of the `Agent` tool handler, but only that handler started the Widget/Fleet refresh timers. The manager still tracked RPC agents and the completion callback refreshed the UI, so a long-running RPC agent was invisible until it finished and could appear only as a terminal row. The shared manager-start callback now starts and refreshes both native surfaces for every top-level spawn source, including RPC and scheduled agents; nested agents remain intentionally hidden.
|
|
388
|
+
|
|
389
|
+
### Documentation
|
|
390
|
+
|
|
391
|
+
- **The cross-extension RPC spawn example named an option that does not exist**. It passed `run_in_background: true`, the `Agent` _tool's_ parameter name; the RPC handler forwards `options` verbatim to `AgentManager.spawn`, whose field is `isBackground`, so the flag was silently dropped — an RPC agent nobody meant to exempt never occupied a `maxConcurrent` slot and never queued behind one, and `subagents:created` reported no background flag for it. The example now passes `isBackground`, which the RPC test suite has always pinned, and the surrounding text says what the flag does and does not change: every RPC spawn returns its id immediately and runs detached either way. It also states the visibility rule that changed above, so the widget/FleetView behavior is documented where callers read about spawning rather than only in this file.
|
|
392
|
+
|
|
393
|
+
## [0.15.2] - 2026-08-14
|
|
394
|
+
|
|
395
|
+
### Documentation
|
|
396
|
+
|
|
397
|
+
- **Three README statements corrected against the code they describe**, each now pinned by a test so the doc and the behavior can't drift apart again. (1) Scheduling was documented as forcing `run_in_background` to `true`; it does not — an explicit `run_in_background: false` alongside `schedule` is _refused_, and always has been. The 0.10.0 entry below carries the same error: `git log -S` shows the refusal shipped in the very commit that introduced scheduling, so both documents were written from the design sketch and never matched what was released. Refusing is also the intended behavior — silently flipping a parameter the caller explicitly set is the failure mode [#37](https://github.com/tintinweb/pi-subagents/issues/37) was filed about. (2) The completion-notification example showed a `transcript: .pi/output/agent-abc123.jsonl` line; that path was replaced by the OS-tmpdir layout in [#146](https://github.com/tintinweb/pi-subagents/pull/146) and the example was never updated, so it contradicted the paragraph six lines above it. (3) The `skills` frontmatter row read as though naming skills preloaded them _in addition to_ the parent's; naming any list turns skill inheritance off and the agent gets only the named ones.
|
|
398
|
+
|
|
399
|
+
### Fixed
|
|
400
|
+
|
|
401
|
+
- **`/agents → Create agent` produced an unloadable agent when the description contained a colon**. The wizard interpolated the description and the custom model straight into YAML frontmatter, both of which come from unvalidated free-text prompts. A description like `Scout: find things` made the generated file unparseable — and since [#212](https://github.com/tintinweb/pi-subagents/issues/212) an unparseable agent file is _skipped_ with a warning, so the wizard reported `Created <path>` for an agent that then silently did not exist — and, under `strictAgentFiles`, aborted the next startup too, that setting gating startup only. A description containing a `#` was quietly truncated at the `#`, YAML treating the rest as a comment. Both values are now quoted, the same way the eject serializer already quoted its description. A `provider/model:thinking` suffix is unaffected either way — YAML only splits on a colon _followed by a space_ — and is pinned so the quoting cannot mangle it.
|
|
402
|
+
- **`/agents → Scheduled jobs` cancelled the wrong job when two names looked alike**. The menu formats each job into a row, then resolves the user's pick by matching the returned string back against the row list. Rows truncate the job name to 18 characters for column alignment, and job names come from the `Agent` call's `description`, which is LLM-authored and routinely shares a prefix — so two jobs like `review the auth module A` and `review the auth module B`, on the same schedule and agent type, produced byte-identical rows and the match always resolved to the first. Picking the second cancelled the first, and because the confirmation dialog was built from the same wrong job, its details looked correct and the user had no way to notice before confirming. Rows are now numbered and carried alongside the job they describe rather than in a parallel array, so labels are unique by construction and no data-dependent collision path exists. The same string-matching pattern in `/agents → Running agents` — where the consequence was only opening the wrong agent's read-only viewer — now goes through the same helper. Pi's dialog API returns the selected string with no index or value form, so uniqueness at the call site is the only available fix. The whole menu had no test coverage at all, which is how a destructive action shipped with this in it.
|
|
403
|
+
- **The agent widget hid queued agents without counting them**. Past its 12-line cap the widget hands out a line budget — running agents first, then the one-line `N queued` summary, then finished agents — and increments a hidden-count for running and finished rows that don't fit. The queued summary was dropped with no counter at all, so with five running agents, one queued and one finished the widget rendered `+1 more (1 finished)`: two things hidden, one reported, and no indication anywhere that work was waiting to start. That is precisely the state the queue matters in, since it only appears once `maxConcurrent` is saturated. The queued line's row is now reserved before the running agents are laid out, so it can no longer be dropped; the trade is that one running agent may yield its two rows, and that agent _is_ counted in the overflow total. Counting the queued line instead was rejected: it summarizes N agents, so counting it as one under-reports and counting it as N inflates a total denominated in agent rows.
|
|
404
|
+
- **`/agents` Enable/Disable now agree with the loader about `enabled: false`** (found while closing test-suite gaps). Loading parses frontmatter with a real YAML parser; the menu edited it with regex, and the two disagreed. Enable's pattern was anchored to byte 0, so it only matched when `enabled: false` was the _first_ frontmatter line — the shape this extension writes, not the shape README tells users to hand-author, where `description:` comes first — leaving a hand-written agent disabled forever while reporting `Enabled <name>`. Disable's idempotence check was byte-exact, so a trailing space defeated it and inserted a _second_ `enabled: false`; duplicate keys are a YAML error, and since [#212](https://github.com/tintinweb/pi-subagents/issues/212) an unparseable agent file is skipped, so the agent vanished from `/agents` instead of showing as disabled — and would abort the next startup under `strictAgentFiles`, which gates startup only, every mid-session reload skipping whatever it is set to. Deciding whether a file is disabled now _calls_ the parser rather than mirroring it — which was always a read — fixing both the spellings YAML also accepts (`False`, `FALSE`, a trailing `# comment`, a quoted key) and pi's fence scan, which ends the block at any line merely starting `---`: below a `----` line the regex read body text as frontmatter and refused to disable a _running_ agent. Editing stays line-wise by design, since re-serializing a parsed document would strip the comments, key order, and quoting of a file users hand-author. That leaves removal recognizing only a lowercase bare `false`; the other spellings are detected but not yet rewritable, and now say so instead of claiming success, with `/agents → Edit` as the way through.
|
|
405
|
+
- **The `Agent` tool description no longer tells the orchestrator that a zero-tool agent has every built-in**. `tools: none` and a `tools:` listing only `ext:` selectors both parse to an empty built-in list, and the runtime honors that — the shipped e2e fixture pins that such an agent really is handed no `read`, `bash`, `edit`, `write`, `grep`, `find`, or `ls`. The description builder collapsed "empty list" into the same `(Tools: *)` it uses for an _absent_ `tools:`, which genuinely does mean all built-ins, so the only capability statement the orchestrator sees before spawning contradicted what the agent would actually get, and work was routed to agents that could only fail at it. An omitted `tools:` still renders `*`. An empty one renders `none` only when the agent can genuinely call nothing — `isolated`, or `extensions: false` — because zero built-ins is not zero tools: `tools: none` alongside `extensions:` still surfaces every extension tool, and the shipped fixture for that case expects three of them. That configuration now renders `no built-ins, extension tools only`, since describing it as `none` would understate the agent and route work away from the only one able to do it — the same failure as the original bug, pointed the other way. The suffix has only ever described _built-in_ scope and still does: extension tools are resolved when the agent runs (extensions may register asynchronously) and cannot be enumerated while the description is built, which is why `tools: "*, ext:mcp/search"` renders `*` and always has. The same absent-vs-empty conflation is corrected in the eject serializer, which wrote `tools: all` for an empty list; that path is not reachable from the menu today, since eject is offered only for built-in defaults and none ships with an empty tool list, so it is hardening rather than a fix.
|
|
406
|
+
|
|
407
|
+
## [0.15.1] - 2026-08-13
|
|
408
|
+
|
|
409
|
+
### Added
|
|
195
410
|
|
|
196
|
-
|
|
411
|
+
- **`strictAgentFiles` — fail startup on a broken agent file instead of skipping it**. Off by default. When on, an unreadable or unparseable `agents/*.md` aborts extension load and names the file, so a checked-in `.pi/agents/` can't silently fall through to a different agent. Startup only: mid-session reloads (one per `Agent` call) keep warning, since a bad edit shouldn't kill the session on an unrelated spawn. Settable in `subagents.json` or via `/agents → Settings → Strict agent files`.
|
|
197
412
|
|
|
198
413
|
### Fixed
|
|
199
414
|
|
|
200
|
-
-
|
|
415
|
+
- **A `persist_session` subagent's session now records the session that spawned it** ([#205](https://github.com/tintinweb/pi-subagents/pull/205) — thanks [@0xbentang](https://github.com/0xbentang)). `SessionManager.create(...)` was called without pi's `NewSessionOptions`, so a persisted subagent wrote a session header with no `parentSession` — indistinguishable from one started by hand. pi's session picker builds its tree from exactly that field, so every persisted subagent appeared as its own top-level root: a plan → review → implement orchestration left a flat run of sessions with nothing tying them to the session that produced them, and no way to tell them apart but their first message. The spawning session's file path is now passed through, so those sessions nest under their parent in the `/resume` picker. Grouping still needs both sessions in the same listing — pi lists per session directory, derived from the cwd unless one is named — so a `session_dir` override, or an `isolation: worktree` agent running in the copy's cwd, lands in a different directory and keeps showing as a root; the header link is written either way and travels with the file. A spawning session with no file behind it (any in-memory session — the default for a subagent) leaves the field unset, as before.
|
|
416
|
+
- **A subagent that never starts now fails the tool call instead of reporting success** ([#179](https://github.com/tintinweb/pi-subagents/issues/179) — thanks [@xz-dev](https://github.com/xz-dev)). A strict `isolation: "worktree"` spawn in a directory that is not a git repo, has no commits, or where `git worktree add` fails throws before any child session exists — and the `Agent` tool caught that throw and returned the diagnostic as ordinary result text. Pi marks a tool result failed only when `execute` throws; an `isError` flag on a _returned_ result is discarded. The parent model therefore saw `isError: false` and read the message as a subagent that had run and reported this, then retried the same doomed call. Both spawn paths now let the throw out. Nothing else changes: a subagent whose _run_ fails, or which is aborted or stopped, still settles on its record and keeps its existing result text and status note — the only calls that now fail are the ones where no agent was ever created. The foreground spinner and widget cleanup moved into a `finally` so they cannot be skipped by an early return.
|
|
417
|
+
- **An `Agent` call refused before it ran no longer reports a turn limit that never happened** ([#199](https://github.com/tintinweb/pi-subagents/issues/199) — thanks [@Tonours](https://github.com/Tonours), fixed in [#195](https://github.com/tintinweb/pi-subagents/pull/195) by [@xz-dev](https://github.com/xz-dev)). Pi reports every pre-execution failure — an extension `tool_call` hook returning `{ block: true }`, an abort, a schema violation — as `{ content: [reason], details: {} }` with `isError` set. The result renderer's guard tested only for _absent_ `details`, and `{}` is truthy, so those results walked past every status branch into the tail and printed `✗ Aborted (max turns exceeded)`. The operator debugged a phantom turn limit while the real reason went only to the model, which alone received the tool result text. A result carrying no status now renders that reason verbatim, and the turn-limit wording is reached only by a genuinely `aborted` run instead of serving as the catch-all for anything unrecognised.
|
|
418
|
+
- **`isolation: "worktree"` agents are told to stay in the worktree** ([#187](https://github.com/tintinweb/pi-subagents/issues/187) — thanks [@cad0p](https://github.com/cad0p)). The agent was told its working directory twice — the copy, and the main checkout named by the inherited parent prompt or by the task prompt — and followed the latter, editing and committing in the shared tree. Worktree spawns now carry a `<worktree_isolation>` block naming the copy as theirs and the parent as off-limits. A prompt directive, not enforcement: local trials went from 5/5 escapes to 1/7, so `isolation` is still not a hard sandbox.
|
|
419
|
+
- **One malformed agent file no longer takes pi down with it** ([#212](https://github.com/tintinweb/pi-subagents/issues/212) — thanks [@daromaj](https://github.com/daromaj)). A YAML error in any discovered `agents/*.md` aborted extension activation: pi exited 1 before the TUI, naming no file. Unreadable and unparseable files are now skipped, with a warning naming the file and the error. If the skipped file was overriding a same-named agent, a second line names the file that loads in its place.
|
|
201
420
|
|
|
202
|
-
## [0.15.0] - 2026-08-
|
|
421
|
+
## [0.15.0] - 2026-08-10
|
|
203
422
|
|
|
204
423
|
### Added
|
|
205
424
|
|
|
206
|
-
- **Claude Code/Agency Agents-compatible agent colors across all primary UI surfaces.** Custom agent `name` and `color` frontmatter now render readable colored name badges in the Agent tool header, above-editor widget, FleetView, and conversation viewer. Named Claude Code colors, Agency Agents aliases, and six-digit hex colors are supported with truecolor/256-color fallback and WCAG-aware foreground contrast.
|
|
207
425
|
- **`fallbackSubagent` — choose what happens when `subagent_type` doesn't resolve, including failing closed** ([#183](https://github.com/tintinweb/pi-subagents/issues/183) — thanks [@0xbentang](https://github.com/0xbentang)). Dispatch previously repaired every unresolvable type by substituting `general-purpose`, so a typo silently ran a different agent, model and tool policy — and for a background or scheduled call, execution began before the caller saw any indication. The new project setting names the substitute instead of assuming one: omitted keeps today's `general-purpose` behavior, any enabled agent name routes unresolvable calls there, and `none` (or the boolean `false`, which would otherwise be dropped as the wrong type and silently leave the fallback in place) disables it entirely so dispatch fails closed with an error listing the available types. Resolution now happens at one point shared by every caller-supplied spawn — the `Agent` tool, the scheduler at fire time, cross-extension RPC, and nested delegation — so a refused type never reaches `runAgent`, where the old three-tier fallback in `getConfig` would have substituted an agent anyway. Case-ambiguous names (two enabled agents differing only in case, reachable because agents are keyed by filename across three directories) are treated as unresolvable rather than resolved to whichever was registered first. The fallback note is emitted at resolution rather than after the run, so the background and schedule paths carry it too, and a scheduled job now stores the type that was actually requested instead of the substitute. Nested delegation keeps rejecting unconditionally whatever this is set to, so a project-level fallback cannot hand a nested caller an agent outside its allowlist. An explicitly configured fallback that is itself unknown or disabled is reported as the misconfiguration it is.
|
|
208
426
|
- **Opt-in nested subagent delegation — a subagent can delegate to child agents of its own** ([#164](https://github.com/tintinweb/pi-subagents/pull/164) — thanks [@codesoda](https://github.com/codesoda)). Default-off and per-agent: a custom agent receives scoped `Agent`, `get_subagent_result`, and `steer_subagent` tools only when its frontmatter sets `allowed_subagents` (a comma-separated type list, or `all` — `true` and `"*"` are accepted the way `extensions:`/`skills:` take booleans), and never when it is `isolated`. The allowlist is a privilege boundary rather than a routing hint: a child runs with its own `tools:`, `extensions:`, and `isolated:`, so delegating grants the parent the union of what the listed agents can do — `all` reaches `general-purpose`. Nesting is depth-capped from the main session — main is 0, its subagents 1, their children 2 — through `maxSubagentDepth` in `subagents.json` (default `2`; `0` or `1` disables nesting project-wide) or `/agents → Settings → Nested depth`. A per-agent cap is deliberately not exposed yet: at the default project cap it could only restate what omitting `allowed_subagents` already says, and a tighten-only field is safe to add once someone raises that cap. An agent already at the cap is given no nested tools at all, rather than tools whose every call would fail. Everything a parent can do is ownership-scoped — it can fetch, resume, and steer only its own children — and unknown, disabled, or out-of-list types are refused rather than falling back to general-purpose. Nested spawns resolve agents from a registry built for their own config root (never the process-global registry the main session uses) and revalidate `model:` against Model Scope exactly like a top-level spawn. Nested records stay internal to their parent, absent from top-level tools, lifecycle events, and the agent UI, and are stopped when that parent finishes, is stopped, or ends a resumed turn — a hidden child must not outlive the only agent able to reach it. They still write their own `.output` transcript under the root session's directory (same `output_transcript` gate), so a nested run remains inspectable, and their token usage is folded into every ancestor's totals so nested spend stays attributable at any depth, and a nested result that ends `stopped`, `aborted`, or `steered` is labelled partial, the same guarantee top-level results carry. Nested children do not occupy `maxConcurrent` slots: their parent already holds one, and queueing them behind it would deadlock a parent waiting on its own child; the depth cap bounds how deep nesting goes, not how wide, so a `max_turns` on the delegating agent is what ceilings its fan-out. A subagent session no longer activates this extension at all — that is what keeps a child from building a second agent manager, and it is why the nested tools are injected directly instead; a subagent consequently also gets no `/agents` command, no cross-extension RPC handlers, and no `subagents:ready` event.
|
|
209
427
|
|
|
@@ -381,7 +599,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
381
599
|
|
|
382
600
|
- **`Agent` tool prompt restructured to mirror Claude Code's upstream Agent tool description format.** Section headings now match upstream (`## When not to use`, `## Usage notes`, `## Writing the prompt`); the auto-generated agent list renders as a flat list (no `Default agents:` / `Custom agents:` sub-headers) with a per-agent `(Tools: …)` suffix derived from each agent's `builtinToolNames` (or `*` when the agent has the full built-in set). Restored upstream's load-bearing guardrails that were missing or compressed in the old prompt: "result is not visible to the user → summarize", "trust but verify", "fresh agent / self-contained prompt" on resume, "tell the agent whether to write code or do research", "use proactively when the description says so", "MUST send a single message for parallel", and the worktree auto-cleanup behavior detail. The three redundant "Use Explore / Plan / general-purpose for …" shorthand bullets were dropped — the agent descriptions themselves now carry the canonical (and richer) selection guidance. Upstream's two `<example>` blocks at the end of "Writing the prompt" are also intentionally omitted: the per-orchestrator-turn token cost is recurring, the abstract guidance + the now-rich agent descriptions cover the same pedagogical ground, and the examples embed Anthropic-specific `<thinking>` framing that doesn't generalize across pi-ai's provider surface (OpenAI, Bedrock, Gemini, Mistral, …). All pi-specific bullets (`resume`, `steer_subagent`, `model`, `thinking`, `inherit_context`, `isolation: "worktree"`, `${scheduleGuideline}`) preserved.
|
|
383
601
|
- **Default agent descriptions (`general-purpose`, `Explore`, `Plan`) replaced with upstream Claude Code's verbatim wording.** Previously one-line labels (e.g. `"Fast codebase exploration agent (read-only)"`); now multi-sentence descriptions that include positive ("Use it to …") and negative ("Do NOT use it for …") guidance plus, for Explore, search-breadth hints (`"quick"` / `"medium"` / `"very thorough"`). The LLM-facing selection signal is now substantially stronger.
|
|
384
|
-
- **`/agents → Eject` now emits YAML-safe `description:` frontmatter.** The new Explore description contains a
|
|
602
|
+
- **`/agents → Eject` now emits YAML-safe `description:` frontmatter.** The new Explore description contains a `: ` colon-space pattern (the search-breadth hint) and embedded quote characters — emitting it raw would have produced malformed frontmatter that the `yaml` parser would mis-parse. `ejectAgent` now wraps the description with `JSON.stringify` (a valid YAML 1.2 double-quoted scalar), so any description string round-trips cleanly through eject → re-load. Latent bug: previously unreachable because old descriptions were YAML-plain-safe.
|
|
385
603
|
- **`/agents → Settings` UI rewritten to inline-editable `SettingsList`.** Replaces the previous modal `ctx.ui.select` chain. All settings visible at once; `↑`/`↓` to navigate, `Space` to cycle preset values on numerics (`Max concurrency`, `Default max turns`, `Grace turns`), `Enter` to type a custom value, `Esc` to exit. Functionally equivalent — same fields, same valid ranges, same persistence behavior — but the interaction model is different. Users scripting against the old screen flow may notice.
|
|
386
604
|
- **`.gitignore` additions.** Added `.pi/subagents.json` (project-local subagents settings — written by `/agents → Settings`, shouldn't be committed) plus pi-runtime working files (`progress.md`, `AGENTS.md`, `CLAUDE.md`). **Migration:** if you previously committed `.pi/subagents.json` to your repo, run `git rm --cached .pi/subagents.json` to untrack — gitignore only blocks new additions.
|
|
387
605
|
|