@bastani/atomic 0.10.14 → 0.10.15-alpha.2

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 (342) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -1
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
  7. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
  8. package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
  9. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  10. package/dist/_shared/runtime-O4KCSG4C.js +2 -2
  11. package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
  12. package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
  13. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  14. package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
  15. package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
  16. package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
  17. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
  18. package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
  19. package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
  20. package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
  21. package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
  22. package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
  23. package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
  24. package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
  25. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  26. package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
  27. package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
  28. package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
  29. package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
  30. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  31. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  32. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  33. package/dist/builtin/intercom/package.json +1 -1
  34. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  35. package/dist/builtin/mcp/package.json +1 -1
  36. package/dist/builtin/subagents/package.json +1 -1
  37. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  38. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  39. package/dist/builtin/web-access/package.json +1 -1
  40. package/dist/cli/auth-cli.code.js +1 -1
  41. package/dist/cli/auth-cli.impl.js +3 -3
  42. package/dist/cli/auth-cli.js +3 -3
  43. package/dist/cli/blueprint-command.impl.js +3 -3
  44. package/dist/cli/blueprint-command.js +3 -3
  45. package/dist/cli/intercom-command.code.js +3 -3
  46. package/dist/cli/intercom-command.impl.js +3 -3
  47. package/dist/cli/intercom-command.js +3 -3
  48. package/dist/cli/list-models.impl.js +3 -3
  49. package/dist/cli/list-models.js +3 -3
  50. package/dist/cli/session-picker.code.js +1 -1
  51. package/dist/cli/session-picker.impl.js +3 -3
  52. package/dist/cli/session-picker.js +3 -3
  53. package/dist/cli/startup-ui.code.js +1 -1
  54. package/dist/cli/startup-ui.impl.js +3 -3
  55. package/dist/cli/startup-ui.js +3 -3
  56. package/dist/cli/storage-command.impl.js +3 -3
  57. package/dist/cli/storage-command.js +3 -3
  58. package/dist/cli/storage-search-session.code.js +1 -1
  59. package/dist/cli/storage-search-session.impl.js +3 -3
  60. package/dist/cli/storage-search-session.js +3 -3
  61. package/dist/cli/team-command.code.js +1 -1
  62. package/dist/cli/team-command.impl.js +3 -3
  63. package/dist/cli/team-command.js +3 -3
  64. package/dist/cli.js +2 -2
  65. package/dist/core/compaction/compactor.d.ts +0 -8
  66. package/dist/core/debug.impl.js +3 -3
  67. package/dist/core/debug.js +3 -3
  68. package/dist/core/export-html/card-projection.impl.js +3 -3
  69. package/dist/core/export-html/card-projection.js +3 -3
  70. package/dist/core/export-html/index.code.js +2 -2
  71. package/dist/core/export-html/index.impl.js +3 -3
  72. package/dist/core/export-html/index.js +3 -3
  73. package/dist/core/export-html/json-spans.impl.js +3 -3
  74. package/dist/core/export-html/json-spans.js +3 -3
  75. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  76. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  77. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  78. package/dist/core/export-html/tool-renderer.js +3 -3
  79. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  80. package/dist/core/extensions/jiti-loader.js +3 -3
  81. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  82. package/dist/core/extensions/jiti-static-loader.js +3 -3
  83. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  84. package/dist/core/extensions/loader-host-modules.js +3 -3
  85. package/dist/core/intercom-broker-control-host.code.js +1 -1
  86. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  87. package/dist/core/intercom-broker-control-host.js +3 -3
  88. package/dist/core/intercom-broker-control.code.js +2 -2
  89. package/dist/core/intercom-broker-control.impl.js +3 -3
  90. package/dist/core/intercom-broker-control.js +3 -3
  91. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  92. package/dist/core/package-manager-storage-adapters.js +3 -3
  93. package/dist/core/sdk.code.js +1 -1
  94. package/dist/core/sdk.impl.js +3 -3
  95. package/dist/core/sdk.js +3 -3
  96. package/dist/core/session-manager-core.js +3 -3
  97. package/dist/core/session-manager-list.impl.js +3 -3
  98. package/dist/core/session-manager-list.js +3 -3
  99. package/dist/core/session-manager.impl.js +3 -3
  100. package/dist/core/session-manager.js +3 -3
  101. package/dist/core/session-storage.impl.js +3 -3
  102. package/dist/core/session-storage.js +3 -3
  103. package/dist/core/storage/index.js +2 -2
  104. package/dist/core/storage/node-sqlite-thread.js +2 -2
  105. package/dist/core/storage/node-sqlite.js +2 -2
  106. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  107. package/dist/core/storage/offline-snapshot-file.js +3 -3
  108. package/dist/core/storage/provider.js +2 -2
  109. package/dist/core/storage/selection.js +2 -2
  110. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  111. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  112. package/dist/core/storage/session/branch-fork-source.js +3 -3
  113. package/dist/core/storage/session/card-view.impl.js +3 -3
  114. package/dist/core/storage/session/card-view.js +3 -3
  115. package/dist/core/storage/session/child-reader.code.js +2 -2
  116. package/dist/core/storage/session/child-reader.impl.js +3 -3
  117. package/dist/core/storage/session/child-reader.js +3 -3
  118. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  119. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  120. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  121. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  122. package/dist/core/storage/session/expanded-child-details.js +3 -3
  123. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  124. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  125. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  126. package/dist/core/storage/session/fork-row-index.js +3 -3
  127. package/dist/core/storage/session/fork-staging.code.js +1 -1
  128. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  129. package/dist/core/storage/session/fork-staging.js +3 -3
  130. package/dist/core/storage/session/fork-window.code.js +2 -2
  131. package/dist/core/storage/session/fork-window.impl.js +3 -3
  132. package/dist/core/storage/session/fork-window.js +3 -3
  133. package/dist/core/storage/session/history-pages.impl.js +3 -3
  134. package/dist/core/storage/session/history-pages.js +3 -3
  135. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  136. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  137. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  138. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  139. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  140. package/dist/core/storage/session/memory-session-store.js +3 -3
  141. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  142. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  143. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  144. package/dist/core/storage/session/released-history-files.code.js +1 -1
  145. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  146. package/dist/core/storage/session/released-history-files.js +3 -3
  147. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  148. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  149. package/dist/core/storage/session/session-resume.impl.js +3 -3
  150. package/dist/core/storage/session/session-resume.js +3 -3
  151. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  152. package/dist/core/storage/session/snapshot-cut.js +3 -3
  153. package/dist/core/storage/session/snapshot-history.code.js +2 -2
  154. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  155. package/dist/core/storage/session/snapshot-history.js +3 -3
  156. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  157. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  158. package/dist/core/storage/session/sql-session-store.js +3 -3
  159. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  160. package/dist/core/storage/session/tree-outline.js +3 -3
  161. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  162. package/dist/core/storage/session/tree-presentation.js +3 -3
  163. package/dist/core/storage/storage-status.impl.js +3 -3
  164. package/dist/core/storage/storage-status.js +3 -3
  165. package/dist/core/storage/team.impl.js +3 -3
  166. package/dist/core/storage/team.js +3 -3
  167. package/dist/core/structured-output/index.code.js +1 -1
  168. package/dist/core/structured-output/index.impl.js +3 -3
  169. package/dist/core/structured-output/index.js +3 -3
  170. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  171. package/dist/core/tasks/task-completion-entry.js +3 -3
  172. package/dist/core/tasks/task-file-history.code.js +2 -2
  173. package/dist/core/tasks/task-file-history.impl.js +3 -3
  174. package/dist/core/tasks/task-file-history.js +3 -3
  175. package/dist/core/tasks/task-reference-archive.code.js +2 -2
  176. package/dist/core/tasks/task-reference-archive.js +3 -3
  177. package/dist/core/tasks/task-reference-identity.js +3 -3
  178. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  179. package/dist/core/tasks/task-reference-stream.js +3 -3
  180. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  181. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  182. package/dist/core/tasks/task-view-source.impl.js +3 -3
  183. package/dist/core/tasks/task-view-source.js +3 -3
  184. package/dist/core/tools/read-url.impl.js +3 -3
  185. package/dist/core/tools/read-url.js +3 -3
  186. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  187. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  188. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  189. package/dist/core/worktree-snapshot/errors.js +3 -3
  190. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  191. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  192. package/dist/extensions/codemode/execute.impl.js +3 -3
  193. package/dist/extensions/codemode/execute.js +3 -3
  194. package/dist/extensions/codemode/renderer.impl.js +3 -3
  195. package/dist/extensions/codemode/renderer.js +3 -3
  196. package/dist/extensions/mcp/cli.code.js +1 -1
  197. package/dist/extensions/mcp/cli.impl.js +3 -3
  198. package/dist/extensions/mcp/cli.js +3 -3
  199. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  200. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  201. package/dist/extensions/mcp/cli.lazy.js +3 -3
  202. package/dist/extensions/mcp/runtime.code.js +1 -1
  203. package/dist/extensions/mcp/runtime.impl.js +3 -3
  204. package/dist/extensions/mcp/runtime.js +3 -3
  205. package/dist/index.d.ts +21 -1
  206. package/dist/index.js +2 -2
  207. package/dist/main-first-time-setup.code.js +1 -1
  208. package/dist/main-first-time-setup.impl.js +3 -3
  209. package/dist/main-first-time-setup.js +3 -3
  210. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  211. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  212. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  213. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  214. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  215. package/dist/modes/print-mode.js +1 -1
  216. package/dist/package-manager-cli.code.js +2 -2
  217. package/dist/package-manager-cli.impl.js +3 -3
  218. package/dist/package-manager-cli.js +3 -3
  219. package/dist/startup-files.json +1 -1
  220. package/dist/startup-stages/6.js +1 -1
  221. package/dist/utils/startup-database-spare.code.js +1 -1
  222. package/dist/utils/startup-database-spare.impl.js +3 -3
  223. package/dist/utils/startup-database-spare.js +3 -3
  224. package/dist/utils/tools-manager.impl.js +3 -3
  225. package/dist/utils/tools-manager.js +3 -3
  226. package/docs/background-tasks/reference.md +182 -0
  227. package/docs/background-tasks.md +98 -405
  228. package/docs/build.md +67 -27
  229. package/docs/changelog.mdx +11 -1
  230. package/docs/codemode.md +108 -39
  231. package/docs/compaction/branch-summaries.md +54 -0
  232. package/docs/compaction/custom-compactors.md +161 -0
  233. package/docs/compaction/memory-compaction.md +77 -0
  234. package/docs/compaction/reference.md +86 -38
  235. package/docs/compaction.md +51 -252
  236. package/docs/computer-use.md +169 -321
  237. package/docs/containerization.md +71 -57
  238. package/docs/custom-provider/api-reference.md +119 -25
  239. package/docs/custom-provider/oauth.md +114 -132
  240. package/docs/custom-provider/override.md +37 -27
  241. package/docs/custom-provider/registration.md +107 -83
  242. package/docs/custom-provider/streaming.md +85 -71
  243. package/docs/custom-provider.md +85 -52
  244. package/docs/development.md +39 -29
  245. package/docs/docs.json +80 -67
  246. package/docs/environment-variables.md +94 -44
  247. package/docs/extensions/api-reference.md +86 -43
  248. package/docs/extensions/authoring.md +162 -154
  249. package/docs/extensions/events.md +80 -25
  250. package/docs/extensions/examples.md +90 -85
  251. package/docs/extensions/ui.md +206 -82
  252. package/docs/extensions.md +79 -108
  253. package/docs/getting-started/authentication.md +67 -36
  254. package/docs/getting-started/first-session.md +53 -43
  255. package/docs/getting-started/installation.md +117 -90
  256. package/docs/getting-started/project-instructions.md +48 -34
  257. package/docs/guides/configuration.md +82 -20
  258. package/docs/guides/non-interactive.md +66 -24
  259. package/docs/guides/resume-on-any-machine.md +135 -82
  260. package/docs/guides/team-setup.md +114 -105
  261. package/docs/guides.md +76 -32
  262. package/docs/herdr.md +16 -17
  263. package/docs/how-atomic-works.md +140 -0
  264. package/docs/index.md +58 -44
  265. package/docs/intercom/operations.md +141 -151
  266. package/docs/intercom/reference.md +85 -108
  267. package/docs/intercom.md +84 -145
  268. package/docs/json.md +120 -67
  269. package/docs/keybindings.md +85 -49
  270. package/docs/libraries/agent-core.md +137 -275
  271. package/docs/libraries/ai.md +100 -84
  272. package/docs/libraries/codemode.md +210 -300
  273. package/docs/libraries/schema.md +59 -53
  274. package/docs/libraries/storage-postgres.md +49 -35
  275. package/docs/libraries/telemetry.md +153 -354
  276. package/docs/libraries/tui.md +265 -393
  277. package/docs/libraries.md +42 -26
  278. package/docs/llama-cpp.md +171 -161
  279. package/docs/mcp-servers.md +90 -51
  280. package/docs/models/choose-a-model.md +188 -0
  281. package/docs/models/reference.md +74 -30
  282. package/docs/models.md +153 -88
  283. package/docs/orchestration/migrating-workflows.md +23 -16
  284. package/docs/orchestration/patterns.md +39 -44
  285. package/docs/orchestration.md +65 -26
  286. package/docs/packages/authoring.md +51 -29
  287. package/docs/packages/reference.md +42 -21
  288. package/docs/packages.md +69 -58
  289. package/docs/programmatic.md +118 -24
  290. package/docs/prompt-templates.md +84 -83
  291. package/docs/providers/reference.md +43 -48
  292. package/docs/providers.md +219 -451
  293. package/docs/quickstart.md +140 -120
  294. package/docs/reference/cli.md +135 -97
  295. package/docs/reference.md +20 -19
  296. package/docs/rpc/examples.md +76 -20
  297. package/docs/rpc/extension-ui.md +64 -38
  298. package/docs/rpc/protocol.md +361 -110
  299. package/docs/rpc.md +57 -17
  300. package/docs/sdk/reference.md +409 -534
  301. package/docs/sdk/storage.md +53 -13
  302. package/docs/sdk/structured-decisions.md +82 -56
  303. package/docs/sdk/web-server.md +57 -43
  304. package/docs/sdk.md +106 -84
  305. package/docs/security.md +42 -64
  306. package/docs/session-format.md +62 -38
  307. package/docs/sessions.md +99 -214
  308. package/docs/settings.md +165 -195
  309. package/docs/shell-aliases.md +9 -6
  310. package/docs/skills/authoring.md +69 -48
  311. package/docs/skills/reference.md +51 -20
  312. package/docs/skills.md +99 -148
  313. package/docs/slash-commands.md +129 -0
  314. package/docs/storage/custom-adapters.md +160 -85
  315. package/docs/storage/jsonl.md +81 -66
  316. package/docs/storage/postgres/pgbouncer.md +120 -126
  317. package/docs/storage/postgres/tuning.md +120 -143
  318. package/docs/storage/postgres.md +314 -330
  319. package/docs/storage/sqlite.md +71 -42
  320. package/docs/storage.md +298 -302
  321. package/docs/subagents/authoring.md +55 -38
  322. package/docs/subagents/reference.md +73 -33
  323. package/docs/subagents.md +119 -187
  324. package/docs/terminal-setup.md +51 -39
  325. package/docs/themes/reference.md +23 -19
  326. package/docs/themes.md +142 -127
  327. package/docs/tmux.md +47 -55
  328. package/docs/tools.md +147 -109
  329. package/docs/tui/reference.md +166 -214
  330. package/docs/tui.md +196 -341
  331. package/docs/usage.md +118 -138
  332. package/docs/verification.md +79 -51
  333. package/docs/web-access.md +121 -101
  334. package/docs/windows.md +26 -27
  335. package/docs/worktree-snapshots/reference.md +245 -0
  336. package/docs/worktree-snapshots.md +71 -259
  337. package/package.json +8 -8
  338. package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
  339. package/docs/guides/intercom.md +0 -32
  340. package/docs/guides/orchestration.md +0 -28
  341. package/docs/guides/subagents.md +0 -37
  342. package/docs/termux.md +0 -118
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "Create custom subagents"
3
- sidebarTitle: "Custom subagents"
4
- description: "Define custom Markdown subagents, configure YAML frontmatter fields, and override or disable built-in agents."
3
+ sidebarTitle: "Create custom subagents"
4
+ description: "Define custom Markdown subagents, configure YAML frontmatter fields, manage agents with the subagent tool, and override or disable built-ins."
5
5
  ---
