pi-subagents 0.70.0 → 0.71.0

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.
Files changed (279) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +4 -2
  3. package/agents/claude-code-writer.md +1 -0
  4. package/agents/codex-exec-writer.md +1 -0
  5. package/agents/cursor-agent-writer.md +1 -0
  6. package/agents/worker.md +3 -2
  7. package/docs/agents.md +7 -8
  8. package/docs/configuration.md +17 -1
  9. package/docs/extension-api.md +5 -1
  10. package/docs/models.md +1 -1
  11. package/docs/observability.md +17 -13
  12. package/docs/standalone-background.md +4 -4
  13. package/docs/tool-reference.md +9 -11
  14. package/docs/workflows.md +1 -1
  15. package/inspector-runner.mjs +1 -1
  16. package/package.json +2 -2
  17. package/skills/pi-subagents/SKILL.md +1 -0
  18. package/skills/pi-subagents/references/constraints-and-recipes.md +5 -2
  19. package/skills/pi-subagents/references/execution-controls.md +2 -2
  20. package/skills/pi-subagents/references/management-authoring-rpc.md +3 -3
  21. package/skills/pi-subagents/references/multi-lane-orchestration.md +8 -0
  22. package/skills/pi-subagents/references/prompting-and-roles.md +14 -13
  23. package/src/agents/agent-management.d.ts.map +1 -1
  24. package/src/agents/agent-management.js +11 -25
  25. package/src/agents/agent-management.js.map +1 -1
  26. package/src/agents/agent-serializer.d.ts.map +1 -1
  27. package/src/agents/agent-serializer.js +0 -4
  28. package/src/agents/agent-serializer.js.map +1 -1
  29. package/src/agents/agents.d.ts +17 -4
  30. package/src/agents/agents.d.ts.map +1 -1
  31. package/src/agents/agents.js +39 -22
  32. package/src/agents/agents.js.map +1 -1
  33. package/src/agents/proactive-skills.d.ts +1 -0
  34. package/src/agents/proactive-skills.d.ts.map +1 -1
  35. package/src/agents/proactive-skills.js +3 -1
  36. package/src/agents/proactive-skills.js.map +1 -1
  37. package/src/agents/runtime-agent-registry.d.ts +8 -3
  38. package/src/agents/runtime-agent-registry.d.ts.map +1 -1
  39. package/src/agents/runtime-agent-registry.js +14 -9
  40. package/src/agents/runtime-agent-registry.js.map +1 -1
  41. package/src/agents/skills.d.ts +2 -0
  42. package/src/agents/skills.d.ts.map +1 -1
  43. package/src/agents/skills.js +41 -8
  44. package/src/agents/skills.js.map +1 -1
  45. package/src/api/delegation.d.ts +14 -0
  46. package/src/api/delegation.d.ts.map +1 -1
  47. package/src/extension/index.d.ts.map +1 -1
  48. package/src/extension/index.js +5 -1
  49. package/src/extension/index.js.map +1 -1
  50. package/src/extension/rpc.d.ts +1 -1
  51. package/src/extension/rpc.d.ts.map +1 -1
  52. package/src/extension/rpc.js +11 -1
  53. package/src/extension/rpc.js.map +1 -1
  54. package/src/extension/tool-activation.d.ts +9 -0
  55. package/src/extension/tool-activation.d.ts.map +1 -0
  56. package/src/extension/tool-activation.js +172 -0
  57. package/src/extension/tool-activation.js.map +1 -0
  58. package/src/extension/tool-description.d.ts +4 -4
  59. package/src/extension/tool-description.d.ts.map +1 -1
  60. package/src/extension/tool-description.js +1 -1
  61. package/src/intercom/intercom-bridge.d.ts.map +1 -1
  62. package/src/intercom/intercom-bridge.js +2 -0
  63. package/src/intercom/intercom-bridge.js.map +1 -1
  64. package/src/runs/background/active-async-capacity.d.ts.map +1 -1
  65. package/src/runs/background/active-async-capacity.js +4 -33
  66. package/src/runs/background/active-async-capacity.js.map +1 -1
  67. package/src/runs/background/async-execution.d.ts.map +1 -1
  68. package/src/runs/background/async-execution.js +5 -67
  69. package/src/runs/background/async-execution.js.map +1 -1
  70. package/src/runs/background/async-job-tracker.d.ts.map +1 -1
  71. package/src/runs/background/async-job-tracker.js +25 -19
  72. package/src/runs/background/async-job-tracker.js.map +1 -1
  73. package/src/runs/background/async-resume.d.ts +1 -1
  74. package/src/runs/background/async-resume.d.ts.map +1 -1
  75. package/src/runs/background/async-resume.js +8 -6
  76. package/src/runs/background/async-resume.js.map +1 -1
  77. package/src/runs/background/async-status.d.ts +1 -0
  78. package/src/runs/background/async-status.d.ts.map +1 -1
  79. package/src/runs/background/async-status.js +1 -0
  80. package/src/runs/background/async-status.js.map +1 -1
  81. package/src/runs/background/binary-bootstrap.d.ts.map +1 -1
  82. package/src/runs/background/binary-bootstrap.js +28 -6
  83. package/src/runs/background/binary-bootstrap.js.map +1 -1
  84. package/src/runs/background/fleet-view.d.ts.map +1 -1
  85. package/src/runs/background/fleet-view.js +26 -7
  86. package/src/runs/background/fleet-view.js.map +1 -1
  87. package/src/runs/background/notify.d.ts +11 -0
  88. package/src/runs/background/notify.d.ts.map +1 -1
  89. package/src/runs/background/notify.js +71 -3
  90. package/src/runs/background/notify.js.map +1 -1
  91. package/src/runs/background/process-terminal-candidate.d.ts +18 -0
  92. package/src/runs/background/process-terminal-candidate.d.ts.map +1 -0
  93. package/src/runs/background/process-terminal-candidate.js +97 -0
  94. package/src/runs/background/process-terminal-candidate.js.map +1 -0
  95. package/src/runs/background/process-terminal.d.ts +3 -15
  96. package/src/runs/background/process-terminal.d.ts.map +1 -1
  97. package/src/runs/background/process-terminal.js +19 -96
  98. package/src/runs/background/process-terminal.js.map +1 -1
  99. package/src/runs/background/retained-children.d.ts.map +1 -1
  100. package/src/runs/background/retained-children.js +3 -2
  101. package/src/runs/background/retained-children.js.map +1 -1
  102. package/src/runs/background/run-child-session.d.ts +1 -0
  103. package/src/runs/background/run-child-session.d.ts.map +1 -1
  104. package/src/runs/background/run-child-session.js.map +1 -1
  105. package/src/runs/background/run-status.d.ts.map +1 -1
  106. package/src/runs/background/run-status.js +11 -5
  107. package/src/runs/background/run-status.js.map +1 -1
  108. package/src/runs/background/runner-aliases.d.ts.map +1 -1
  109. package/src/runs/background/runner-aliases.js +28 -16
  110. package/src/runs/background/runner-aliases.js.map +1 -1
  111. package/src/runs/background/runner-startup-failure.d.ts +14 -0
  112. package/src/runs/background/runner-startup-failure.d.ts.map +1 -0
  113. package/src/runs/background/runner-startup-failure.js +47 -0
  114. package/src/runs/background/runner-startup-failure.js.map +1 -0
  115. package/src/runs/background/stale-run-reconciler.d.ts.map +1 -1
  116. package/src/runs/background/stale-run-reconciler.js +9 -1
  117. package/src/runs/background/stale-run-reconciler.js.map +1 -1
  118. package/src/runs/background/subagent-runner-bootstrap.d.ts +14 -0
  119. package/src/runs/background/subagent-runner-bootstrap.d.ts.map +1 -0
  120. package/src/runs/background/subagent-runner-bootstrap.js +277 -0
  121. package/src/runs/background/subagent-runner-bootstrap.js.map +1 -0
  122. package/src/runs/background/subagent-runner.d.ts +5 -7
  123. package/src/runs/background/subagent-runner.d.ts.map +1 -1
  124. package/src/runs/background/subagent-runner.js +67 -274
  125. package/src/runs/background/subagent-runner.js.map +1 -1
  126. package/src/runs/background/workflow-terminal-proof.d.ts +18 -0
  127. package/src/runs/background/workflow-terminal-proof.d.ts.map +1 -0
  128. package/src/runs/background/workflow-terminal-proof.js +68 -0
  129. package/src/runs/background/workflow-terminal-proof.js.map +1 -0
  130. package/src/runs/foreground/execution.d.ts.map +1 -1
  131. package/src/runs/foreground/execution.js +43 -111
  132. package/src/runs/foreground/execution.js.map +1 -1
  133. package/src/runs/foreground/subagent-executor.d.ts.map +1 -1
  134. package/src/runs/foreground/subagent-executor.js +108 -17
  135. package/src/runs/foreground/subagent-executor.js.map +1 -1
  136. package/src/runs/shared/acceptance.d.ts.map +1 -1
  137. package/src/runs/shared/acceptance.js +7 -40
  138. package/src/runs/shared/acceptance.js.map +1 -1
  139. package/src/runs/shared/child-hooks.d.ts +1 -3
  140. package/src/runs/shared/child-hooks.d.ts.map +1 -1
  141. package/src/runs/shared/child-hooks.js +1 -16
  142. package/src/runs/shared/child-hooks.js.map +1 -1
  143. package/src/runs/shared/child-launch.d.ts +0 -2
  144. package/src/runs/shared/child-launch.d.ts.map +1 -1
  145. package/src/runs/shared/child-launch.js +4 -2
  146. package/src/runs/shared/child-launch.js.map +1 -1
  147. package/src/runs/shared/child-runtime-config.d.ts +4 -0
  148. package/src/runs/shared/child-runtime-config.d.ts.map +1 -1
  149. package/src/runs/shared/child-runtime-config.js.map +1 -1
  150. package/src/runs/shared/child-session.d.ts +8 -9
  151. package/src/runs/shared/child-session.d.ts.map +1 -1
  152. package/src/runs/shared/child-session.js +67 -2
  153. package/src/runs/shared/child-session.js.map +1 -1
  154. package/src/runs/shared/dynamic-fanout.js +1 -1
  155. package/src/runs/shared/dynamic-fanout.js.map +1 -1
  156. package/src/runs/shared/external-cli-runner.d.ts.map +1 -1
  157. package/src/runs/shared/external-cli-runner.js +3 -1
  158. package/src/runs/shared/external-cli-runner.js.map +1 -1
  159. package/src/runs/shared/git-environment.d.ts +3 -0
  160. package/src/runs/shared/git-environment.d.ts.map +1 -0
  161. package/src/runs/shared/git-environment.js +28 -0
  162. package/src/runs/shared/git-environment.js.map +1 -0
  163. package/src/runs/shared/mcp-config-sources.d.ts +3 -0
  164. package/src/runs/shared/mcp-config-sources.d.ts.map +1 -1
  165. package/src/runs/shared/mcp-config-sources.js.map +1 -1
  166. package/src/runs/shared/mcp-direct-tool-allowlist.js +1 -1
  167. package/src/runs/shared/mcp-direct-tool-allowlist.js.map +1 -1
  168. package/src/runs/shared/mcp-direct-tool-grant.d.ts +3 -1
  169. package/src/runs/shared/mcp-direct-tool-grant.d.ts.map +1 -1
  170. package/src/runs/shared/mcp-direct-tool-grant.js +19 -5
  171. package/src/runs/shared/mcp-direct-tool-grant.js.map +1 -1
  172. package/src/runs/shared/parallel-utils.d.ts +0 -1
  173. package/src/runs/shared/parallel-utils.d.ts.map +1 -1
  174. package/src/runs/shared/parallel-utils.js.map +1 -1
  175. package/src/runs/shared/pi-spawn.d.ts +10 -1
  176. package/src/runs/shared/pi-spawn.d.ts.map +1 -1
  177. package/src/runs/shared/pi-spawn.js +86 -7
  178. package/src/runs/shared/pi-spawn.js.map +1 -1
  179. package/src/runs/shared/single-output.d.ts.map +1 -1
  180. package/src/runs/shared/single-output.js +10 -2
  181. package/src/runs/shared/single-output.js.map +1 -1
  182. package/src/runs/shared/structured-output.d.ts +7 -0
  183. package/src/runs/shared/structured-output.d.ts.map +1 -1
  184. package/src/runs/shared/structured-output.js +74 -0
  185. package/src/runs/shared/structured-output.js.map +1 -1
  186. package/src/runs/shared/subagent-control.d.ts.map +1 -1
  187. package/src/runs/shared/subagent-control.js +6 -19
  188. package/src/runs/shared/subagent-control.js.map +1 -1
  189. package/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
  190. package/src/runs/shared/subagent-prompt-runtime.js +23 -7
  191. package/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
  192. package/src/runs/shared/tool-availability.js +1 -1
  193. package/src/runs/shared/tool-availability.js.map +1 -1
  194. package/src/shared/child-session-name.d.ts.map +1 -1
  195. package/src/shared/child-session-name.js +4 -2
  196. package/src/shared/child-session-name.js.map +1 -1
  197. package/src/shared/fork-context.d.ts +4 -0
  198. package/src/shared/fork-context.d.ts.map +1 -1
  199. package/src/shared/fork-context.js +9 -4
  200. package/src/shared/fork-context.js.map +1 -1
  201. package/src/shared/launch-contract.d.ts.map +1 -1
  202. package/src/shared/launch-contract.js +0 -1
  203. package/src/shared/launch-contract.js.map +1 -1
  204. package/src/shared/pruned-fork.d.ts +1 -1
  205. package/src/shared/pruned-fork.d.ts.map +1 -1
  206. package/src/shared/pruned-fork.js +70 -65
  207. package/src/shared/pruned-fork.js.map +1 -1
  208. package/src/shared/types.d.ts +32 -13
  209. package/src/shared/types.d.ts.map +1 -1
  210. package/src/shared/types.js +2 -0
  211. package/src/shared/types.js.map +1 -1
  212. package/src/slash/delegation-adapters.d.ts +7 -1
  213. package/src/slash/delegation-adapters.d.ts.map +1 -1
  214. package/src/slash/delegation-adapters.js +17 -0
  215. package/src/slash/delegation-adapters.js.map +1 -1
  216. package/src/slash/prompt-template-bridge.d.ts.map +1 -1
  217. package/src/slash/prompt-template-bridge.js +14 -1
  218. package/src/slash/prompt-template-bridge.js.map +1 -1
  219. package/src/slash/prompt-workflows.d.ts.map +1 -1
  220. package/src/slash/prompt-workflows.js +16 -2
  221. package/src/slash/prompt-workflows.js.map +1 -1
  222. package/src/slash/slash-commands.d.ts.map +1 -1
  223. package/src/slash/slash-commands.js +5 -251
  224. package/src/slash/slash-commands.js.map +1 -1
  225. package/src/slash/subagent-cost.d.ts +29 -0
  226. package/src/slash/subagent-cost.d.ts.map +1 -0
  227. package/src/slash/subagent-cost.js +271 -0
  228. package/src/slash/subagent-cost.js.map +1 -0
  229. package/src/slash/subagents-admin.d.ts.map +1 -1
  230. package/src/slash/subagents-admin.js +4 -5
  231. package/src/slash/subagents-admin.js.map +1 -1
  232. package/src/tui/fleet.d.ts.map +1 -1
  233. package/src/tui/fleet.js +4 -0
  234. package/src/tui/fleet.js.map +1 -1
  235. package/src/tui/render.d.ts.map +1 -1
  236. package/src/tui/render.js +16 -11
  237. package/src/tui/render.js.map +1 -1
  238. package/src/watchdog/diff-tool.d.ts +2 -1
  239. package/src/watchdog/diff-tool.d.ts.map +1 -1
  240. package/src/watchdog/diff-tool.js +9 -3
  241. package/src/watchdog/diff-tool.js.map +1 -1
  242. package/src/watchdog/permission-arbiter.d.ts.map +1 -1
  243. package/src/watchdog/permission-arbiter.js +12 -8
  244. package/src/watchdog/permission-arbiter.js.map +1 -1
  245. package/src/watchdog/register-child.d.ts +3 -1
  246. package/src/watchdog/register-child.d.ts.map +1 -1
  247. package/src/watchdog/register-child.js +12 -3
  248. package/src/watchdog/register-child.js.map +1 -1
  249. package/src/watchdog/review.d.ts +1 -0
  250. package/src/watchdog/review.d.ts.map +1 -1
  251. package/src/watchdog/review.js +12 -6
  252. package/src/watchdog/review.js.map +1 -1
  253. package/src/watchdog/runtime.d.ts +1 -1
  254. package/src/watchdog/runtime.d.ts.map +1 -1
  255. package/src/watchdog/runtime.js +2 -1
  256. package/src/watchdog/runtime.js.map +1 -1
  257. package/src/watchdog/turn-delta.d.ts +5 -1
  258. package/src/watchdog/turn-delta.d.ts.map +1 -1
  259. package/src/watchdog/turn-delta.js +9 -5
  260. package/src/watchdog/turn-delta.js.map +1 -1
  261. package/src/workflows/scripted-workflow.d.ts.map +1 -1
  262. package/src/workflows/scripted-workflow.js +1 -3
  263. package/src/workflows/scripted-workflow.js.map +1 -1
  264. package/src/runs/shared/completion-evidence.d.ts +0 -31
  265. package/src/runs/shared/completion-evidence.d.ts.map +0 -1
  266. package/src/runs/shared/completion-evidence.js +0 -54
  267. package/src/runs/shared/completion-evidence.js.map +0 -1
  268. package/src/runs/shared/completion-guard.d.ts +0 -35
  269. package/src/runs/shared/completion-guard.d.ts.map +0 -1
  270. package/src/runs/shared/completion-guard.js +0 -214
  271. package/src/runs/shared/completion-guard.js.map +0 -1
  272. package/src/runs/shared/llm-intent-arbiter.d.ts +0 -48
  273. package/src/runs/shared/llm-intent-arbiter.d.ts.map +0 -1
  274. package/src/runs/shared/llm-intent-arbiter.js +0 -235
  275. package/src/runs/shared/llm-intent-arbiter.js.map +0 -1
  276. package/src/runs/shared/task-intent.d.ts +0 -38
  277. package/src/runs/shared/task-intent.d.ts.map +0 -1
  278. package/src/runs/shared/task-intent.js +0 -213
  279. package/src/runs/shared/task-intent.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,78 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.71.0] - 2026-09-23