6
6
 
7
7
  Define a custom subagent as a Markdown file with YAML frontmatter and a self-contained system prompt body. Run `/reload` after adding or editing files on disk so Atomic picks up your changes.
8
8
 
9
- Looking for another subagents page? Start with [Subagents overview](/guides/subagents) for concepts, [Run subagents](/subagents) for launching, worktrees, and run control, [Subagent reference](/subagents/reference) for precedence and `config.json`, or [Subagent children in the SDK](/sdk#subagent-children) for programmatic setup.
9
+ For day-to-day usage, worktrees, and run control, see [Run subagents](/subagents). For discovery precedence, model resolution, and `config.json`, see [Subagent reference](/subagents/reference).
10
10
 
11
11
  ## Where agent files live {#custom-agents}
12
12
 
@@ -25,22 +25,27 @@ Atomic discovers `.md` files recursively (`**/*.md`, following symlinks and sort
25
25
  | --- | --- | --- | --- | --- |
26
26
  | `name` | Yes | Plain string | None | Agent identifier. Files missing `name` (or setting it to a YAML list) are skipped. Sanitized to `[a-z0-9-]` when created via the `subagent` tool. Package agents cannot contain `.`. |
27
27
  | `description` | Yes | Plain string | None | Short summary shown in `/agents` and `subagent({ action: "list" })`. Files missing `description` (or setting it to a YAML list) are skipped. |
28
- | `package` | No | Namespace string (`a-z`, `0-9`, `-`, `.`) | None | Optional namespace for user or project agents. The runtime name becomes `<package>.<name>` (used to override an installed package agent). Ignored inside installed packages where the manifest sets the namespace. |
29
- | `model` | No | `"auto"`, `provider/id`, `provider/id:effort`, or bare `id` | Inherit | Selects the agent's primary model. `"auto"` uses your default model (`/model`) or the launching session's model. Omitting both `model` and `fallbackModels` inherits the launching session's model and thinking level. Effort suffixes are case-insensitive. |
28
+ | `package` | No | Namespace string (`a-z`, `0-9`, `-`, `.`) | None | Optional namespace for user or project agents. Runtime name becomes `<package>.<name>` (used to override an installed package agent). Invalid values silently skip the file with no diagnostic. Ignored inside installed packages where the manifest sets the namespace. |
29
+ | `model` | No | `"auto"`, `provider/id`, `provider/id:effort`, or bare `id` | Inherit | Selects the primary model. `"auto"` uses your default model (`/model`) or the launching session's model. Omitting both `model` and `fallbackModels` inherits the launching session's model and thinking level. Effort suffixes are case-insensitive. |
30
30
  | `fallbackModels` | No | Comma-separated string or YAML list | None | Ordered fallback models tried on retryable provider errors, with optional `:effort` suffixes (for example `[openai/gpt-5:medium, anthropic/claude-haiku-4-5:off]`). |
31
31
  | `tools` | No | Comma-separated string or YAML list | Inherit | Restricts the subagent to named tools. Supports built-in tools plus `mcp:<server>` and `mcp:<server>/<tool>`. Omitting `tools` inherits tools from the launching session. |
32
32
  | `defaultContext` | No | `"fresh"` or `"fork"` | `"fresh"` | Whether the subagent starts clean or forks the main conversation when `context` is omitted at launch. |
33
- | `systemPromptMode` | No | `"replace"` or `"append"` | `"replace"` (`"append"` for `delegate`) | Whether the Markdown body replaces or appends to the base system prompt. |
34
- | `inheritProjectContext` | No | Boolean | `false` (`true` for `delegate`) | Include `AGENTS.md` project context files in a `fresh` subagent. Has no effect on `fork`. |
33
+ | `systemPromptMode` | No | `"replace"` or `"append"` | `"replace"` | Whether the Markdown body replaces or appends to the base system prompt. |
34
+ | `inheritProjectContext` | No | Boolean | `false` | Include `AGENTS.md` project context files in a `fresh` subagent. Has no effect on `fork`. |
35
35
  | `inheritSkills` | No | Boolean | `false` | Include active skills from the launching session in a `fresh` subagent. Has no effect on `fork`. |
36
- | `skills` (or `skill`) | No | Comma-separated string or YAML list | None | Named skills injected into the subagent. If both `skill` and `skills` appear, `skill` takes precedence. |
37
- | `extensions` | No | Comma-separated string or YAML list | Inherit | Restricts loaded extensions by name. Set `extensions: ""` or `extensions: []` to disable extensions; omit to inherit. |
36
+ | `skills` (or `skill`) | No | Comma-separated string or YAML list | None | Named skills injected into the subagent. If both `skill` and `skills` appear, `skill` takes precedence. The bundled `subagent` skill (`subagent` / `subagent@qualifier`) is blocked from subagent skill injection and reported as missing. |
37
+ | `extensions` | No | Comma-separated string or YAML list | Inherit | Restricts loaded extensions by name. Setting `extensions:` (empty / YAML `null`), `extensions: ""`, or `extensions: []` disables all extensions; omit the key to inherit parent extensions. |
38
38
  | `output` | No | File path string | None | Default output file path for results, resolved relative to the subagent's `cwd`. |
39
- | `defaultReads` | No | Comma-separated string or YAML list | None | Files automatically prepended into context before the task runs, resolved relative to the subagent's `cwd`. |
40
- | `defaultProgress` | No | Boolean | `false` | Enables run-scoped `progress.md` tracking in isolated artifact storage (suppressed for read-only tasks unless `progress: true` is passed at launch). |
41
- | `interactive` | No | Boolean | `false` | Accepted in frontmatter and preserved when updating an agent through the `subagent` tool. |
42
- | `thinking` | No | Thinking level string | None | Deprecated. Use `:effort` on `model` instead; applies only when `model` has no suffix. |
43
- | `fallbackThinkingLevels` | No | Comma-separated string or YAML list | None | Deprecated. Index-aligned thinking levels for `fallbackModels`; prefer `:effort` suffixes directly on `fallbackModels`. |
39
+ | `defaultReads` | No | Comma-separated string or YAML list | None | Prepends a `[Read from: <abs-path>, ...]` directive (resolved relative to child `cwd`) to the task prompt so the subagent reads those files with its own tools — does **not** inline file contents. Applied in parallel `tasks[]` runs (unless overridden by `reads: false` or an array); **ignored in single-agent mode** (pass `reads` on the call instead). |
40
+ | `defaultProgress` | No | Boolean | `false` | Enables isolated run-scoped `progress.md` tracking under artifact storage. Suppressed automatically when the prompt text includes read-only phrasing (`review-only`, `no edits`, `do not edit`, `leave files unchanged`) unless `progress: true` is passed at launch. |
41
+
42
+ ### Deprecated and compatibility fields
43
+
44
+ | Field | Status | Behavior |
45
+ | --- | --- | --- |
46
+ | `thinking` | Deprecated | Thinking level string. Prefer `:effort` suffixes directly on `model`; applies only when `model` has no suffix. |
47
+ | `fallbackThinkingLevels` | Deprecated | Index-aligned thinking levels for `fallbackModels`; prefer `:effort` suffixes directly on each `fallbackModels` entry. |
48
+ | `interactive` | Compatibility no-op | Accepted in frontmatter and preserved across tool-based updates, but not enforced. |
44
49
 
45
50
  <Warning>
46
51
  When you omit `context` on a parallel `tasks` launch, if **any** requested agent declares `defaultContext: fork`, the **entire batch** runs in forked context. Keep `defaultContext: fresh` on review and research agents unless you want forked history.
@@ -52,7 +57,7 @@ Frontmatter is parsed by a strict YAML parser, not a loose line reader:
52
57
 
53
58
  - **Quote colons followed by a space.** Write `description: "Deploy: verify staging first"` instead of `description: Deploy: verify staging first`. Invalid YAML (unquoted `: `, duplicate keys, unclosed brackets, or tab-indented lists) skips the entire agent file and records a load diagnostic.
54
59
  - **Lists or comma-separated strings.** `tools`, `fallbackModels`, `fallbackThinkingLevels`, `skills`/`skill`, `defaultReads`, and `extensions` accept comma-separated strings (`read, search, bash`), YAML flow lists (`[read, search, bash]`), and YAML block lists.
55
- - **Extra keys.** Nested YAML objects are ignored. Unknown scalar or string-array fields are preserved across tool-based updates (legacy `completionGuard` is stripped automatically).
60
+ - **Extra and legacy keys.** Nested YAML objects are ignored. Unknown scalar or string-array fields are preserved across tool-based updates, while removed legacy fields (`completionGuard`, `maxSubagentDepth`, `modelConstraints`, and `taskNeeds`) are stripped automatically on update.
56
61
 
57
62
  ## Example custom agent
58
63
 
@@ -96,13 +101,13 @@ Return only issues worth fixing now. Stop when the relevant diff and affected ca
96
101
 
97
102
  ## Managing agents with the `subagent` tool
98
103
 
99
- You can inspect and manage user and project agents without editing Markdown files manually:
104
+ You can inspect and manage user and project agents without editing Markdown files manually (`config` accepts either an object or a valid JSON string):
100
105
 
101
106
  ```ts
102
- // List active agents (deduplicated across user/project/builtin/package scopes)
107
+ // List agents across scopes (hides overridden package agents; see scoping rules below)
103
108
  subagent({ action: "list" })
104
109
 
105
- // Inspect one agent definition
110
+ // Inspect one agent definition (returns all matching definitions across scopes)
106
111
  subagent({ action: "get", agent: "strict-inspector" })
107
112
 
108
113
  // Create a project-scoped agent
@@ -118,12 +123,16 @@ subagent({
118
123
  },
119
124
  })
120
125
 
121
- // Update an existing agent (pass false or "" to clear an optional field)
126
+ // Update an existing agent
122
127
  subagent({
123
128
  action: "update",
124
129
  agent: "strict-inspector",
125
130
  agentScope: "project",
126
- config: { model: "anthropic/claude-sonnet-4-6:high", output: false },
131
+ config: {
132
+ model: "anthropic/claude-sonnet-4-6:high",
133
+ output: false, // Clears output
134
+ extensions: false, // Clears extensions so the agent inherits parent extensions
135
+ },
127
136
  })
128
137
 
129
138
  // Delete a user or project agent
@@ -132,14 +141,16 @@ subagent({ action: "delete", agent: "strict-inspector", agentScope: "project" })
132
141
 
133
142
  Key management rules:
134
143
 
135
- - **`scope` default.** `create` defaults `scope` to `"user"`. Pass `scope: "project"` to write into `.atomic/agents/`.
136
- - **Disambiguation.** If an agent exists in both user and project scopes, pass `agentScope: "user"` or `"project"` to `update` or `delete`. User-scope directories deduplicate in the same precedence order as execution (`~/.atomic/agent/agents` > `~/.agents` > `~/.pi/agent/agents`).
137
- - **Overriding a package agent.** Pass `package` separately in `config` (for example `{ name: "reviewer", package: "acme.review-kit", ... }`). Putting dots inside `config.name` strips them during name sanitization.
144
+ - **`action: "list"` vs. `/agents`.** `action: "list"` deduplicates within user directories and within project directories and omits overridden **package** agents, but still shows separate entries when a project agent shadows a user or built-in agent. Interactive `/agents` deduplicates across all four scopes and hides every shadowed definition.
145
+ - **`create` target directory.** `scope` defaults to `"user"`. When `scope: "user"` is used and `ATOMIC_CODING_AGENT_DIR` is unset, `create` writes into `~/.agents/` whenever `~/.agents` already exists (falling back to `~/.atomic/agent/agents/` only when `~/.agents` does not exist), even though `~/.atomic/agent/agents/` has higher discovery precedence. Pass `scope: "project"` to write into `.atomic/agents/`.
146
+ - **Clearing fields vs. disabling `extensions`.** On `update`, passing `false` or `""` clears most optional fields (`model`, `fallbackModels`, `tools`, `skills`, `thinking`, `defaultContext`, `output`, `reads`, `systemPrompt`). **`extensions` is different:** `extensions: false` clears the field to inherit parent extensions, whereas `extensions: ""` sets `extensions: []` (disabling **all** extensions).
147
+ - **Comma-separated strings vs. arrays.** In `config`, `tools`, `skills`, `reads` (mapped to `defaultReads`), and `extensions` only accept comma-separated strings (or `false`/`""`) and reject string arrays. Only `fallbackModels` accepts both comma-separated strings and string arrays. `progress` maps to `defaultProgress`.
148
+ - **Disambiguation and package overrides.** If an agent exists in both user and project scopes, pass `agentScope: "user"` or `"project"` to `update` or `delete`. To override an installed package agent via `create`, pass `package` separately in `config` (for example `{ name: "reviewer", package: "acme.review-kit", ... }`); dots inside `config.name` are stripped during sanitization.
138
149
  - **Built-in and package agents.** `update` and `delete` refuse built-in and package agents. Override built-ins via `settings.json` or by creating a user or project Markdown file with the same name.
139
150
 
140
151
  ## Overriding or disabling built-in agents
141
152
 
142
- Override or disable bundled agents in user (`~/.atomic/agent/settings.json`) or trusted project (`.atomic/settings.json`) settings without copying their Markdown files. Project settings override user settings.
153
+ Override or disable bundled agents in user (`~/.atomic/agent/settings.json`) or trusted project (`.atomic/settings.json`) settings without copying their Markdown files.
143
154
 
144
155
  ```json
145
156
  {
@@ -159,20 +170,26 @@ Override or disable bundled agents in user (`~/.atomic/agent/settings.json`) or
159
170
  }
160
171
  ```
161
172
 
162
- - **`subagents.disableBuiltins`.** Set to `true` to disable all bundled agents. A trusted project setting `disableBuiltins: false` or per-agent overrides still apply on top.
163
- - **`subagents.agentOverrides.<name>`.** Supports 12 fields:
164
- - `model` (string)
165
- - `fallbackModels` (string array, or `false` to clear)
166
- - `fallbackThinkingLevels` (deprecated string array, or `false` to clear)
167
- - `thinking` (deprecated string, or `""`/`false` to clear an inherited thinking level)
168
- - `systemPromptMode` (`"replace"` or `"append"`)
169
- - `inheritProjectContext` (boolean)
170
- - `inheritSkills` (boolean)
171
- - `defaultContext` (`"fresh"`, `"fork"`, or `false` to clear)
172
- - `disabled` (boolean)
173
- - `systemPrompt` (string)
174
- - `skills` (string array, or `false` to clear)
175
- - `tools` (string array supporting `mcp:<server>` and `mcp:<server>/<tool>`, or `false` to clear)
173
+ Precedence and validation rules:
174
+
175
+ - **Project overrides replace user overrides.** Defining `subagents.agentOverrides.<name>` in trusted project `.atomic/settings.json` replaces the **entire** user override object for that agent rather than merging individual fields.
176
+ - **`disableBuiltins` precedence.** Setting `disableBuiltins: true` in user settings disables bundled agents *except* any agent that also has a user-level `agentOverrides.<name>` entry (any user override re-enables that agent unless it sets `disabled: true`). Setting `disableBuiltins: true` in trusted project settings disables all bundled agents and suppresses all user-level `agentOverrides`, unless overridden again in project `agentOverrides`.
177
+ - **Strict validation.** Unlike `config.json` (which drops invalid fields), invalid field types in `subagents.disableBuiltins` or `subagents.agentOverrides` throw an error when loading settings.
178
+
179
+ `subagents.agentOverrides.<name>` supports 12 fields:
180
+
181
+ - `model` (`string`, or `false` to clear a built-in's `model: "auto"` so it inherits the launching session's model and thinking level)
182
+ - `fallbackModels` (`string[]`, or `false` to clear)
183
+ - `fallbackThinkingLevels` (deprecated `string[]`, or `false` to clear)
184
+ - `thinking` (deprecated `string`, `false` to clear and inherit the launching session's thinking level, or `""` to stop inheriting the launching session's thinking level so the model or settings default applies)
185
+ - `systemPromptMode` (`"replace"` or `"append"`)
186
+ - `inheritProjectContext` (`boolean`)
187
+ - `inheritSkills` (`boolean`)
188
+ - `defaultContext` (`"fresh"`, `"fork"`, or `false` to clear)
189
+ - `disabled` (`boolean`)
190
+ - `systemPrompt` (`string`)
191
+ - `skills` (`string[]`, or `false` to clear)
192
+ - `tools` (`string[]` supporting `mcp:<server>` and `mcp:<server>/<tool>`, or `false` to clear)
176
193
 
177
194
  ## Writing effective agent prompts
178
195
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  title: "Subagent reference"
3
3
  sidebarTitle: "Subagents"
4
- description: "Discovery precedence, model selection, fallback rules, reasoning levels, configuration keys, and SDK integration."
4
+ description: "Agent discovery precedence, model and fallback resolution, config.json keys, worktree hook contract, tool parameters, and integration events."
5
5
  ---
6
6
 
7
- This page is the exact reference for subagent discovery, model resolution, `config.json`, tool parameters, and SDK contracts. For concepts, see [Subagents overview](/guides/subagents). For day-to-day usage, worktrees, and run control, see [Run subagents](/subagents). For writing custom agent files, see [Create custom subagents](/subagents/authoring). For programmatic child configuration, see [Subagent children in the SDK](/sdk#subagent-children).
7
+ This page is the exact reference for subagent discovery, model resolution, `config.json`, tool parameters, and integration contracts. For day-to-day usage, worktrees, and run control, see [Run subagents](/subagents). For writing custom agent files, see [Create custom subagents](/subagents/authoring). For programmatic child configuration, see [Subagent children in the SDK](/sdk#subagent-children).
8
8
 
9
9
  ## Agent discovery
10
10
 
@@ -18,10 +18,10 @@ Atomic loads agent definitions recursively (`**/*.md`, sorted lexicographically,
18
18
  Precedence and override rules:
19
19
 
20
20
  - **Package collisions.** If multiple packages declare the same full name, the first wins in order: `-e` packages, then project-installed packages, then globally installed packages. Skipped package agents (collisions, dotted `name`, or unusable package name) appear under **Package agents not offered** in `subagent({ action: "list" })`.
21
- - **Overriding a package agent.** Define a user or project agent with the matching full name (for example `name: reviewer` with `package: acme.review-kit`). When using `subagent({ action: "create" })`, pass `{ name: "reviewer", package: "acme.review-kit", ... }` in `config`; passing `"acme.review-kit.reviewer"` in `config.name` strips the dots during name sanitization.
21
+ - **Overriding a package agent.** Define a user or project agent with the matching full name (for example `name: reviewer` with `package: acme.review-kit`). When using `subagent({ action: "create" })`, pass `{ name: "reviewer", package: "acme.review-kit", ... }` in `config`; passing `"acme.review-kit.reviewer"` in `config.name` strips the dots during sanitization.
22
22
  - **Untrusted projects.** Project agents and project-installed package agents are skipped. Packages passed via `-e` still load.
23
23
  - **Scopes and reload.** `agentScope` defaults to `"both"` (project overrides user, and both override builtin and package). `agentScope: "user"` loads builtins, user agents, and global/`-e` packages. `agentScope: "project"` loads builtins, project agents, and project/`-e` packages. Run `/reload` to pick up disk changes; running subagents keep the definition they started with.
24
- - **Inspecting and editing.** `list`, `update`, and `delete` deduplicate user agents in the exact same precedence order as execution (`~/.atomic/agent/agents` > `~/.agents` > `~/.pi/agent/agents`). `list` labels package agents with their source (`acme.review-kit.reviewer (package npm:@acme/review-kit)`) and omits overridden entries. `get` returns scope details and both definitions when overridden. `/agents` lists them under **Package agents**. `update` and `delete` apply only to user and project agents and refuse built-in and package agents.
24
+ - **Inspecting and editing.** `list`, `update`, and `delete` deduplicate within user directories (`~/.atomic/agent/agents` > `~/.agents` > `~/.pi/agent/agents`) and within project directories, and `list` hides overridden package agents (labeling remaining package agents with their source). Unlike `/agents` — which hides every shadowed definition — `subagent({ action: "list" })` still shows separate rows when a project agent shadows a user or built-in agent. `get` returns scope details and every matching definition across scopes. `update` and `delete` apply only to user and project agents and refuse built-in and package agents.
25
25
 
26
26
  ## Automatic model selection
27
27
 
@@ -37,18 +37,18 @@ subagent({
37
37
 
38
38
  - **Resolution.** `auto` resolves to `defaultProvider` and `defaultModel` from [settings](/settings#models-and-thinking) (the model last picked with `/model`) when credentials exist and the model is allowed by the active model scope. It runs at the agent's `thinking` level (ignoring invalid strings), then `modelThinkingLevels`, then `defaultThinkingLevel`, then `medium`. If no default model is configured or available, it uses the launching session's model (skipped if outside active `enabledModels` scope) and thinking level unless the agent sets `thinking`. Unsupported levels clamp automatically.
39
39
  - **Deterministic selection.** No router model runs and task wording does not change selection. An explicit per-call `model` overrides `auto`.
40
- - **Normal inheritance when `model` is omitted.** If a custom agent omits both `model` and `fallbackModels` and no per-call `model` is passed, it inherits both the launching session's current model and current thinking level. If it declares `fallbackModels` without `model`, it starts from its own first fallback candidate and thinking configuration.
40
+ - **Normal inheritance when `model` is omitted.** If a custom agent omits both `model` and `fallbackModels` (or a built-in override sets `model: false`) and no per-call `model` is passed, it inherits both the launching session's current model and current thinking level. If it declares `fallbackModels` without `model`, it starts from its own first fallback candidate and thinking configuration.
41
41
  - **Fallbacks.** An `auto` subagent falls back through the agent's `fallbackModels`, then the launching session's model ([Fallback models](#fallback-models)).
42
42
  - **Legacy fields.** Deprecated `taskNeeds` and `modelConstraints` are ignored and automatically cleaned from saved builtin overrides in global and trusted project settings on startup with a one-time notice.
43
43
 
44
- Override a built-in agent's model, effort, tools, or default context persistently in `settings.json`, or set `subagents.disableBuiltins: true` to disable all bundled agents. Set `thinking` to `""` or `false` to clear an inherited effort (see [Overriding or disabling built-in agents](/subagents/authoring#overriding-or-disabling-built-in-agents) for all 12 override fields):
44
+ Override a built-in agent's model, effort, tools, or default context persistently in `settings.json`, or set `subagents.disableBuiltins: true` to disable all bundled agents. Set `model: false` to clear a built-in's `model: "auto"` so it inherits the session model; set `thinking: false` to clear and inherit the session's thinking level, or `thinking: ""` to prevent inheriting the session's thinking level so the model or settings default applies (see [Overriding or disabling built-in agents](/subagents/authoring#overriding-or-disabling-built-in-agents)):
45
45
 
46
46
  ```json
47
47
  {
48
48
  "subagents": {
49
49
  "agentOverrides": {
50
50
  "worker": {
51
- "thinking": "high"
51
+ "model": "anthropic/claude-sonnet-4-6:high"
52
52
  }
53
53
  }
54
54
  }
@@ -77,11 +77,13 @@ What triggers fallback:
77
77
  - **Request-incompatible candidates.** HTTP 400, 413, and 422 payload or parameter errors, unsupported tools, and context-window overflows. Context-window overflow advances to the user-selected model only when not pinned.
78
78
  - **Content-filter refusals.** Advances without retrying the refusing model (OpenAI HTTP 422 `cyber_policy`, Anthropic refusal stop, or `content_filter` finish reason). Set `retry.fallbackOnContentFilter: false` in settings to stay on the refusing model.
79
79
  - **Credential skipping.** Before launching a concrete-model subagent, Atomic skips known providers without credentials and still tries unknown or custom providers. If all candidates are skipped, launch fails and names each missing provider. During execution, HTTP 401 or an invalid key disables that provider for the rest of the chain, while model-scoped HTTP 403 blocks only that model.
80
- - **Session model scope (`enabledModels` / `--models` / `/scoped-models`).** Subagents enforce the launching session's model scope using the exact same matching engine as the main session (`minimatch` `*`/`?`/`[...]` globs, literal bracketed IDs, fuzzy substring matching, case-insensitive `:thinking` suffixes, and Azure compatibility). `subagent({ action: "models" })`, `model: "auto"`, filtering candidates before launch, and mid-run fallbacks all honor that allowlist. Bare model IDs prefer matches inside the active scope before falling back to the full catalog for error reporting. Candidates outside the scope are skipped with a reason naming `enabledModels`, and explicit launches targeting a disallowed model fail instead of running. If `enabledModels` is set to patterns matching zero available models, **all** subagent launches are rejected; only an unset or empty `enabledModels` allows all models.
80
+ - **Session model scope (`enabledModels` / `--models` / `/scoped-models`).** Subagents enforce the launching session's model scope using the exact same matching engine as the main session (`minimatch` `*`/`?`/`[...]` globs, literal bracketed IDs, fuzzy substring matching, case-insensitive `:thinking` suffixes, and Azure compatibility). `subagent({ action: "models" })`, `model: "auto"`, pre-launch filtering, and mid-run fallbacks all honor that allowlist. Bare model IDs prefer matches inside the active scope before falling back to the full catalog for error reporting. Candidates outside the scope are skipped with a reason naming `enabledModels`, and explicit launches targeting a disallowed model fail instead of running. If `enabledModels` matches zero available models, **all** subagent launches are rejected; only an unset or empty `enabledModels` allows all models.
81
81
 
82
82
  Refused tool calls, ordinary tool or task errors, validation errors, and cancellations never trigger fallback. There is no per-attempt idle watchdog or wall-clock kill cap.
83
83
 
84
- > **Data handling.** Fallback sends the same prompt and context to another provider. Choose fallback models that satisfy your cost and privacy requirements.
84
+ <Warning>
85
+ **Data handling.** Fallback sends the same prompt and context to another provider. Choose fallback models that satisfy your cost and privacy requirements.
86
+ </Warning>
85
87
 
86
88
  ## Reasoning levels
87
89
 
@@ -98,6 +100,7 @@ fallbackModels: openai/gpt-5:medium, anthropic/claude-haiku-4-5:off
98
100
  ```
99
101
 
100
102
  - When a model supports the requested effort, it runs at that exact effort. Unsupported levels (such as `xhigh` or `max` on a model supporting only up to `high`) clamp to the model's supported level; when no level is requested, the model's `modelThinkingLevels` entry or `defaultThinkingLevel` applies.
103
+ - **Unknown `:effort` suffixes.** If a candidate ends in an unrecognized `:word` (such as `openai/gpt-5.5:extreme`) that is not part of a real model ID, Atomic strips the unknown suffix and runs the base model at its default effort if that base model resolves — or fails launch if the base model does not resolve (never falling back to a different model).
101
104
  - Fallback entries use their own `:effort` suffix if present, or inherit the launch effort without drifting silently. Attempt metadata records the resolved model and effective effort.
102
105
  - Explicit `model: provider/id:off` preserves `:off`, whereas the deprecated `thinking: "off"` frontmatter field does not append `:off` automatically.
103
106
 
@@ -122,19 +125,46 @@ Global subagent runtime configuration lives at `~/.atomic/agent/extensions/subag
122
125
  | `parallel.runningCapacity` | `1000` | Maximum simultaneously running subagents across this session (also bounds concurrent released-subagent wakes). Takes effect when the first subagent starts; restart Atomic after changing. |
123
126
  | `resumeInFlight` | `"never"` | How startup and `/resume` handle paused or quit subagents awaiting resume: `"never"`, `"ask"` (one confirmation prompt; falls back to `"never"` without a UI), or `"auto"`. |
124
127
  | `sessionStartTimeoutMs` | `300000` | Startup budget per attempt in milliseconds (`1` to `2147483647`). Queue wait under `parallel.runningCapacity` does not count. |
125
- | `defaultSessionDir` | None | Deprecated and ignored, with a one-time warning: subagent sessions always stay in the launching session's store. |
126
- | `worktreeSetupHook` | None | Executable script path (absolute, `~/...`, or repo-relative containing `/` or `\`) run after creating each `worktree: true` temporary worktree. Receives JSON metadata on stdin and prints `{ "syntheticPaths": [...] }` on stdout to exclude generated files from diff capture. |
127
- | `worktreeSetupHookTimeoutMs` | `30000` | Timeout in milliseconds for `worktreeSetupHook`. |
128
+ | `worktreeSetupHook` | None | Executable script path (absolute, `~/...`, or repo-relative containing `/` or `\`) run after creating each `worktree: true` temporary worktree. See [Worktree setup hook contract](#worktree-setup-hook-contract). |
129
+ | `worktreeSetupHookTimeoutMs` | `30000` | Positive integer timeout in milliseconds (`> 0`) for `worktreeSetupHook`. |
128
130
  | `intercomBridge.mode` | `"always"` | Controls automatic injection of `intercom`, `contact_supervisor`, and Intercom orchestration prompt instructions into subagents: `"always"` (all subagents), `"fork-only"` (forked subagents only), or `"off"` (frontmatter tool lists only). |
129
- | `intercomBridge.instructionFile` | None | Optional custom Markdown file replacing the default Intercom orchestration instructions injected into subagents. |
130
- | `control.enabled` | `true` | Enable subagent attention and long-running activity tracking. |
131
+ | `intercomBridge.instructionFile` | None | Optional custom Markdown file replacing the default Intercom instructions injected into subagents. Supports `{orchestratorTarget}` placeholder substitution. Relative paths resolve against `~/.atomic/agent/extensions/subagent/` (`~/` expands to home); unreadable files warn and fall back to the default template. |
132
+ | `control.enabled` | `true` | Enable subagent attention and long-running activity tracking (separate from 15-minute [task heartbeats](/background-tasks#task-heartbeats)). |
131
133
  | `control.needsAttentionAfterMs` | `60000` | Milliseconds without observed activity before raising `needs_attention`. |
132
134
  | `control.activeNoticeAfterMs` | `240000` | Elapsed milliseconds before raising `active_long_running`. |
133
135
  | `control.activeNoticeAfterTurns` | Disabled | Optional turn-count threshold for `active_long_running`. |
134
136
  | `control.activeNoticeAfterTokens` | Disabled | Optional total-token threshold for `active_long_running`. |
135
137
  | `control.failedToolAttemptsBeforeAttention` | `3` | Consecutive mutating-tool failures before raising `needs_attention`. |
138
+ | `control.progressScores` | None | Optional numeric array tracking progress scores; halves `needsAttentionAfterMs` and `activeNoticeAfterMs` when scores trend downward or stay flat at `<= 8`. |
136
139
  | `control.notifyOn` | `["active_long_running", "needs_attention"]` | Which control events emit parent notices. |
137
- | `control.notifyChannels` | `["event", "intercom"]` | Channels used to deliver control notices. |
140
+ | `control.notifyChannels` | `["event", "intercom"]` | Delivery channels for control notices: `"event"` renders an accented `⚠ Subagent needs attention` / `active long running` notice box in chat (with `Nudge`, `Status`, and `Quit` hints) and emits `subagent:control-event`; `"intercom"` sends an Intercom notice to the supervisor. |
141
+
142
+ ### Deprecated `config.json` fields
143
+
144
+ - **`defaultSessionDir`**: Deprecated and ignored with a one-time warning. Subagent sessions always stay in the launching session's [session store](/storage).
145
+
146
+ ### Worktree setup hook contract
147
+
148
+ When `worktreeSetupHook` is configured, Atomic runs the hook once for each temporary worktree created by `worktree: true` before starting its subagent:
149
+
150
+ - **Execution.** Runs directly with `cwd: worktreePath`, `shell: false` (must be an executable binary or script with a shebang, not a shell command string), and a `64 MiB` output buffer limit.
151
+ - **Stdin JSON payload:**
152
+ ```json
153
+ {
154
+ "version": 1,
155
+ "repoRoot": "/abs/path/to/repo",
156
+ "worktreePath": "/abs/path/to/worktree",
157
+ "agentCwd": "/abs/path/to/worktree/or/subdir",
158
+ "branch": "atomic-subagent-...",
159
+ "index": 0,
160
+ "runId": "a1b2c3d4",
161
+ "baseCommit": "<sha>",
162
+ "agent": "worker"
163
+ }
164
+ ```
165
+ - **Required stdout.** Must print a non-empty valid JSON object (for example `{}` or `{ "syntheticPaths": ["dist", ".cache"] }`). Empty stdout or non-object JSON fails launch.
166
+ - **`syntheticPaths` validation.** Every entry must be a relative path strictly inside `worktreePath` (not empty, not `.`, not absolute, and not escaping via `..`) and cannot match any Git-tracked path. Synthetic paths are excluded from diff capture and unlinked before worktree removal.
167
+ - **Failure rollback.** Any non-zero exit code, timeout (`worktreeSetupHookTimeoutMs`), invalid stdout, or invalid `syntheticPaths` entry removes the created worktree and branch and fails the parallel launch.
138
168
 
139
169
  ## Tool parameters and actions
140
170
 
@@ -144,10 +174,11 @@ Global subagent runtime configuration lives at `~/.atomic/agent/extensions/subag
144
174
  | `agent` | Single launch or management | Agent name for single-agent launch, or target name for `get`, `update`, and `delete`. |
145
175
  | `task` | Single launch | Task prompt (optional in single mode for self-contained agents). |
146
176
  | `tasks` | Parallel launch | Array of `{ agent, task, count?, cwd?, worktree?, output?, outputMode?, reads?, progress?, model?, skill?, group?, heartbeatMs? }`. |
147
- | `id` | Control / inspect | Target for `status`, `wait` (task ID), or `pause`/`resume`/`quit` (child ID `<runId>:<index>`, task ID, Intercom name, or single-child run ID). Prefer `id` over legacy `runId`. |
177
+ | `config` | `create` / `update` | Agent configuration object or valid JSON string (`name`, `package`, `description`, `scope`, `systemPrompt`, `systemPromptMode`, `inheritProjectContext`, `inheritSkills`, `defaultContext`, `model`, `fallbackModels`, `tools`, `extensions`, `skills`, `thinking`, `output`, `reads` → `defaultReads`, `progress` → `defaultProgress`). `tools`, `skills`, `reads`, and `extensions` accept comma-separated strings (or `false`/`""`), not arrays; `extensions: ""` disables all extensions while `extensions: false` clears to inherit. |
178
+ | `id` | Control / inspect | Target for `status`, `wait` (task ID), or `pause`/`resume`/`quit` (child ID `<runId>:<index>`, task ID, Intercom name, or single-child run ID). |
148
179
  | `all` | `pause` / `quit` | Act on every running subagent launched by this session (`quit` also covers paused subagents). Not valid with `resume` or `id`. |
149
180
  | `message` | `resume` | Optional prompt delivered once when resuming a subagent. |
150
- | `budgetMs` | `wait` | Wait duration in milliseconds (`0` polls immediately; omitted uses session default `30000` ms). |
181
+ | `budgetMs` | `wait` | Wait duration in milliseconds (`0` polls immediately; omitted uses session default `30000` ms). Must be a non-negative safe integer in codemode. |
151
182
  | `context` | Launch | `"fresh"` or `"fork"`. If omitted and any requested agent has `defaultContext: "fork"`, the entire launch runs forked. |
152
183
  | `worktree` | Launch | `true` (parallel mode only: isolated temporary Git worktrees) or `{ branch, base?, path? }` (single or parallel: permanent named worktree). |
153
184
  | `concurrency` | Parallel launch | Overrides `parallel.concurrency` for this batch. |
@@ -155,10 +186,21 @@ Global subagent runtime configuration lives at `~/.atomic/agent/extensions/subag
155
186
  | `heartbeatMs` | Launch / task | Heartbeat interval in ms (`0` disables; minimum `60000`). Per-task value wins over top-level. |
156
187
  | `model` | Single launch / task | Concrete model override (`provider/id[:effort]`) or `"auto"`. |
157
188
  | `skill` | Single launch / task | Skill override: comma-separated string, string array, `true` (agent default), or `false` (disable). |
158
- | `output` / `outputMode` | Single launch / task | `output` file path (or `false`); `outputMode` is `"inline"` (default) or `"file-only"` (requires an `output` path). |
159
- | `reads` | Single launch / task | Array of file paths prepended relative to child `cwd`, or `false` to disable `defaultReads`. |
160
- | `progress` / `includeProgress` | Launch / task | `progress` toggles isolated run-scoped `progress.md`; `includeProgress` adds runtime progress telemetry to the tool result. |
161
- | `cwd`, `sessionDir`, `agentScope`, `artifacts`, `maxOutput`, `control` | Launch | Working directory, `sessionDir` (deprecated and ignored: sessions stay in the launching session's store), discovery scope (`"user" \| "project" \| "both"`, default `"both"`), debug artifacts (`true`), output truncation (`{ bytes?, lines? }`), and per-run `control` overrides. |
189
+ | `output` / `outputMode` | Single launch / task | `output`: path string, `true`/`"true"` (use agent frontmatter default), or `false`/`"false"` (disable). Atomic injects a write instruction, reads the file if modified by the subagent, or writes the final assistant text there automatically. `outputMode`: `"inline"` (default) or `"file-only"` (requires an `output` path; falls back to inline on failure or save error). |
190
+ | `reads` | Single launch / task | Prepends `[Read from: <abs-path>, ...]` (resolved relative to child `cwd`) rather than inlining file contents. Single-agent mode accepts an array of paths or `false` (rejects `true`; ignores `defaultReads`). Parallel `tasks[]` accepts an array, `true` (use `defaultReads`), or `false` (disable `defaultReads`). |
191
+ | `progress` | Launch / task | Toggles isolated run-scoped `progress.md` under artifact storage (omitted inherits `defaultProgress`, suppressed for prompts with read-only phrasing). |
192
+ | `includeProgress` | Launch | Default `false`. Populates `details.progress` only on direct blocking runs without a background task host; has no effect on standard background launches. |
193
+ | `cwd` | Launch / task | Working directory override (validated as an existing directory before launch). Must match across all tasks when `worktree: true`. |
194
+ | `agentScope` | Launch / management | Discovery scope: `"user"`, `"project"`, or `"both"` (default `"both"`). |
195
+ | `artifacts` | Launch | Default `true`. Writes `*_input.md`, `*_output.md`, and `*_meta.json` (`includeJsonl` defaults `false`) under `<session-dir>/subagent-artifacts/` (or a private temp directory for sessionless runs), auto-cleaned every 24 hours after 7 days. Passing `artifacts: false` also deletes transient `progress.md` on exit. |
196
+ | `maxOutput` | Launch | Output truncation limits `{ bytes?, lines? }`. Defaults to `{ bytes: 204800, lines: 5000 }` (200 KiB / 5,000 lines), prepending `[TRUNCATED: showing first ... - full output at ...]`. |
197
+ | `control` | Launch | Per-run overrides for any `config.json` `control.*` field (including `progressScores`). |
198
+
199
+ ### Deprecated and legacy tool parameters
200
+
201
+ - **`runId`**: Legacy alias of `id` for `status` and `pause`/`resume`/`quit`. Accepted in direct tool calls; **rejected** in codemode scripts (`"Use id instead of runId in subagent scripts."`).
202
+ - **`sessionDir`**: Deprecated and ignored with a one-time warning (subagent sessions always remain in the launching session's store).
203
+ - **`share`**: Deprecated no-op (nothing is uploaded or shared).
162
204
 
163
205
  ## SDK integration and errors
164
206
 
@@ -166,9 +208,9 @@ For programmatic child inheritance, startup timeout errors, and task supervision
166
208
 
167
209
  Import `OwnerTaskStore`, `bindOwnerTaskStore`, `SessionStartError`, and `SessionStartTimeoutError` from `@bastani/atomic`.
168
210
 
169
- ### `ReleasedChildError` codes
211
+ ### Released subagent error codes
170
212
 
171
- When tracking or waking a [released subagent](/subagents#released-subagents) fails, the built-in subagents extension reports a typed `ReleasedChildError` in `status` output and failure notices. `ReleasedChildError` is not exported as a top-level class from `@bastani/atomic`; inspect its serialized `name` (`"ReleasedChildError"`), `code`, `subject`, `hint`, `retryable`, and `fields` in reported results and notices:
213
+ When tracking or waking a [released subagent](/subagents#released-subagents) fails, `status` output and failure notices report serialized `ReleasedChildError` fields (`name: "ReleasedChildError"`, `code`, `subject`, `hint`, `retryable`, and `fields`). `ReleasedChildError` is not exported as a top-level class from `@bastani/atomic`; inspect those reported fields or notice codes when troubleshooting:
172
214
 
173
215
  | Code | Cause | Action |
174
216
  | --- | --- | --- |
@@ -180,21 +222,19 @@ When tracking or waking a [released subagent](/subagents#released-subagents) fai
180
222
  | `completion-not-held` | A subagent's shell finished after the subagent resumed or ended. | None. The notice waits for the subagent's next run. |
181
223
  | `wake-failed` | Wake failed for another reason (retryable). | Results are preserved; call `resume` to retry. |
182
224
 
183
- ### `subagent:finishing` event
225
+ ### Subagent lifecycle events
184
226
 
185
- Extension authors integrating with `worktree: true` cleanup can subscribe to `atomic.events.on("subagent:finishing", ({ runId, index, taskId, cwd, status }) => ...)` before launch so external watchers release file handles before Git teardown runs.
227
+ Extension authors can subscribe to subagent lifecycle events on `atomic.events`:
228
+
229
+ - **`subagent:finishing`**: Emitted before `worktree: true` Git teardown runs, carrying `{ runId, index, taskId, cwd, status }`, so external file watchers can release handles before cleanup.
230
+ - **`subagent:child-stopped`**: Emitted when an idle (released or paused) subagent is stopped, carrying `{ childId, taskId?, sessionId?, sessionFile?, status }`.
186
231
 
187
232
  ### Owner-bound task projection
188
233
 
189
- This section describes an SDK host integration API for custom frontends. Import `OwnerTaskStore` and `bindOwnerTaskStore` from `@bastani/atomic`, and see [Owner-bound task supervisor](/sdk/reference#owner-bound-task-supervisor) for creating the host and lease. SDK host adapters bind task observation to a live session in three steps:
234
+ Custom SDK frontends bind background task observation to a live session using `OwnerTaskStore` and `bindOwnerTaskStore` from `@bastani/atomic` (see [Owner-bound task supervisor](/sdk/reference#owner-bound-task-supervisor) for creating the supervisor and owner lease):
190
235
 
191
236
  1. Construct an `OwnerTaskStore` from the supervisor and owner lease.
192
- 2. Check `store.connect()`.
237
+ 2. Connect the store with `store.connect()`.
193
238
  3. Call `bindOwnerTaskStore(session, store)`.
194
239
 
195
- Behavior and limits:
196
-
197
- - **Lifecycle.** Binding never creates or connects an owner, reconciles snapshots and cursors even when producers attach after binding, and disposing the view does not cancel the owner. Reattachment preserves identities and foreground versus background distinctions without restarting work or adding waits.
198
- - **Agent panel rendering.** Interactive sessions display active and recent background tasks in the agent panel below the prompt, with each subagent's running shells nested beneath it, rather than permanent transcript rows. Old rows clear on session replacement, and notices share one completion-notice renderer.
199
- - **Custom host adapters.** Custom `ChatSessionHost` adapters can keep transcript rows or set `taskRowsInChat: false` to use the agent panel only. Colliding labels receive a short task-ID suffix, and previews cap at 64 reports and 8 KiB per task with omission markers.
200
- - **Scope.** Binding only projects task state. It does not auto-migrate custom producers or provide `/tasks` transcript inspection.
240
+ Binding projects active and recent background task state into the session's task UI without creating or closing the owner: disposing the view leaves tasks running, reattaching preserves task identities and foreground-versus-background state, and session replacement clears previous rows. Binding handles state projection only and does not provide the interactive `/tasks` transcript viewer.