6
+
7
+ ### Highlights
8
+
9
+ - Other extensions can read subagent spend and follow async workflow progress as data, without scraping terminal output.
10
+ - Workflow status can now confirm that every child process has actually exited.
11
+ - Child sessions keep readable names such as `worker: fix auth refresh` in `/resume` and Herdr.
12
+ - The full `subagent` tool loads only when a request needs it, which keeps unrelated prompts smaller.
13
+ - Background runners, reviewers, and Bun, pnpm, and symlinked installs are more reliable.
14
+
15
+ ### Added
16
+
17
+ - In-process RPC `cost` method. It returns the same parent-plus-child spend that `/subagent-cost` shows, as versioned data (`{ version: 1, parent, children, childTotal, total, unresolvedAsyncChildren }`). `ping.capabilities.cost` advertises `{ version: 1 }`. `/subagent-cost` output is unchanged. Thanks to [@raymondtri](https://github.com/raymondtri) for [#2378](https://github.com/nicobailon/pi-subagents/pull/2378).
18
+ - Async `workflowScript` runs and the children they launch now emit public lifecycle events, so companion UIs can follow them without scraping terminal output. Thanks to [@navidemad](https://github.com/navidemad) for [#2382](https://github.com/nicobailon/pi-subagents/pull/2382).
19
+ - Status for an async workflow now includes `details.workflowTerminalProof`. It reports `observed`, with each child's exit evidence, only after the workflow has stopped launching children and every async child has exited or failed to start. Otherwise it reports `pending` or `unknown` with a reason, including when the saved child list is missing. A finished workflow frees its capacity slot using the same check, so the two always agree. Thanks to [@alexei-led](https://github.com/alexei-led) for [#2436](https://github.com/nicobailon/pi-subagents/issues/2436) and [#2442](https://github.com/nicobailon/pi-subagents/pull/2442).
20
+
21
+ ### Changed
22
+
23
+ - Packaged `worker` agents now start with fresh context instead of forking the parent's conversation. You can still request fork context per call or set it globally. Thanks to [@eduardopicolo-cb](https://github.com/eduardopicolo-cb) for [#2384](https://github.com/nicobailon/pi-subagents/issues/2384).
24
+ - The full `subagent` tool stays hidden until a request activates it through the small `subagents_enable` loader, which keeps unrelated prompt context smaller. Direct commands, RPC, the TUI, and nested children work as before. Thanks to [@Knimoms](https://github.com/Knimoms) for [#2380](https://github.com/nicobailon/pi-subagents/pull/2380).
25
+ - Child sessions keep a readable name (for example `worker: fix auth refresh`) in session lists, `/resume`, and Herdr while the intercom bridge is active. Nested children now reach their supervisor through the child's intercom ID instead of its session name. This needs a pi-intercom version that supports the `intercom:session-identity` claim; with an older pi-intercom, children keep the previous naming so routing still works. Thanks to [@Q-xuan](https://github.com/Q-xuan) for raising the problem in [#2432](https://github.com/nicobailon/pi-subagents/pull/2432).
26
+ - The optional `@earendil-works/pi-ai` peer dependency now requires 0.86.1 or later, matching the oldest supported Pi host. Thanks to [@samuela](https://github.com/samuela) for [#2373](https://github.com/nicobailon/pi-subagents/issues/2373).
27
+ - When a child's `structured_output` call is rejected, the result now includes a short summary of the validation errors. The missing-structured-output error is used only when the child never called the tool. Thanks to [@rtbe](https://github.com/rtbe) for [#2407](https://github.com/nicobailon/pi-subagents/issues/2407).
28
+
29
+ ### Fixed
30
+
31
+ - `subagent` is available again after switching from an inactive session branch to one where it was activated.
32
+ - Background runners and external CLI agents no longer inherit Git's repository variables (`GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE`, `GIT_CONFIG_*`, and the rest of `git rev-parse --local-env-vars`). When Pi was started from a Git hook or with `git --git-dir`, these made a child's Git commands act on the parent's repository instead of the child's working directory. Other variables such as `GIT_AUTHOR_*` still pass through, and an external agent's explicit environment allowlist is unchanged. Thanks to [@alexei-led](https://github.com/alexei-led) for [#2437](https://github.com/nicobailon/pi-subagents/issues/2437) and [#2440](https://github.com/nicobailon/pi-subagents/pull/2440).
33
+ - Retained background runs no longer time out while the packaged runner is still starting. Thanks to [@muermaru](https://github.com/muermaru) for [#2403](https://github.com/nicobailon/pi-subagents/issues/2403), and to [@qsgy-edge](https://github.com/qsgy-edge) for the independent diagnosis and timing evidence in [#2415](https://github.com/nicobailon/pi-subagents/pull/2415).
34
+ - When a background runner exits without writing a result, the failure notice now includes its exit code and signal. Thanks to [@grahama1970](https://github.com/grahama1970) for [#2423](https://github.com/nicobailon/pi-subagents/issues/2423).
35
+ - A child that produced valid structured output keeps it as evidence when a later provider error or abort fails the run. Thanks to [@grahama1970](https://github.com/grahama1970) for [#2411](https://github.com/nicobailon/pi-subagents/issues/2411).
36
+ - Completion notifications are no longer sent twice when the extension is registered more than once for the same session. Thanks to [@hongchu098](https://github.com/hongchu098) for [#2389](https://github.com/nicobailon/pi-subagents/issues/2389).
37
+ - The bundled reviewer works in directories without Git: `watchdog_diff` reports that no baseline is available instead of failing the review. Thanks to [@matthewmathistrellys](https://github.com/matthewmathistrellys) for [#2422](https://github.com/nicobailon/pi-subagents/issues/2422).
38
+ - The bundled reviewer's `watchdog_diff` counts as read-only, so a reviewer given a single output path returns its full report for the runtime to save, as introduced in [#426](https://github.com/nicobailon/pi-subagents/issues/426), with thanks to Alexander Gerdes ([@Avg8888](https://github.com/Avg8888)). Thanks to [@riskywhat](https://github.com/riskywhat) for [#2405](https://github.com/nicobailon/pi-subagents/issues/2405).
39
+ - Watchdog reviews and permission checks work again on the Pi 0.86.1 package layout. Thanks to [@zieglar](https://github.com/zieglar) for the reproduction and version comparison in [#2377](https://github.com/nicobailon/pi-subagents/issues/2377).
40
+ - A workflow child with no `agent` now fails with an error that names it (`Workflow child 'r1' has no agent…`) instead of the generic "Provide exactly one mode" message. Thanks to [@matthewmathistrellys](https://github.com/matthewmathistrellys) for raising the confusing error in [#2422](https://github.com/nicobailon/pi-subagents/issues/2422).
41
+ - `/prompt-workflow` finds prompt files that are symlinks (as installed by dotfile managers such as GNU Stow or homeshick) and skips broken links instead of failing. Thanks to [@nietaki](https://github.com/nietaki) for [#2430](https://github.com/nicobailon/pi-subagents/issues/2430).
42
+ - Completed retained agents can resume even when their own list of allowed child agents excludes them. Parent authority and that restriction both still apply; older retained children without the needed recovery data fail closed. Thanks to [@riskywhat](https://github.com/riskywhat) for [#2379](https://github.com/nicobailon/pi-subagents/issues/2379), building on the allowlist work in [#2338](https://github.com/nicobailon/pi-subagents/pull/2338) credited to [@shkrabov](https://github.com/shkrabov).
43
+ - Guidance now says the list of retained workflow children is not complete: when you know a run's exact id, check its status and try resuming it before falling back to a labeled agent with the same role. Thanks to [@riskywhat](https://github.com/riskywhat) for [#2406](https://github.com/nicobailon/pi-subagents/issues/2406).
44
+ - Skills marked `disable-model-invocation: true` are no longer shown to child agents, even when requested by name, and are no longer suggested to the model. Thanks to [@toRolex](https://github.com/toRolex) for [#2400](https://github.com/nicobailon/pi-subagents/pull/2400).
45
+ - Pi hosts compiled with Bun are found from Pi's package directory or its bundled `share/pi-coding-agent` layout, while unrelated extension dependencies still cannot turn on dynamic tools. Thanks to [@fmoda3](https://github.com/fmoda3) for [#2417](https://github.com/nicobailon/pi-subagents/issues/2417).
46
+ - pnpm installs follow npm-hosted peer aliases through their symlinks to the real package, so the package is not loaded twice. Thanks to [@henriquebastos](https://github.com/henriquebastos) for [#2409](https://github.com/nicobailon/pi-subagents/pull/2409).
47
+ - npm and git installs detect dynamic tool support from the running Pi installation and keep the compact `subagents_enable` loader instead of an always-loaded `subagent` tool. Thanks to [@qsgy-edge](https://github.com/qsgy-edge) for [#2398](https://github.com/nicobailon/pi-subagents/pull/2398).
48
+ - MCP direct tool names now match what pi-mcp-adapter registers, including servers whose tool names already start with the server name, the adapter's `mcp` prefix mode, and per-server `toolPrefix`. Thanks to [@qsgy-edge](https://github.com/qsgy-edge) for [#2395](https://github.com/nicobailon/pi-subagents/pull/2395).
49
+ - Logs from running and failed external CLI agents can be viewed in Fleet, tool status, and the TUI. Thanks to [@Shujakuinkuraudo](https://github.com/Shujakuinkuraudo) for [#2375](https://github.com/nicobailon/pi-subagents/issues/2375).
50
+ - Structured delegation updates report cumulative usage and no longer count missing provider cache numbers as zero. Thanks to [@bioShaun](https://github.com/bioShaun) for [#2374](https://github.com/nicobailon/pi-subagents/pull/2374).
51
+ - Forked sessions keep Pi 0.87 context edits, including replaced content and signed Anthropic thinking blocks.
52
+ ## [0.70.1] - 2026-09-20
53
+
54
+ ### Highlights
55
+
56
+ - Delegated tasks no longer fail solely because they finish without editing files.
57
+ - Runtime-added agents now honor configured model, provider, and thinking preferences.
58
+ - Foreground children launch reliably when Pi is installed outside the extension's own dependency tree.
59
+ - Pi 0.86.1 support improves watchdog checks, provider-backed summaries, packaging, and standalone use.
60
+
61
+ ### Changed
62
+
63
+ - Stop guessing whether task wording requires file edits. Successful tasks now follow their process result and explicitly configured output and acceptance checks. The `completionGuard` setting and `PI_SUBAGENTS_LLM_INTENT_ARBITER` switch have been removed. Thanks to [@SuTang-vain](https://github.com/SuTang-vain) for the reproduction that led to this change in [#2351](https://github.com/nicobailon/pi-subagents/issues/2351).
64
+ - Clarify that a custom agent file fully replaces a bundled agent with the same name. Custom implementation agents must declare `acceptanceRole: writer` to receive writer acceptance defaults.
65
+ - Update delegation guidance so large changes are split only when they contain independently testable parts.
66
+
67
+ ### Fixed
68
+
69
+ - Apply `subagents.defaultModel`, `defaultProvider`, `defaultThinking`, and model-tier overrides to runtime-registered agents. Thanks to [@bioShaun](https://github.com/bioShaun) for [#2368](https://github.com/nicobailon/pi-subagents/pull/2368).
70
+ - Show each workflow child's resolved model and thinking level in parent status output. Thanks to [@grahama1970](https://github.com/grahama1970) for [#2364](https://github.com/nicobailon/pi-subagents/pull/2364).
71
+ - Preserve watchdog working-directory context and authenticated provider behavior for pruned-fork overflow summaries on Pi 0.86.1. Thanks to [@chem](https://github.com/chem) for [#2362](https://github.com/nicobailon/pi-subagents/issues/2362).
72
+ - Launch the packaged inspector bootstrap from its compiled JavaScript instead of an absent TypeScript source. Thanks to [@pablog12](https://github.com/pablog12) for [#2360](https://github.com/nicobailon/pi-subagents/issues/2360).
73
+ - Resolve the host `pi-coding-agent` package and its exports from the Pi installation that owns the session, so foreground children work across npm-hosted layouts without loading a second SDK instance. Thanks to [@nazerim](https://github.com/nazerim) for [#2348](https://github.com/nicobailon/pi-subagents/issues/2348).
74
+ - Show an actionable expand shortcut when a host cannot provide its configured keybinding label.
75
+ - Stop test-only background runners when their owning test process exits, and isolate test temporary data to reduce filesystem and Spotlight load.
76
+
5
77
  ## [0.70.0] - 2026-09-19
6
78
 
7
79
  ### Highlights
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
  pi install npm:pi-subagents
15
15
  ```
16
16
 
17
- That is the only required step. Background children use the host's SDK: npm Pi keeps its detached Node runner; the official Pi 0.85.1 Linux x64 standalone release loads the same runner through Pi's embedded SDK, without a separate SDK install. See [Standalone background execution](docs/standalone-background.md) for the supported boundary and validation gate.
17
+ That is the only required step. Background children use the host's SDK: npm Pi keeps its detached Node runner; the official Pi 0.86.1 Linux x64 standalone release loads the same runner through Pi's embedded SDK, without a separate SDK install. See [Standalone background execution](docs/standalone-background.md) for the supported boundary and validation gate.
18
18
 
19
19
  ## Try this first
20
20
 
@@ -44,7 +44,9 @@ Pi is the parent session. A subagent is a focused child Pi session with its own
44
44
 
45
45
  When you ask for a subagent, Pi starts the child, gives it the task, and brings the result back. Foreground children run as sessions inside the parent Pi process and stream in the conversation. Background children run as sessions inside a detached runner process that keeps working and can be checked later.
46
46
 
47
- Installing the extension does not start an automatic reviewer in the background. It gives Pi a delegation tool. If you want every implementation reviewed, say so in your prompt or project instructions:
47
+ Installing the extension does not start an automatic reviewer in the background. Fresh parent sessions initially expose the small `subagents_enable` loader instead of the full `subagent` schema. When your request or applicable instructions authorize delegation, Pi can call the loader itself; the unchanged `subagent` tool is available on the next model request. Complexity alone does not authorize delegation. `bg_wait` and supervisor replies remain available without activation.
48
+
49
+ If you want every implementation reviewed, say so in your prompt or project instructions:
48
50
 
49
51
  ```text
50
52
  When you finish implementing, run a reviewer subagent before summarizing.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: claude-code-writer
3
3
  description: Explicit file-writing Claude Code CLI mode; requires local authentication and trusted user settings/hooks
4
+ acceptanceRole: writer
4
5
  runner:
5
6
  type: external-cli
6
7
  adapter: claude-code-writer
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: codex-exec-writer
3
3
  description: Explicit workspace-writing one-shot execution through the installed Codex CLI
4
+ acceptanceRole: writer
4
5
  runner:
5
6
  type: external-cli
6
7
  adapter: codex-exec-writer
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: cursor-agent-writer
3
3
  description: Explicit workspace-writing one-shot execution through the installed Cursor CLI
4
+ acceptanceRole: writer
4
5
  runner:
5
6
  type: external-cli
6
7
  adapter: cursor-agent-writer
package/agents/worker.md CHANGED
@@ -2,12 +2,13 @@
2
2
  name: worker
3
3
  description: Implementation agent for normal tasks and approved oracle handoffs
4
4
  aliases: developer, coder, implementer, develop
5
+ acceptanceRole: writer
5
6
  thinking: high
6
7
  systemPromptMode: replace
7
8
  inheritProjectContext: true
8
9
  inheritSkills: false
9
10
  tools: read, grep, find, ls, bash, edit, write, contact_supervisor
10
- defaultContext: fork
11
+ defaultContext: fresh
11
12
  defaultReads: context.md, plan.md
12
13
  defaultProgress: true
13
14
  ---
@@ -16,7 +17,7 @@ You are `worker`: the implementation subagent.
16
17
 
17
18
  You are the single writer thread. Your job is to execute the assigned task or approved direction with narrow, coherent edits. The main agent and user remain the decision authority.
18
19
 
19
- Use the provided tools directly. First read the inherited context, supplied files, plan, task paths, and named seams. Then implement carefully and minimally. Use broad search only to verify or expand from that starting point.
20
+ Use the provided tools directly. First read the provided context, supplied files, plan, task paths, and named seams. Then implement carefully and minimally. Use broad search only to verify or expand from that starting point.
20
21
 
21
22
  The builtin worker uses a strict tool allowlist. It does not inherit ambient extension tools from the parent session. To use an extension tool, configure a custom agent with the tool name explicitly listed in `tools` and load its provider through `extensions` or `subagentOnlyExtensions`.
22
23
 
package/docs/agents.md CHANGED
@@ -236,6 +236,8 @@ Disable and restore:
236
236
  - `subagent({ action: "eject", agent: "reviewer" })` copies a bundled builtin or package agent verbatim into the user or project agent dir (default `user`) as an editable custom file that shadows the original.
237
237
  - `subagent({ action: "reset", agent: "reviewer" })` deletes the scope's custom agent file and/or settings override entry, restoring the bundled default. It refuses if no bundled default exists (use `delete` for purely custom agents).
238
238
 
239
+ A custom agent file that shadows a bundled agent replaces the bundled definition wholesale; it does not inherit omitted frontmatter, including `acceptanceRole`. Custom implementation profiles must declare `acceptanceRole: writer` explicitly when writer acceptance inference is intended. Without it, automatic acceptance uses lightweight attestation as described in the [frontmatter reference](#frontmatter-reference).
240
+
239
241
  `eject`, `disable`, `enable`, and `reset` accept `agentScope: "user" | "project"` and operate in one scope at a time. Project overrides still win over user ones, so a project-scope disable survives a user-scope `enable` until you target the project scope.
240
242
 
241
243
  ## Running external CLI agents on a Herdr saved machine
@@ -317,7 +319,6 @@ timeoutMs: 900000
317
319
  toolTimeoutMs: 600000
318
320
  acceptance: {"level":"none","reason":"lightweight lookup"}
319
321
  acceptanceRole: read-only
320
- completionGuard: false
321
322
  interactive: true
322
323
  maxSubagentDepth: 1
323
324
  allowNestedSubagents: true
@@ -364,9 +365,8 @@ Field notes:
364
365
  | `timeoutMs` | Positive integer default runtime deadline in milliseconds for single-agent launches. Foreground launches use 30 minutes when neither the call nor agent provides a timeout; explicit `timeoutMs`/`maxRuntimeMs` and agent defaults win. |
365
366
  | `toolTimeoutMs` | Optional positive integer hard per-tool-call deadline in milliseconds. An explicit call value wins, then this agent default, global `toolTimeoutMs`, and `PI_SUBAGENT_TOOL_TIMEOUT_MS`. When omitted, known-fast built-in tools get a five-minute default; long-running tools get attention notices but no hard default. It does not extend the run-level deadline; `contact_supervisor`, `intercom`, and `bg_wait` are exempt. |
366
367
  | `acceptance` | Acceptance default for single-agent launches. Use a scalar level such as `checked` or an inline/block YAML map such as `{ level: "none", reason: "lightweight lookup" }`. Explicit call values win; chain and parallel acceptance remains task/step configuration. |
367
- | `acceptanceRole` | Optional `read-only` or `writer` role for automatic acceptance inference. Explicit task mutation or no-edit intent wins; otherwise the declared role replaces agent-name guessing. This does not grant or revoke tools. |
368
- | `mutationTools` | Comma-separated extension tool names whose calls count as mutation attempts for the completion guard. This declares evidence only; list and load each tool through `tools` and its extension provider as usual. |
369
- | `completionGuard` | Set `false` only for non-implementation agents that may mention implementation words while using mutation-capable tools such as `bash`. |
368
+ | `acceptanceRole` | Optional `read-only` or `writer` role for automatic acceptance inference. When omitted, automatic acceptance uses lightweight attestation; task wording and agent names do not escalate it. This does not grant or revoke tools. |
369
+ | `mutationTools` | Comma-separated extension tool names treated as mutating activity for runtime diagnostics, long-running-tool status, and timeout recovery. This is diagnostic only and never determines successful completion. List and load each tool through `tools` and its extension provider as usual. |
370
370
  | `interactive` | Parsed for compatibility but not currently enforced. |
371
371
  | `maxSubagentDepth` | Tightens nested delegation for this agent's children. |
372
372
  | `memory` | Opt-in role-specific persistent memory. See below. |
@@ -377,7 +377,7 @@ Hosts can import `registerRequiredChildExtensions` from `pi-subagents/required-c
377
377
 
378
378
  Required paths follow ordinary extension resolution and survive agent defaults and `extensions: []` across native foreground, detached, nested, and recovery launches. A `capabilityCeiling.denyExtensions` conflict or required load/provider-registration failure rejects before model resolution. External runners are excluded, and status/watch paths do not query the registry.
379
379
 
380
- When the completion guard would flag missing edits, a model intent arbiter can rescue only a confident read-only task. Foreground uses the parent model; native background uses the child attempt's existing model services after child shutdown. Ordinary completions do not invoke classification or resolve arbiter auth. Disabled arbitration (`PI_SUBAGENTS_LLM_INTENT_ARBITER=0`), unavailable model/auth, errors, ambiguous intent, and tasks over 8,000 characters keep the guard result. The classification prompt has a 10-second timeout; preceding auth and module loading are outside that bound. This does not change capability limits or the v1 contract's default-off guard and explicit missing-effect semantics.
380
+ Successful completion is determined by observable gates such as process outcome, required outputs, explicit acceptance, verification commands, independent review, and staged-index integrity. Best-effort mutation observations remain diagnostic: unchanged or unknown evidence does not fail a run, and observed changes do not prove correctness.
381
381
 
382
382
  ## Per-agent persistent memory
383
383
 
@@ -449,8 +449,7 @@ More rules:
449
449
  - `mcp:` entries are split out and forwarded as direct MCP selections without granting normal builtins unless those builtins are also listed.
450
450
  - Path-like `tools` entries, such as extension paths or `.ts`/`.js` files, are treated as tool-extension paths rather than tool names.
451
451
  - Internal runtime tools such as `structured_output` are added to an explicit allowlist only when their contract is active.
452
- - Unknown extension tool calls count as mutation attempts only when their names are listed in `mutationTools`; undeclared unknown tools keep the no-edit guard active.
453
- - Agents that declare only known read-only builtin tools skip the implementation completion guard. `bash`, unknown tools, and MCP tools stay mutation-capable. Use `completionGuard: false` for bash-enabled validators or advisors that should never be judged as implementation agents.
452
+ - Unknown extension tool calls are treated as mutating diagnostic activity only when their names are listed in `mutationTools`.
454
453
 
455
454
  Examples:
456
455
 
@@ -461,7 +460,7 @@ Examples:
461
460
  - `allowNestedSubagents: true` with `tools` omitted: normal builtin tools (and, for background children, ambient extensions) remain inherited, and the child-safe nested `subagent` runtime is added.
462
461
  - `tools: read, fixture_search` plus `subagentOnlyExtensions: ./tools/fixture-search.ts`: the provider loads only in this agent's child sessions, and the registered `fixture_search` name survives the strict allowlist.
463
462
 
464
- Direct MCP tools require [pi-mcp-adapter](https://github.com/nicobailon/pi-mcp-adapter). Subagents only receive direct MCP tools when `mcp:` entries are listed in their frontmatter; global `directTools: true` in `mcp.json` is not enough by itself. The generic `mcp` proxy tool can still be used for discovery when available. The adapter caches tool metadata at startup, so after connecting a new MCP server for the first time, restart Pi before relying on direct tools. Server `includeTools` and `excludeTools` policies are enforced while resolving cached metadata for children: both accept exact names and `*`/`?` glob patterns against raw, generated-resource, and server/short/none-prefixed names, with `excludeTools` taking precedence. `mcp:` entries must name servers from the adapter's configuration files. A server that exists only in the adapter's runtime snapshot (registered at runtime, not persisted) cannot be provided to a child: children are pi sessions inside the parent or the runner process, not `pi` processes that could receive an MCP config argument, so such a launch fails with an error saying that MCP tools must come from an ambient adapter extension in a background child. An `mcp:` entry named `subagent` does not authorize nested fanout; declare the builtin `subagent` tool or set `allowNestedSubagents: true`. If a resolved direct MCP name is missing from the child registry, pi-subagents keeps the launch failed under the strict allowlist and identifies the condition as a host/pi-mcp-adapter registration problem; verify that the adapter registers the selected tools before child startup.
463
+ Direct MCP tools require [pi-mcp-adapter](https://github.com/nicobailon/pi-mcp-adapter). Subagents only receive direct MCP tools when `mcp:` entries are listed in their frontmatter; global `directTools: true` in `mcp.json` is not enough by itself. The generic `mcp` proxy tool can still be used for discovery when available. The adapter caches tool metadata at startup, so after connecting a new MCP server for the first time, restart Pi before relying on direct tools. Server `includeTools` and `excludeTools` policies are enforced while resolving cached metadata for children: both accept exact names and `*`/`?` glob patterns against raw, generated-resource, and server/short/mcp/none-prefixed names, with `excludeTools` taking precedence. `mcp:` entries must name servers from the adapter's configuration files. A server that exists only in the adapter's runtime snapshot (registered at runtime, not persisted) cannot be provided to a child: children are pi sessions inside the parent or the runner process, not `pi` processes that could receive an MCP config argument, so such a launch fails with an error saying that MCP tools must come from an ambient adapter extension in a background child. An `mcp:` entry named `subagent` does not authorize nested fanout; declare the builtin `subagent` tool or set `allowNestedSubagents: true`. If a resolved direct MCP name is missing from the child registry, pi-subagents keeps the launch failed under the strict allowlist and reports the registration mismatch; check the resolved names against what the host or pi-mcp-adapter actually registers before child startup.
465
464
 
466
465
  `extensions` controls child extension loading:
467
466
 
@@ -76,6 +76,12 @@ For a native Pi `model_verification_failed` where your proxy accepts `claude-hai
76
76
 
77
77
  Replace `YOUR_PROVIDER` with the resolved Pi provider ID. Keep the outgoing model alias unchanged. This native remedy already exists in v0.65.1; it does not infer equivalence from provider prefixes or dates. The built-in external `claude-code` adapter does not invoke this verifier or use this setting. If an external run shows this diagnostic, identify the installed version, resolved runner kind/adapter, and error location before applying a native remedy. Thanks to [sixtus](https://github.com/sixtus) for the concrete request-ID/response-ID example in [#1922](https://github.com/nicobailon/pi-subagents/issues/1922).
78
78
 
79
+ ## Tool activation lifecycle
80
+
81
+ On Pi 0.86.1 or newer, a fresh unrestricted parent starts with `subagents_enable`, `bg_wait`, and `subagent_supervisor` active while `subagent` stays registered but inactive. Calling `subagents_enable({})` preserves unrelated active tools and exposes `subagent` on the next model request. It does not launch a child or infer authority from prompt keywords.
82
+
83
+ The recorded native `subagent` selection is restored on resume, reload, and tree navigation, so an activated session stays activated and a cold session stays cold. Older history without tool-selection records keeps eager `subagent` availability. If Pi's allowlist or exclusions remove the loader, the extension does not hide `subagent`; if they remove `subagent`, the loader reports it unavailable. Hosts older than the verified dynamic-tool baseline keep eager behavior and log one compatibility warning.
84
+
79
85
  ## `toolDescriptionMode`
80
86
 
81
87
  ```json
@@ -412,13 +418,23 @@ Overrides the `pi` command pi-subagents spawns for project panes and the profile
412
418
 
413
419
  Foreground children remain sessions inside the parent. Npm background children retain their Node runner and host-package peer aliases; this variable does not turn npm Pi into a binary-backed runner. See [Standalone background execution](standalone-background.md) for the official tested target.
414
420
 
421
+ ## `PI_PACKAGE_DIR`
422
+
423
+ ```bash
424
+ export PI_PACKAGE_DIR=/path/to/pi-coding-agent-package
425
+ ```
426
+
427
+ Pi's own package/assets root is also authoritative when pi-subagents verifies the running host for dynamic tool activation. Host discovery prefers a package root owned by the real `process.argv[1]`, then a nonblank `PI_PACKAGE_DIR`, then `PI_SUBAGENTS_PI_CODING_AGENT_PACKAGE_ROOT`. For a proven Bun-compiled Pi process with a virtual argv entry, it can finally validate package assets adjacent to the canonical executable or in the installed `<prefix>/share/pi-coding-agent` layout. Every selected root must contain a `package.json` whose name is exactly `@earendil-works/pi-coding-agent`; an invalid explicit root fails closed rather than selecting another installation. Empty or whitespace-only values are ignored.
428
+
415
429
  ## `PI_SUBAGENTS_PI_CODING_AGENT_PACKAGE_ROOT`
416
430
 
417
431
  ```bash
418
432
  export PI_SUBAGENTS_PI_CODING_AGENT_PACKAGE_ROOT=/path/to/pi-coding-agent-package
419
433
  ```
420
434
 
421
- Overrides host-package discovery for spawned children. Foreground CLI resolution uses this root to locate the `pi` CLI script, and the detached background runner uses it for jiti host resolution and peer-package aliases, so both child kinds agree on one host. It is consulted when argv-based automatic discovery cannot identify the host, such as a wrapper install or a non-standard layout. The value must be the root of a canonical `@earendil-works/pi-coding-agent` installation (the directory containing its `package.json`, with that package name); both child kinds still validate the package name and its peer packages from that install tree, so a package whose manifest carries a different name is rejected even with the override set. Empty or whitespace-only values are ignored.
435
+ Overrides host-package discovery for spawned children. Foreground CLI resolution uses this root to locate the `pi` CLI script, and the detached background runner uses it for jiti host resolution and peer-package aliases, so both child kinds agree on one host. For running-host activation verification it follows argv ownership and Pi's own `PI_PACKAGE_DIR`, and precedes inferred Bun image layouts. The value must be the root of a canonical `@earendil-works/pi-coding-agent` installation (the directory containing its `package.json`, with that package name); both child kinds still validate the package name and its peer packages from that install tree, so a package whose manifest carries a different name is rejected even with the override set. Empty or whitespace-only values are ignored.
436
+
437
+ The default in-process child session loader consults the same discovery. Before falling back to a bare `@earendil-works/pi-coding-agent` import, it resolves the host package root (the running pi process's location, then this override, then pi-subagents' own install tree as a last fallback) and imports the host's entry file directly, so children share the host's single SDK instance instead of a second copy. Roots whose `package.json` name is not `@earendil-works/pi-coding-agent` are rejected. When this override is selected, an unimportable root is reported instead of falling back to a bare import from a different tree.
422
438
 
423
439
  ## `intercomBridge`
424
440
 
@@ -114,7 +114,7 @@ pi.events.emit("subagents:rpc:v1:request", {
114
114
  });
115
115
  ```
116
116
 
117
- The RPC methods are `ping`, `status`, `manage`, `spawn`, `steer`, `interrupt`, `stop`, and `resume`. `status`, `manage`, `steer`, `interrupt`, and `resume` reuse normal package-owned actions.
117
+ The RPC methods are `ping`, `status`, `manage`, `spawn`, `steer`, `interrupt`, `stop`, `resume`, and `cost`. `status`, `manage`, `steer`, `interrupt`, and `resume` reuse normal package-owned actions.
118
118
 
119
119
  Method notes:
120
120
 
@@ -122,6 +122,7 @@ Method notes:
122
122
  - `spawn` accepts structured single-child execution (`agent`, `task?`), inline `workflowScript`, or `workflowScriptPath` and is async-only: omit `async` or set `async: true`, omit `clarify`, and do not pass management `action` values. Relative script paths resolve against the request `cwd`. It goes through the same executor as the `subagent` tool, so agent discovery, validation, session attribution, configured spawn caps, child-safety depth, artifacts, and async status all behave the same.
123
123
  - `steer` requires an async run `id` (plus optional child `index`) and a non-empty `message`; its reply preserves the normal acknowledged-delivery result. Optional `mode` values are `steer` (default), `follow_up`, and `auto`, and receipts include `deliveryStatus: "delivered" | "queued"`. RPC steering disables the direct tool's pause-and-revive recovery in every mode so an extension keeps authority over the exact child it spawned; `ping.capabilities.nonRecoveringSteer` advertises this guarantee.
124
124
  - `resume` requires a run target and non-empty `message`. It delegates to the existing revival path, which validates current-session ownership, persisted session/recovery metadata, stopped/live state, capability ceilings, and the exclusive session lease before returning the new async run details. Callers may request a `file-only` output path for the revived result without overriding its model, tools, or budgets. `ping.capabilities.resume` advertises this seam.
125
+ - `cost` returns the same parent-plus-child accounting `/subagent-cost` renders, as data: `{ version: 1, parent, children, childTotal, total, unresolvedAsyncChildren }`, where each usage is `{ input, output, cacheRead, cacheWrite, cost, turns }` and each child carries `label`, `agent`, `runId`, `usage`, and `sessionFile` when known. It is read-only and walks the current session branch plus existing run artifacts, so request it on your own turn boundaries (for example after `agent_settled` or an async completion wake), not on a timer. `unresolvedAsyncChildren` counts async children whose metadata could not be read; treat `childTotal` as a lower bound when it is non-zero, exactly as documented for `/subagent-cost` in [observability.md](observability.md). `ping.capabilities.cost` advertises `{ version: 1 }`.
125
126
  - `stop` targets current-session top-level async runs through the stop control channel and records a `stopped` lifecycle instead of reporting a timeout.
126
127
  - `status` keeps targeted and rich requests on the executor-backed path. A request with no `id`, `runId`, `dir`, `index`, `view`, or `lines` may use the restored in-memory projections and a short summary; when the live state is missing, stale, session-mismatched, or not restored, it falls back to normal executor status. Status `view`, `lines`, and `index` are forwarded for targeted transcript/fleet requests. Successful replies retain `text`, `details`, `fleet`, and `asyncSnapshot`; the short summary intentionally omits canonical filesystem details, wait subscriptions, and budget annotations.
127
128
 
@@ -136,6 +137,7 @@ Capability advertisements on `ping`:
136
137
  - `resume` — the revival seam described above.
137
138
  - `statusProjection: { version: 1, untargeted: "in-memory-when-ready", targeted: "executor" }` — untargeted status may use restored bounded projections; targeted or rich status remains executor-backed.
138
139
  - `fleetStatus: { version: 1 }` — successful `status` replies additionally include `data.fleet`.
140
+ - `cost: { version: 1 }` — the `cost` method is available and returns the versioned report shape above.
139
141
 
140
142
  Structured delegation progress updates carry `runId` as soon as foreground execution allocates it, so a caller can retain the package-owned revival target even if its own tool turn is interrupted before the terminal response. Foreground `details.results[]` rows also include a numeric `index` that is unique within the run and stable across partial progress snapshots and the final result; use `(runId, index)` instead of row position to correlate single, counted parallel, and chain children.
141
143
 
@@ -188,6 +190,8 @@ const registration = request.result.registration;
188
190
 
189
191
  If `pi-subagents` is a resolvable dependency of the consumer package, `pi-subagents/agents` exports `RUNTIME_AGENT_REGISTER_EVENT`, the request/result types, and `registerAgentViaEvents()` for the same contract. A separately installed Pi package is not automatically a Node dependency of another package. In that case, use the event contract directly instead of a runtime import. A type-only development dependency is optional.
190
192
 
193
+ A registered agent follows the operator's subagent model settings like any other agent: `subagents.defaultModel`, `defaultProvider`, and `defaultThinking` fill a definition that omits `model` or `thinking`, and the `model`, `defaultProvider`, `fast`, and `thinking` fields of `agentOverrides.<name>` win over the definition. Every other definition field stays extension-owned, and other override fields are ignored for runtime agents. Set `model` in the definition only when the agent must not follow operator model settings; `model: "inherit"` selects the parent session model explicitly.
194
+
191
195
  The installed owner applies the existing runtime-agent validation, collision checks, limits, runtime source metadata, and cleanup. If more than one owner listens, the first handler that writes `request.result` wins. Unsupported versions, malformed requests, and registration failures return `{ ok: false, error }`. No result means no compatible owner handled the event.
192
196
 
193
197
  This contract is process-local. It does not register agents in child sessions or other Pi processes, and it does not change package discovery or package resolution.
package/docs/models.md CHANGED
@@ -82,7 +82,7 @@ For a persistent role override:
82
82
  }
83
83
  ```
84
84
 
85
- `subagents.defaultModel` and `subagents.defaultProvider` apply to builtin, package, user, and project agents. `defaultModel` fills only agents that do not set `model` in frontmatter. `defaultProvider` is also applied to frontmatter and override models so bare ids resolve against the intended provider. Per-run model overrides and `agentOverrides.<name>.model` win over frontmatter and the global default. The same `agentOverrides` block can change `tools`, `skills`, inherited context, prompt text, or disable an agent (see [agents.md](agents.md)); matching custom-agent frontmatter is replaced for any field set by the override.
85
+ `subagents.defaultModel` and `subagents.defaultProvider` apply to builtin, package, user, project, and runtime-registered agents. `defaultModel` fills only agents that do not set `model` in frontmatter or in their runtime definition. `defaultProvider` is also applied to frontmatter and override models so bare ids resolve against the intended provider. Per-run model overrides and `agentOverrides.<name>.model` win over frontmatter and the global default. The same `agentOverrides` block can change `tools`, `skills`, inherited context, prompt text, or disable an agent (see [agents.md](agents.md)); matching custom-agent frontmatter is replaced for any field set by the override. Runtime-registered agents take only `model`, `defaultProvider`, `fast`, and `thinking` from `agentOverrides.<name>`; their other definition fields stay owned by the registering extension.
86
86
 
87
87
  ## Fast mode
88
88
 
@@ -31,7 +31,7 @@ Or ask naturally: "Show me the current async runs."
31
31
 
32
32
  Run `/subagent-cost` for the parent session's combined parent and child token usage and cost. It includes completed async workflow children when their persisted receipts and metadata remain available. Missing child metadata is reported as unavailable when the receipt identifies that child. If the workflow receipt itself is missing, unreadable, invalid, or non-terminal, affected children can be omitted from the total without an unavailable count, so treat the result as a lower bound when run artifacts are unavailable.
33
33
 
34
- Pi's built-in session totals do not automatically include child usage delivered only by an async completion notification. Those notifications are custom messages, and Pi's public custom-message API does not carry accounted usage. `/subagent-cost` is therefore the supported accounting view for async child usage; do not infer child totals from Pi's footer or `/session` alone.
34
+ Pi's built-in session totals do not automatically include child usage delivered only by an async completion notification. Those notifications are custom messages, and Pi's public custom-message API does not carry accounted usage. `/subagent-cost` is therefore the supported accounting view for async child usage; do not infer child totals from Pi's footer or `/session` alone. Other extensions can read the same report as data through the in-process RPC `cost` method (see [extension-api.md](extension-api.md#in-process-event-bus-rpc)) instead of scraping the slash output.
35
35
 
36
36
  The under-editor async widget gives a short view while work runs. Its expand key follows your Pi keybinding:
37
37
 
@@ -46,7 +46,7 @@ async subagent worker · background
46
46
 
47
47
  To inspect one background child in text, use `subagent({ action: "status", id: "...", view: "transcript" })`; add `index` for a specific child in a parallel or chain run.
48
48
 
49
- In Pi fullscreen mode with mouse dispatch (verified with Pi TUI 0.85.1), left-click
49
+ In Pi fullscreen mode with mouse dispatch, left-click
50
50
  anywhere on the async widget's header row to fold it into a live one-line status
51
51
  summary. Click again to restore the usual layout. No knowledge of extension commands
52
52
  or keyboard shortcuts is needed. The summary counts the widget's tracked runs,
@@ -206,16 +206,20 @@ Nested fanout status is stored as compact sidecar event/registry metadata and me
206
206
 
207
207
  Consumers should read these JSON files instead of scraping terminal output. Unknown fields and event types should be ignored for forward compatibility.
208
208
 
209
- RPC hosts that need low-latency child-stop UI hints can subscribe to the
210
- `subagent:child-status` event advertised by RPC `ping` as `events.childStatus`.
211
- The payload uses `type: "subagent.child-status"`, `version: 1`, `runId`,
212
- `childId`, `status` (`"stopping"` or `"stopped"`), `ts`, and optional child
213
- metadata such as `stepIndex`, `agent`, `childRunId`, `workflowKey`, `phase`, and
214
- `label`. These events are observer hints only. They can duplicate across RPC and
215
- async replay paths, and they are not replayed after a host restart. Status
216
- snapshots remain authoritative for recovery and final state. Child stop control
217
- still uses the normal `stop` request with `childId`; there is no separate child
218
- stop API.
209
+ Companion UIs and RPC hosts that need low-latency child lifecycle hints can
210
+ subscribe to the `subagent:child-status` event advertised by RPC `ping` as
211
+ `events.childStatus`. The payload uses `type: "subagent.child-status"`,
212
+ `version: 1`, `runId`, `childId`, `status` (`"started"`, `"stopping"`, or
213
+ `"stopped"`), `ts`, and optional child metadata such as `asyncDir`, `stepIndex`,
214
+ `agent`, `childRunId`, `workflowKey`, `phase`, and `label`. Async
215
+ `workflowScript` roots emit `"started"` once the keyed child has a concrete
216
+ launch identity; `childId` and `workflowKey` are the stable workflow key, while
217
+ `stepIndex` is only a convenience projection for the current status snapshot.
218
+ These events are observer hints only. They can duplicate across the live event
219
+ bus and async replay paths, and they are not replayed after a host restart.
220
+ Status snapshots remain authoritative for recovery and final state. Child stop
221
+ control still uses the normal `stop` request with `childId`; there is no separate
222
+ child stop API.
219
223
 
220
224
  ### Status and result fields
221
225
 
@@ -307,7 +311,7 @@ Async events:
307
311
  - `subagent:async-started`
308
312
  - `subagent:async-complete`
309
313
 
310
- The `subagent:async-started` payload includes `task`, the backwards-compatible first child task truncated to 50 characters, and `goal`, the workflow-level caller task truncated to 120 characters (falling back to the first child task). Companion UI extensions can combine `goal`, `workflowGraph`, and the live lifecycle artifacts under `asyncDir` without scraping terminal output.
314
+ For regular async starts, the `subagent:async-started` payload includes redacted `task` and `goal` prompt fields. Async `workflowScript` roots emit the same event with `mode: "workflow"` after their initial `status.json` is durable; workflow roots can omit `task`, and any included prompt fields are redacted. Their keyed children are then announced dynamically through `subagent:child-status`. Companion UI extensions can combine those hints with the authoritative live lifecycle artifacts under `asyncDir` without scraping terminal output.
311
315
 
312
316
  Intercom delivery events:
313
317
 
@@ -1,6 +1,6 @@
1
1
  # Standalone background execution
2
2
 
3
- Supported standalone target: **official Pi 0.85.1, Linux x64**. Keep its adjacent release assets with the executable. Other versions, operating systems, architectures and packagers are outside the fully validated support target; limited experimental Windows coverage is described below.
3
+ Supported standalone target: **official Pi 0.86.1, Linux x64**. Keep its adjacent release assets with the executable. Other versions, operating systems, architectures and packagers are outside the fully validated support target; limited experimental Windows coverage is described below.
4
4
 
5
5
  Pi's extension loader supplies its embedded SDK to `binary-bootstrap.ts`, which awaits the existing configured runner before exiting. Startup authorization, revival leases, controls, disposal and process-close observation remain shared with npm. Each independent run has its own host; native sessions inside that run share it. No per-session CLI protocol, runtime download/install, alternate SDK or foreground fallback is introduced. Npm Pi keeps its Node runner, peer aliases and detected npm `PI_PACKAGE_DIR` override (including refusal when no npm root exists).
6
6
 
@@ -10,7 +10,7 @@ Implementation and lifecycle fixtures derive from [@xz-dev](https://github.com/x
10
10
 
11
11
  The resolver recognizes Bun's Windows virtual entrypoint prefixes, `B:/~BUN/` and `B:\~BUN\`, alongside `/$bunfs/`. It launches the real `process.execPath` (or the existing executable override). The `B:` prefix is virtual, not the installation drive; `pi-native.exe` is not a required executable name.
12
12
 
13
- A local Windows x64 smoke passed with **xz-dev/pi `0.85.1-xz.169.1.gb5f4d0ff`, Bun 1.4.2**: a fresh async worker executed a read-only Git command, returned its result, delivered the native completion notification, and exited with code 0 and no remaining runner process. This is not validation of the official Windows distribution or every Bun-compiled Pi host. Windows remains **experimental**: the full standalone lifecycle matrix has not been validated there.
13
+ Windows remains **experimental**: the full standalone lifecycle matrix has not been validated there or for every Bun-compiled Pi host.
14
14
 
15
15
  Node-hosted npm Pi keeps its existing runner path and is not affected by this virtual-entrypoint detection defect. Installing only the pi-subagents extension through npm does not change a Bun-compiled Pi host into an npm Pi host.
16
16
 
@@ -39,11 +39,11 @@ For a focused diagnostic, use `node test/smoke/standalone-background.mjs "$relea
39
39
 
40
40
  ## Npm regressions and local trial
41
41
 
42
- Existing npm clean-install CI covers real SDK 0.85.1. The standalone CI job also checks the public npm launch path without execution-time network:
42
+ Existing npm clean-install CI covers real SDK 0.86.1. The standalone CI job also checks the public npm launch path without execution-time network:
43
43
 
44
44
  ```bash
45
45
  npm_checks="$(mktemp -d)"
46
- node test/smoke/clean-install.mjs "$npm_checks/sdk" 0.85.1
46
+ node test/smoke/clean-install.mjs "$npm_checks/sdk" 0.86.1
47
47
  node test/smoke/npm-background.mjs "$npm_checks/sdk" "$npm_checks/launch"
48
48
  ```
49
49
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  Parameters and actions for the `subagent` tool. These are what the LLM passes when it calls the tool; most users ask naturally or use slash commands instead.
4
4
 
5
+ In a fresh parent session, `subagents_enable({})` makes the full `subagent` tool available on the immediately following model request without launching work. Pi may call it when delegation is authorized by the current request or applicable instructions, or to manage existing runs. Direct execution remains the default; task complexity does not grant delegation authority. The public `subagent` name and parameters are unchanged after activation.
6
+
5
7
  Call `{ action: "guide", topic: "tool-reference" }` for this reference or `topic: "workflows"` for [workflow recipes](workflows.md). Use `topic: "agents"` for authoring, `topic: "missions"` for missions/schedules, and `topic: "watchdog"` for watchdog controls. Guide reads do not change the schema or grant authority.
6
8
 
7
9
  ## Execution examples
@@ -95,7 +97,7 @@ The complete plain-JSON inventory is validated before the first launch (maximum
95
97
  | `action` | string | - | Offline workflow `validate`, agent management (including `guide`, `children.list`, and `refine`/`refine.show`/`refine.rollback`), lane evidence (`lane.status`, `lane.recordMerge`, `lane.recordSupersession`), mission (`mission.create/list/show/update/resolve-decision/attach-run/close`), Inspect actions (`inspector.command/open/status/close`), Herdr project pane (`project.open/status/close`), status/control, plan-only `worktree.cleanup`, schedule, watchdog, or doctor action. |
96
98
  | `topic` | `overview \| workflows \| agents \| missions \| observability \| tool-reference \| configuration \| models \| watchdog \| extension-api` | `overview` | Packaged guide topic for `action: "guide"`. |
97
99
  | `config` | object/string | - | Agent config for management create/update. |
98
- | `context` | `fresh \| fork \| profile` | global or per-agent default, else `fresh` | Explicit `fresh` or `fork` overrides every workflow child. `profile` requires the selected agent's declared `defaultContext` and ignores config `defaultSubagentContext`; missing agent defaults fail. When omitted, [`defaultSubagentContext`](configuration.md#defaultsubagentcontext) wins over each agent's `defaultContext`; implicit fork falls back to fresh without a persisted parent session and leaf. Explicit fork is strict. Packaged `worker`, `oracle`, and `advisor` default to `fork`. |
100
+ | `context` | `fresh \| fork \| profile` | global or per-agent default, else `fresh` | Explicit `fresh` or `fork` overrides every workflow child. `profile` requires the selected agent's declared `defaultContext` and ignores config `defaultSubagentContext`; missing agent defaults fail. When omitted, [`defaultSubagentContext`](configuration.md#defaultsubagentcontext) wins over each agent's `defaultContext`; implicit fork falls back to fresh without a persisted parent session and leaf. Explicit fork is strict. Packaged `worker` defaults to `fresh`; packaged `oracle` and `advisor` default to `fork`. |
99
101
  | `model` | string | agent default | Call `{action:"models"}` first and copy an exact `provider/id`; bare ids resolve only if unique, and agent names are not model ids. A suffix such as `provider/id:high` (`off/minimal/low/medium/high/xhigh/max`) overrides agent thinking. The `thinking` field is only for `watchdog.configure`, ignored on dispatch. |
100
102
  | `missionId` | string | - | Attach a workflow to an existing project mission instead of creating its default enclosing mission. |
101
103
  | `mission` | object/false | auto-create | Override the default enclosing mission with `{ title \| summary, objective?, goal?, budget?, labels? }`. Set exactly one non-empty `title` or `summary`; `objective` and `labels` are optional. `goal` may only be `true`, requires `budget.tokens`, and enables continuation notices. Pass `false` for an intentionally ephemeral workflow with no mission for it or its children and no `state` global. Explicit mission persistence failures are strict. |
@@ -142,7 +144,7 @@ Explicit `context: "fork"` fails fast when the parent session is not persisted,
142
144
 
143
145
  When the inherited transcript contains signed Anthropic `thinking` / `redacted_thinking` blocks, `pi-subagents` strips those provider-private blocks from the forked child session: a thinking signature is bound to the session that produced it and cannot be replayed into a branch. The child keeps its requested thinking level and reasons fresh from its first turn; sanitizing the inherited transcript is not a downgrade. Explicit `context: "fork"` never silently downgrades to `fresh`.
144
146
 
145
- In workflow runs that omit `context`, each `runs.run` child follows the global `defaultSubagentContext` when set, then its own `defaultContext`. Without the global setting, a fresh-default scout can run fresh beside a fork-default worker. If the parent session file or current leaf is not available yet, implicit fork-default children run fresh. Pass explicit `context: "fork"` or `context: "fresh"` when you intentionally want one context for every child.
147
+ In workflow runs that omit `context`, each `runs.run` child follows the global `defaultSubagentContext` when set, then its own `defaultContext`. Without the global setting, a fresh-default worker can run fresh beside a fork-default oracle. If the parent session file or current leaf is not available yet, implicit fork-default children run fresh. Pass explicit `context: "fork"` or `context: "fresh"` when you intentionally want one context for every child.
146
148
 
147
149
  ### Workflow steering
148
150
 
@@ -179,7 +181,7 @@ Workflows get `await state.get(key)` and `await state.set(key, value)` through t
179
181
 
180
182
  ### Retained children
181
183
 
182
- Completed workflow children from the current parent session stay addressable as retained children. `{ action: "children.list" }` lists up to the last 10 with their run ids and explicit `resumable` or `not resumable` state. Resume only rows reported `resumable`; if no row is resumable, start a same-role fallback challenge and label it as fallback. A later workflow continues a resumable child by passing `resume` instead of `agent`:
184
+ Completed workflow children from the current parent session stay addressable as retained children. `{ action: "children.list" }` lists up to the last 10 with their run ids and explicit `resumable` or `not resumable` state. This workflow-only roster is not an exhaustive list of direct native children. Resume only rows reported `resumable`. When the exact run id of an intended direct child is known, inspect it with `{ action: "status", id: "<run-id>" }`; if status identifies the candidate, attempt `{ action: "resume", id: "<run-id>", message: "..." }`. Resume performs the authoritative eligibility check and may reject the attempt. Start a same-role fallback challenge, labeled as fallback, only when no known candidate exists or resume rejects eligibility. A later workflow continues a resumable child by passing `resume` instead of `agent`:
183
185
 
184
186
  ```js
185
187
  { workflowScript: `
@@ -196,7 +198,7 @@ Each workflow key identifies one result lane. Use a new stable workflow key for
196
198
 
197
199
  Inside `workflowScript`, `await runs.run(key, { resume, task })` waits for the revived child to finish and returns its completed output and new `runId`. Each resume can return a new retained run id, so loops must continue from the latest returned `runId`. Top-level `{ action: "resume" }` remains detached and returns a background-run receipt.
198
200
 
199
- For a simple implementation challenge outside a workflow script, send the challenge through `subagent({ action: "resume", id: "<retained-writer-run>", message: "Reconsider the implementation and make any better current-scope change." })` only when `children.list` reports that retained writer as `resumable`. If no retained writer is resumable, start a same-role fallback challenge and record why it is a fallback. Use workflow `runs.run({ resume })` only when the script must await the revived writer output before the next step. Do not use `steer` as the sole challenge action for a completed retained child; `steer` with `mode: "follow_up"` only queues text for the next `resume`.
201
+ For a simple implementation challenge outside a workflow script, send the challenge through `subagent({ action: "resume", id: "<retained-writer-run>", message: "Reconsider the implementation and make any better current-scope change." })` when `children.list` reports that retained writer as `resumable`, or attempt it after exact-id status inspection identifies a known direct-child candidate. Status is advisory; resume authoritatively checks eligibility and may reject missing recovery requirements. If there is no known candidate or resume rejects eligibility, start a same-role fallback challenge and record why it is a fallback. Use workflow `runs.run({ resume })` only when the script must await the revived writer output before the next step. Do not use `steer` as the sole challenge action for a completed retained child; `steer` with `mode: "follow_up"` only queues text for the next `resume`.
200
202
 
201
203
  `resume` and `agent` are mutually exclusive. The revived child keeps its stored agent, model, and tool contract. `gate` is rejected on retained resume items because resume uses the retained child contract.
202
204
 
@@ -242,7 +244,7 @@ Agent definitions are not loaded into context by default. Management actions let
242
244
 
243
245
  { action: "update", agent: "code-analysis.scout", config: { model: "openai/gpt-4o" } }
244
246
  { action: "update", agent: "code-analysis.scout", config: { acceptance: "" } } // clear the frontmatter default
245
- { action: "update", agent: "code-analysis.scout", config: { acceptanceRole: false } } // restore inferred name fallback
247
+ { action: "update", agent: "code-analysis.scout", config: { acceptanceRole: false } } // restore default lightweight attestation
246
248
  { action: "delete", agent: "scout" }
247
249
 
248
250
  { action: "eject", agent: "reviewer" }
@@ -431,13 +433,9 @@ A gate given as `{ command, output: "json" }` runs like a string gate, and then
431
433
 
432
434
  Acceptance evidence levels are `auto`, `none`, `attested`, `checked`, and `verified`. `acceptance: "auto"` is the default.
433
435
 
434
- Review is a separate gate configured with `acceptance.review`:
435
-
436
- - Async, risky, and dynamic writer contexts infer checked evidence plus `review: { agent: "reviewer", required: true }`.
437
- - Tasks classified as read-only infer no acceptance by default, including reviews of release, migration, or security work; those topics do not turn a read-only task into implementation. With role metadata omitted, unknown risk-topic tasks retain their gate even when the agent name suggests a reviewer. Explicit acceptance requests still apply.
438
- - Normal writer tasks infer checked evidence without review.
436
+ Automatic inference uses only the declared structured role: `acceptanceRole: "writer"` infers checked evidence, with `review: { agent: "reviewer", required: true }` for async and dynamic writers; `"read-only"` infers none; and an omitted role infers lightweight attestation. Task wording, risk vocabulary, and agent names do not affect inference. Explicit acceptance can raise or add policy, while `{ level: "none", reason: "..." }` disables inferred gates according to the existing policy rules.
439
437
 
440
- Agent frontmatter or `subagents.agentOverrides` may set `acceptanceRole: "read-only" | "writer"` for ambiguous tasks. Explicit task mutation or no-edit intent wins over that role, while omitted metadata preserves the existing reviewer/scout/worker name heuristics. The role affects acceptance inference only and does not change tool access.
438
+ Agent frontmatter or `subagents.agentOverrides` may set `acceptanceRole`. The role affects acceptance inference only and does not change tool access. Review is a separate gate configured with `acceptance.review`.
441
439
 
442
440
  Edge cases:
443
441
 
package/docs/workflows.md CHANGED
@@ -10,7 +10,7 @@ Use orchestration as parent-agent guidance, not as a runtime workflow mode. For
10
10
  clarify → scout → worker → fresh reviewers → worker
11
11
  ```
12
12
 
13
- Packaged `worker`, `oracle`, and `advisor` default to forked context when a launch omits `context`. If the parent has no persisted session file or current leaf yet, that implicit default falls back to `fresh`. Pass `context: "fresh"` when you intentionally want a fresh child run, or `context: "fork"` when fork must remain strict.
13
+ Packaged `worker` defaults to fresh context so implementation starts from its assigned brief instead of the parent's unfinished conversation. Packaged `oracle` and `advisor` default to forked context; if the parent has no persisted session file or current leaf yet, that implicit default falls back to `fresh`. Explicit `context`, `context: "profile"`, and global `defaultSubagentContext` still override these profile defaults.
14
14
 
15
15
  Child-safety boundaries are enforced at runtime:
16
16
 
@@ -1,7 +1,7 @@
1
1
  import { createJiti } from "jiti";
2
2
 
3
3
  const jiti = createJiti(import.meta.url);
4
- const { runInspector } = await jiti.import("./src/inspectors/inspector-runner.ts");
4
+ const { runInspector } = await jiti.import("./src/inspectors/inspector-runner.js");
5
5
 
6
6
  try {
7
7
  runInspector();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "pi-subagents",
4
- "version": "0.70.0",
4
+ "version": "0.71.0",
5
5
  "description": "Pi extension for single-agent delegation and scripted multi-agent workflows",
6
6
  "author": "Nico Bailon",
7
7
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@earendil-works/pi-agent-core": "*",
28
- "@earendil-works/pi-ai": ">=0.80.0",
28
+ "@earendil-works/pi-ai": ">=0.86.1",
29
29
  "@earendil-works/pi-coding-agent": "*",
30
30
  "@earendil-works/pi-tui": "*"
31
31
  },
@@ -101,6 +101,7 @@ For an authorized complex delegated workflow, read `prompting-and-roles.md` and
101
101
  - Keep the parent on the ordinary strong default model. Route workers/scouts to a fast capable tier, serious reviews to a strong tier, and top reasoning to bounded read-only critique.
102
102
  - Exact model names are deployment policy. Put them in user/project settings or profiles, not package guidance.
103
103
  - Give every child a compact meta-prompt checklist: objective; repo/cwd/ref; authority/edit boundary; relevant files/contracts and constraints; success/acceptance criteria; validation; expected output/report; and stop/ask conditions. See `references/prompting-and-roles.md`.
104
+ - Before launching a writer for substantial mutation work, classify it as single-seam or multi-seam and partition multi-seam work across exclusive component owners, gates, and durable handoffs before an integration-only owner. See `references/multi-lane-orchestration.md`.
104
105
  - For mutation work, use an isolated lane/worktree when isolation, overlap, or concurrent juggling matters; keep one writer per cwd/worktree. See `references/multi-lane-orchestration.md` for lane mechanics.
105
106
  - Keep long/high-output validation out of chat: prefer `interactive_shell` dispatch/background monitors, bounded logs, or subagent-owned reports; return a concise summary plus report path unless same-turn output is required. Do not use `interactive_shell` as an implicit fallback for a failed `subagent` lane; see `references/execution-controls.md`.
106
107
  - Treat subagent workflow, child launch, prompt runtime, extension load, and child tooling setup failures as lane infrastructure blockers. Stop, report the exact failure and run/worktree state, verify a clean worktree or capture a partial diff, and use only a clear same-protocol retry or an owner-approved execution-mode fallback.
@@ -6,10 +6,13 @@ This file is a detailed reference loaded from `skills/pi-subagents/SKILL.md`.
6
6
 
7
7
  - **Explicit forking requires a persisted parent session.** If the current session
8
8
  does not have a persisted session file or current leaf, explicit `context: "fork"`
9
- fails. An agent-level `defaultContext: fork` is a preference: packaged `worker`,
10
- `oracle`, and `advisor` fall back to `fresh` when those fork preconditions are not
9
+ fails. An agent-level `defaultContext: fork` is a preference: packaged `oracle`
10
+ and `advisor` fall back to `fresh` when those fork preconditions are not
11
11
  met yet. Use `context: "fresh"` when you do not want a fork even after the parent
12
12
  session exists.
13
+ - **Packaged workers start fresh.** `worker` defaults to fresh context so its brief,
14
+ not the parent's unfinished agenda, controls the implementation. Pass explicit
15
+ `context: "fork"` when inherited conversation history is required.
13
16
  - **Forked runs inherit parent history.** They are branched threads, not fresh
14
17
  filtered contexts. Use fresh context for adversarial reviewers unless the user explicitly asks for forked context.
15
18
  - **Default subagent nesting depth is 2.** Deeper recursive delegation is blocked