@bastani/atomic 0.10.9 → 0.10.10-alpha.1

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 (401) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +211 -155
  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 +27 -12
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  10. package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
  11. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  12. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
  13. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
  14. package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  16. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  17. package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
  18. package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
  19. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
  22. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
  24. package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
  26. package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +145 -58
  28. package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
  29. package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
  30. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
  33. package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
  34. package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
  43. package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
  44. package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
  45. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  46. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  49. package/dist/builtin/intercom/README.md +85 -114
  50. package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
  51. package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
  52. package/dist/builtin/intercom/group.ts +7 -3
  53. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  54. package/dist/builtin/intercom/package.json +1 -1
  55. package/dist/builtin/mcp/README.md +37 -27
  56. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  57. package/dist/builtin/mcp/package.json +1 -1
  58. package/dist/builtin/subagents/CHANGELOG.md +8 -0
  59. package/dist/builtin/subagents/README.md +71 -138
  60. package/dist/builtin/subagents/package.json +1 -1
  61. package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
  62. package/dist/builtin/web-access/CHANGELOG.md +9 -0
  63. package/dist/builtin/web-access/README.md +60 -87
  64. package/dist/builtin/web-access/index.bundle.mjs +387 -351
  65. package/dist/builtin/web-access/package.json +1 -1
  66. package/dist/cli/args.js +2 -2
  67. package/dist/cli/auth-cli.code.js +4 -4
  68. package/dist/cli/auth-cli.impl.js +3 -3
  69. package/dist/cli/auth-cli.js +3 -3
  70. package/dist/cli/blueprint-command.code.js +2 -2
  71. package/dist/cli/blueprint-command.impl.js +3 -3
  72. package/dist/cli/blueprint-command.js +3 -3
  73. package/dist/cli/intercom-command.code.js +3 -3
  74. package/dist/cli/intercom-command.impl.js +3 -3
  75. package/dist/cli/intercom-command.js +3 -3
  76. package/dist/cli/list-models.code.js +3 -3
  77. package/dist/cli/list-models.impl.js +3 -3
  78. package/dist/cli/list-models.js +3 -3
  79. package/dist/cli/session-picker.code.js +2 -2
  80. package/dist/cli/session-picker.impl.js +3 -3
  81. package/dist/cli/session-picker.js +3 -3
  82. package/dist/cli/startup-ui.code.js +2 -2
  83. package/dist/cli/startup-ui.impl.js +3 -3
  84. package/dist/cli/startup-ui.js +3 -3
  85. package/dist/cli/storage-command.impl.js +3 -3
  86. package/dist/cli/storage-command.js +3 -3
  87. package/dist/cli/storage-search-session.code.js +2 -2
  88. package/dist/cli/storage-search-session.impl.js +3 -3
  89. package/dist/cli/storage-search-session.js +3 -3
  90. package/dist/cli/team-command.code.js +2 -2
  91. package/dist/cli/team-command.impl.js +3 -3
  92. package/dist/cli/team-command.js +3 -3
  93. package/dist/cli.js +2 -2
  94. package/dist/core/agent-session-methods.d.ts +4 -1
  95. package/dist/core/agent-session-methods.js.map +1 -1
  96. package/dist/core/agent-session.d.ts +3 -0
  97. package/dist/core/compaction/compactor.d.ts +20 -14
  98. package/dist/core/compaction/errors.d.ts +120 -0
  99. package/dist/core/compaction/index.d.ts +1 -0
  100. package/dist/core/compaction/model-resolver.d.ts +2 -2
  101. package/dist/core/debug.impl.js +3 -3
  102. package/dist/core/debug.js +3 -3
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  111. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  112. package/dist/core/export-html/tool-renderer.code.js +1 -1
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/api-types.d.ts +1 -1
  116. package/dist/core/extensions/api-types.js.map +1 -1
  117. package/dist/core/extensions/index.d.ts +1 -1
  118. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  119. package/dist/core/extensions/jiti-loader.js +3 -3
  120. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.js +3 -3
  122. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  123. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  124. package/dist/core/extensions/loader-host-modules.js +3 -3
  125. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  126. package/dist/core/extensions/provider-types.d.ts +18 -6
  127. package/dist/core/extensions/provider-types.js.map +1 -1
  128. package/dist/core/extensions/runner-context.js +1 -1
  129. package/dist/core/intercom-broker-control-host.code.js +1 -1
  130. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  131. package/dist/core/intercom-broker-control-host.js +3 -3
  132. package/dist/core/intercom-broker-control.code.js +3 -3
  133. package/dist/core/intercom-broker-control.impl.js +3 -3
  134. package/dist/core/intercom-broker-control.js +3 -3
  135. package/dist/core/model-config.d.ts +40 -0
  136. package/dist/core/model-registry.js +1 -1
  137. package/dist/core/model-resolver-scope.d.ts +4 -4
  138. package/dist/core/model-runtime.d.ts +1 -1
  139. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  140. package/dist/core/package-manager-storage-adapters.js +3 -3
  141. package/dist/core/provider-composer-internal.d.ts +11 -2
  142. package/dist/core/sdk.code.js +3 -3
  143. package/dist/core/sdk.impl.js +3 -3
  144. package/dist/core/sdk.js +3 -3
  145. package/dist/core/session-manager-core.js +5 -5
  146. package/dist/core/session-manager-list.impl.js +3 -3
  147. package/dist/core/session-manager-list.js +3 -3
  148. package/dist/core/session-manager.code.js +1 -1
  149. package/dist/core/session-manager.impl.js +3 -3
  150. package/dist/core/session-manager.js +3 -3
  151. package/dist/core/session-storage.impl.js +3 -3
  152. package/dist/core/session-storage.js +3 -3
  153. package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
  154. package/dist/core/storage/index.js +2 -2
  155. package/dist/core/storage/node-sqlite-thread.js +2 -2
  156. package/dist/core/storage/node-sqlite.js +2 -2
  157. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  158. package/dist/core/storage/offline-snapshot-file.js +3 -3
  159. package/dist/core/storage/provider.js +2 -2
  160. package/dist/core/storage/selection.js +2 -2
  161. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  162. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  163. package/dist/core/storage/session/branch-fork-source.js +3 -3
  164. package/dist/core/storage/session/card-view.impl.js +3 -3
  165. package/dist/core/storage/session/card-view.js +3 -3
  166. package/dist/core/storage/session/child-reader.code.js +3 -3
  167. package/dist/core/storage/session/child-reader.impl.js +3 -3
  168. package/dist/core/storage/session/child-reader.js +3 -3
  169. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  170. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  171. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  172. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  173. package/dist/core/storage/session/expanded-child-details.js +3 -3
  174. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  175. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  176. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  177. package/dist/core/storage/session/fork-row-index.js +3 -3
  178. package/dist/core/storage/session/fork-staging.code.js +2 -2
  179. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  180. package/dist/core/storage/session/fork-staging.js +3 -3
  181. package/dist/core/storage/session/fork-window.code.js +3 -3
  182. package/dist/core/storage/session/fork-window.impl.js +3 -3
  183. package/dist/core/storage/session/fork-window.js +3 -3
  184. package/dist/core/storage/session/history-pages.impl.js +3 -3
  185. package/dist/core/storage/session/history-pages.js +3 -3
  186. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  187. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  188. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  189. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  190. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  191. package/dist/core/storage/session/memory-session-store.js +3 -3
  192. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  193. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  194. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  195. package/dist/core/storage/session/released-history-files.code.js +3 -3
  196. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  197. package/dist/core/storage/session/released-history-files.js +3 -3
  198. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  199. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  200. package/dist/core/storage/session/session-resume.impl.js +3 -3
  201. package/dist/core/storage/session/session-resume.js +3 -3
  202. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  203. package/dist/core/storage/session/snapshot-cut.js +3 -3
  204. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  205. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  206. package/dist/core/storage/session/snapshot-history.js +3 -3
  207. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  208. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  209. package/dist/core/storage/session/sql-session-store.js +3 -3
  210. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  211. package/dist/core/storage/session/tree-outline.js +3 -3
  212. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  213. package/dist/core/storage/session/tree-presentation.js +3 -3
  214. package/dist/core/storage/storage-status.impl.js +3 -3
  215. package/dist/core/storage/storage-status.js +3 -3
  216. package/dist/core/storage/team.impl.js +3 -3
  217. package/dist/core/storage/team.js +3 -3
  218. package/dist/core/structured-output/index.code.js +1 -1
  219. package/dist/core/structured-output/index.impl.js +3 -3
  220. package/dist/core/structured-output/index.js +3 -3
  221. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  222. package/dist/core/tasks/task-completion-entry.js +3 -3
  223. package/dist/core/tasks/task-file-history.code.js +3 -3
  224. package/dist/core/tasks/task-file-history.impl.js +3 -3
  225. package/dist/core/tasks/task-file-history.js +3 -3
  226. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  227. package/dist/core/tasks/task-reference-archive.js +3 -3
  228. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  229. package/dist/core/tasks/task-reference-identity.js +3 -3
  230. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  231. package/dist/core/tasks/task-reference-stream.js +3 -3
  232. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  233. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  234. package/dist/core/tasks/task-view-source.impl.js +3 -3
  235. package/dist/core/tasks/task-view-source.js +3 -3
  236. package/dist/core/tools/read-url.code.js +2 -2
  237. package/dist/core/tools/read-url.impl.js +3 -3
  238. package/dist/core/tools/read-url.js +3 -3
  239. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  240. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  241. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  242. package/dist/core/worktree-snapshot/errors.js +3 -3
  243. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  244. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  245. package/dist/extensions/codemode/execute.code.js +1 -1
  246. package/dist/extensions/codemode/execute.impl.js +3 -3
  247. package/dist/extensions/codemode/execute.js +3 -3
  248. package/dist/extensions/codemode/renderer.code.js +2 -2
  249. package/dist/extensions/codemode/renderer.impl.js +3 -3
  250. package/dist/extensions/codemode/renderer.js +3 -3
  251. package/dist/extensions/mcp/cli.code.js +2 -2
  252. package/dist/extensions/mcp/cli.impl.js +3 -3
  253. package/dist/extensions/mcp/cli.js +3 -3
  254. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  255. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  256. package/dist/extensions/mcp/cli.lazy.js +3 -3
  257. package/dist/extensions/mcp/runtime.code.js +1 -1
  258. package/dist/extensions/mcp/runtime.impl.js +3 -3
  259. package/dist/extensions/mcp/runtime.js +3 -3
  260. package/dist/index-extensions.d.ts +1 -1
  261. package/dist/index.d.ts +8 -1
  262. package/dist/index.js +7 -7
  263. package/dist/main-first-time-setup.code.js +2 -2
  264. package/dist/main-first-time-setup.impl.js +3 -3
  265. package/dist/main-first-time-setup.js +3 -3
  266. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
  267. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  268. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  269. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  270. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  271. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  272. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  273. package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
  274. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  275. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  276. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  277. package/dist/modes/print-mode.js +1 -1
  278. package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
  279. package/dist/modes/rpc/rpc-types.d.ts +29 -2
  280. package/dist/package-manager-cli.code.js +5 -5
  281. package/dist/package-manager-cli.impl.js +3 -3
  282. package/dist/package-manager-cli.js +3 -3
  283. package/dist/rpc-entry.js +1 -1
  284. package/dist/startup-files.json +1 -1
  285. package/dist/startup-stages/5.js +1 -1
  286. package/dist/startup-stages/7.js +1 -1
  287. package/dist/startup-stages/8.js +1 -2
  288. package/dist/startup-stages/9.js +2 -1
  289. package/dist/utils/native-module.d.ts +44 -0
  290. package/dist/utils/startup-database-spare.code.js +3 -3
  291. package/dist/utils/startup-database-spare.impl.js +3 -3
  292. package/dist/utils/startup-database-spare.js +3 -3
  293. package/dist/utils/tools-manager.code.js +1 -1
  294. package/dist/utils/tools-manager.impl.js +3 -3
  295. package/dist/utils/tools-manager.js +3 -3
  296. package/docs/background-tasks.md +235 -243
  297. package/docs/build.md +12 -11
  298. package/docs/codemode.md +60 -51
  299. package/docs/compaction/reference.md +61 -24
  300. package/docs/compaction.md +117 -65
  301. package/docs/computer-use.md +179 -146
  302. package/docs/containerization.md +79 -33
  303. package/docs/custom-provider/api-reference.md +148 -11
  304. package/docs/custom-provider/oauth.md +44 -27
  305. package/docs/custom-provider/override.md +14 -7
  306. package/docs/custom-provider/registration.md +75 -65
  307. package/docs/custom-provider/streaming.md +42 -19
  308. package/docs/custom-provider.md +25 -61
  309. package/docs/development.md +47 -43
  310. package/docs/docs.json +33 -33
  311. package/docs/environment-variables.md +83 -57
  312. package/docs/extensions/api-reference.md +323 -734
  313. package/docs/extensions/authoring.md +186 -269
  314. package/docs/extensions/events.md +308 -375
  315. package/docs/extensions/examples.md +122 -74
  316. package/docs/extensions/ui.md +217 -197
  317. package/docs/extensions.md +152 -259
  318. package/docs/getting-started/authentication.md +27 -14
  319. package/docs/getting-started/first-session.md +25 -26
  320. package/docs/getting-started/installation.md +62 -84
  321. package/docs/getting-started/project-instructions.md +39 -14
  322. package/docs/guides/configuration.md +42 -20
  323. package/docs/guides/intercom.md +17 -13
  324. package/docs/guides/non-interactive.md +29 -16
  325. package/docs/guides/orchestration.md +16 -10
  326. package/docs/guides/resume-on-any-machine.md +54 -49
  327. package/docs/guides/subagents.md +22 -14
  328. package/docs/guides/team-setup.md +37 -26
  329. package/docs/guides.md +22 -21
  330. package/docs/herdr.md +21 -16
  331. package/docs/index.md +16 -17
  332. package/docs/intercom/operations.md +68 -66
  333. package/docs/intercom/reference.md +196 -191
  334. package/docs/intercom.md +103 -92
  335. package/docs/json.md +71 -71
  336. package/docs/keybindings.md +63 -50
  337. package/docs/libraries/agent-core.md +49 -8
  338. package/docs/libraries/ai.md +21 -12
  339. package/docs/libraries/codemode.md +28 -6
  340. package/docs/libraries/schema.md +7 -7
  341. package/docs/libraries/telemetry.md +7 -7
  342. package/docs/libraries/tui.md +74 -94
  343. package/docs/libraries.md +5 -5
  344. package/docs/llama-cpp.md +38 -33
  345. package/docs/mcp-servers.md +96 -90
  346. package/docs/models/reference.md +46 -33
  347. package/docs/models-configuration.md +12 -6
  348. package/docs/models.md +93 -88
  349. package/docs/orchestration/migrating-workflows.md +21 -19
  350. package/docs/orchestration/patterns.md +35 -20
  351. package/docs/orchestration.md +22 -21
  352. package/docs/packages/authoring.md +28 -19
  353. package/docs/packages/reference.md +75 -16
  354. package/docs/packages.md +31 -33
  355. package/docs/programmatic.md +22 -21
  356. package/docs/prompt-templates.md +63 -41
  357. package/docs/providers/reference.md +35 -19
  358. package/docs/providers.md +61 -71
  359. package/docs/quickstart.md +32 -46
  360. package/docs/reference/cli.md +249 -252
  361. package/docs/reference.md +23 -20
  362. package/docs/rpc/examples.md +74 -17
  363. package/docs/rpc/extension-ui.md +79 -62
  364. package/docs/rpc/protocol.md +816 -358
  365. package/docs/rpc.md +75 -151
  366. package/docs/sdk/reference.md +175 -45
  367. package/docs/sdk/structured-decisions.md +92 -62
  368. package/docs/sdk/web-server.md +79 -46
  369. package/docs/sdk.md +237 -195
  370. package/docs/security.md +106 -43
  371. package/docs/session-format.md +96 -59
  372. package/docs/sessions.md +149 -113
  373. package/docs/settings.md +289 -204
  374. package/docs/shell-aliases.md +15 -6
  375. package/docs/skills/authoring.md +17 -9
  376. package/docs/skills/reference.md +23 -21
  377. package/docs/skills.md +104 -97
  378. package/docs/storage.md +140 -242
  379. package/docs/subagents/authoring.md +147 -16
  380. package/docs/subagents/reference.md +100 -30
  381. package/docs/subagents.md +220 -252
  382. package/docs/terminal-setup.md +97 -69
  383. package/docs/termux.md +51 -85
  384. package/docs/themes/reference.md +51 -37
  385. package/docs/themes.md +49 -54
  386. package/docs/tmux.md +38 -21
  387. package/docs/tools.md +198 -147
  388. package/docs/tui/reference.md +64 -32
  389. package/docs/tui.md +38 -66
  390. package/docs/usage.md +76 -78
  391. package/docs/verification.md +25 -25
  392. package/docs/web-access.md +72 -55
  393. package/docs/windows.md +53 -58
  394. package/docs/worktree-snapshots.md +62 -65
  395. package/package.json +8 -8
  396. package/schemas/models.schema.json +51 -0
  397. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  398. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  399. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  400. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  401. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
package/docs/guides.md CHANGED
@@ -1,27 +1,22 @@
1
1
  ---
2
- title: Guides
3
- description: "Task guides for everyday work with Atomic: interactive use, non-interactive runs, sessions, compaction, subagents, providers, local models, security, and containers."
2
+ title: "Task guides"
3
+ sidebarTitle: "All guides"
4
+ description: "Task guides for interactive and non-interactive work, sessions, compaction, subagents, providers, and security."
4
5
  ---
5
6
 
6
- # Guides
7
+ New to Atomic? Follow the [Quickstart](/quickstart) to install, authenticate, run your first session, and add project instructions. To extend or embed Atomic, go to [Build with Atomic](/build). For exact flags, settings, events, or types, go to the [Reference index](/reference).
7
8
 
8
- Find a guide for the task you want to do with Atomic.
9
+ ## Use Atomic daily
9
10
 
10
- New to Atomic? Follow the [Quickstart](/quickstart) to install, authenticate, run a first session, and add project instructions.
11
+ - **[Interactive mode](/usage).** Use the terminal editor, slash commands, startup typing, message queue, and context files.
12
+ - **[Non-interactive mode](/guides/non-interactive).** Run one-shot prompts with `-p`, stream JSON events, or drive Atomic over RPC.
13
+ - **[Configure Atomic](/guides/configuration).** Create a global settings file and override settings per project.
14
+ - **[Sessions](/sessions).** Save, resume, name, search, and branch sessions.
15
+ - **[Worktree snapshots](/worktree-snapshots).** Capture and restore repository state alongside your session history.
16
+ - **[Resume on any machine](/guides/resume-on-any-machine).** Continue a session on another machine that shares your storage.
17
+ - **[Context and compaction](/compaction).** Keep long sessions inside the model's context window.
11
18
 
12
- Looking to extend or embed Atomic? Go to [Build with Atomic](/build). Looking up an exact flag, setting, event, or type? Go to the [Reference index](/reference).
13
-
14
- ## Everyday use
15
-
16
- 1. **[Interactive use](/usage).** Learn the interactive loop, slash commands, startup typing, and context files.
17
- 2. **[Non-interactive use](/guides/non-interactive).** Run one-shot prompts with `-p`, stream JSON events, or drive Atomic over RPC.
18
- 3. **[Configure Atomic](/guides/configuration).** Write a global settings file and override settings per project.
19
- 4. **[Sessions](/sessions).** Save, resume, name, search, and branch sessions.
20
- 5. **[Worktree snapshots](/worktree-snapshots).** Capture and restore repository state alongside your session history.
21
- 6. **[Resume on any machine](/guides/resume-on-any-machine).** Continue a session on another machine that shares your storage.
22
- 7. **[Context and compaction](/compaction).** Keep long sessions inside the model's context window.
23
-
24
- ## Running work for you
19
+ ## Delegate and automate
25
20
 
26
21
  - **[Plan a task with subagents](/guides/orchestration).** Distribute multi-step work across subagents and verify the results.
27
22
  - **[Subagents](/guides/subagents).** Delegate independent tasks to fresh or forked subagents in the background.
@@ -31,13 +26,19 @@ Looking to extend or embed Atomic? Go to [Build with Atomic](/build). Looking up
31
26
  - **[Computer use](/computer-use).** Automate desktop apps, browsers, and terminals across macOS, Linux, and Windows.
32
27
  - **[Verification](/verification).** Reproduce bugs and collect verifiable evidence across terminal, browser, and desktop environments.
33
28
 
34
- ## Models, safety, and references
29
+ ## Models and providers
35
30
 
36
31
  - **[Providers](/providers).** Configure subscription logins, API keys, and cloud providers.
37
32
  - **[Local models](/llama-cpp).** Run local models with llama.cpp.
33
+
34
+ ## Security and isolation
35
+
38
36
  - **[Security](/security).** Review project trust, sandbox boundaries, and credential export guarantees.
39
37
  - **[Containerization](/containerization).** Run Atomic or its tools inside Gondolin, Docker, or OpenShell.
38
+
39
+ ## Quick references
40
+
40
41
  - **[Herdr](/herdr).** Configure status indicators and session restore inside Herdr panes.
41
- - **[Environment variables](/environment-variables).** Look up Atomic variables, legacy aliases, and provider credentials.
42
- - **[Settings](/settings).** Browse the full settings reference.
42
+ - **[Settings](/settings).** Browse the full `settings.json` reference.
43
+ - **[Environment variables](/environment-variables).** Look up Atomic variables, legacy aliases, color controls, and provider credentials.
43
44
  - **[Keybindings](/keybindings).** Look up default shortcuts and custom bindings.
package/docs/herdr.md CHANGED
@@ -1,19 +1,20 @@
1
1
  ---
2
- title: "Herdr"
3
- description: "Automatic status reporting and session restore when running Atomic inside Herdr panes."
2
+ title: "Herdr integration"
3
+ sidebarTitle: "Herdr"
4
+ description: "Use Atomic's built-in Herdr status indicators, session restore, troubleshooting steps, and privacy controls."
4
5
  ---
5
6
 
6
- # Herdr
7
-
8
7
  Atomic reports its status to [Herdr](https://herdr.dev) automatically when you start it inside a Herdr pane. No extra extension is needed, and the pane identifies the agent as `atomic`.
9
8
 
10
- For interactive terminal automation, pane isolation, and fallbacks, see [Computer use](/computer-use#terminal-automation-with-herdr). This page covers Atomic's built-in status and restore integration.
9
+ For interactive terminal automation, pane isolation, and fallbacks, see [Computer use](/computer-use#terminal-automation-with-herdr). This page covers Atomic's built-in status and session-restore integration.
11
10
 
12
11
  ## Setup
13
12
 
14
- Use Herdr 0.8.2 or newer and launch Atomic inside a Herdr pane. Herdr sets the pane environment variables automatically, so no manual setup is required.
13
+ Use Herdr 0.8.2 or newer and launch Atomic inside a Herdr pane. Herdr sets the pane environment variables automatically, so no manual configuration is required.
15
14
 
16
- Status reporting runs only in interactive Atomic sessions. It stays off outside Herdr and in print, JSON, and RPC modes.
15
+ - Status reporting runs only in interactive Atomic sessions. It stays off outside Herdr and in print, JSON, and RPC modes.
16
+ - Reporting stays active even when you pass `--no-extensions` (`-ne`); only setting `herdr.enabled: false` turns it off.
17
+ - Inside Herdr panes (`TERM_PROGRAM=herdr`), Atomic automatically enables Kitty inline images and clickable OSC 8 hyperlinks.
17
18
 
18
19
  ## Status indicators
19
20
 
@@ -25,7 +26,9 @@ Status reporting runs only in interactive Atomic sessions. It stays off outside
25
26
 
26
27
  Quiet periods such as provider waits, retries, and tool execution still count as Working. Active background work keeps the pane Working after Atomic finishes its response.
27
28
 
28
- Opening `/tasks` or `/agents` does not mark the pane Blocked, and neither does a subagent asking its supervisor for guidance. A permission prompt can show Blocked. Check `/tasks` for the outcome; the pane status is not a pass or fail verdict.
29
+ All Blocked states report the fixed message `"Waiting for approval"`, even for non-approval questions or prompts. Unlike [OSC 7501 program status](/terminal-setup#program-status), Herdr also reports project trust prompts (`/trust` or resumed-folder trust) as Blocked when no background tasks are running.
30
+
31
+ Opening `/tasks` or `/agents` does not mark the pane Blocked, and neither does a subagent asking its supervisor for guidance. Check `/tasks` for pass or fail outcomes; the pane status shows activity, not a verdict.
29
32
 
30
33
  ## Restore after a Herdr restart
31
34
 
@@ -34,13 +37,15 @@ With Herdr 0.9.2 or newer, Atomic also reports a resume command so Herdr can reo
34
37
  - **Local SQLite sessions (default):** Atomic reports `atomic --session-store <path> --session <id>` (plus `--session-prefix <prefix>` when a table prefix is configured).
35
38
  - **JSONL directory sessions:** Atomic reports `atomic --session-dir <dir> --session <id>`. Session IDs ending in `.jsonl` still use `--session <id>`.
36
39
  - **Other persisted stores (such as remote libSQL or PostgreSQL):** Atomic reports `atomic --session <id>`.
37
- - **Unsaved sessions:** Sessions started with `--no-session` are reported without a resume command. A new persisted session can be reopened only after it has been saved.
38
- - **Quit vs. stop signals:** Quitting Atomic yourself (`Ctrl+D`, `Ctrl+C` twice, or `/quit`) clears the resume command so Herdr does not reopen the pane. When Herdr or the OS stops Atomic with `SIGTERM` or `SIGHUP`, the command stays registered for restore.
40
+ - **Switching sessions:** Running `/new`, `/resume`, `/fork`, or `/clone` updates the pane to the new session's ID and resume command.
41
+ - **Unsaved sessions:** Sessions started with `--no-session` report status without a resume command. For a brand-new persisted session, Atomic reports the resume command right away, though reopening succeeds only after the session's first entry is saved to storage.
42
+ - **Quit vs. stop signals:** Quitting Atomic yourself (`Ctrl+D`, `Ctrl+C` twice, `/quit`, or `/exit`) clears the resume command so Herdr does not reopen the pane. When Herdr or the OS stops Atomic with `SIGTERM`, `SIGHUP`, or a Windows console close or sign-out, the resume command stays registered for restore.
43
+ - **Resume-command safety limits:** If the resume command has more than 64 arguments, exceeds 8 KiB, or contains a single quote (`'`) or control character in any argument (such as a session path), Atomic omits the resume command while continuing to report live status.
39
44
  - **Older Herdr versions:** Herdr 0.8.2 through 0.9.1 show status indicators without session restore.
40
45
 
41
46
  ## Disable the integration
42
47
 
43
- Add this to `~/.atomic/agent/settings.json` or trusted project `.atomic/settings.json`, then reload or restart Atomic:
48
+ Add this to `~/.atomic/agent/settings.json` or trusted project `.atomic/settings.json`, then run `/reload` or restart Atomic:
44
49
 
45
50
  ```json
46
51
  {
@@ -50,7 +55,7 @@ Add this to `~/.atomic/agent/settings.json` or trusted project `.atomic/settings
50
55
  }
51
56
  ```
52
57
 
53
- Reporting is enabled by default, and disabling it also disables resume-command reporting. Project settings follow the normal [settings precedence](/settings).
58
+ Reporting is enabled by default, and disabling it also disables resume-command reporting. Running `/reload` after setting `herdr.enabled` to `false` cleanly releases the pane registration and clears the resume command. Project settings follow the normal [settings precedence](/settings).
54
59
 
55
60
  ## Troubleshooting
56
61
 
@@ -58,12 +63,12 @@ If Atomic does not appear in Herdr:
58
63
 
59
64
  - Verify that you launched Atomic inside a Herdr pane rather than an external terminal.
60
65
  - Check that Herdr is running and `herdr.enabled` is not set to `false`.
61
- - Inside a Herdr pane, Atomic reports the pane itself and skips Herdr's legacy file integration (`herdr-agent-state.ts`, usually in `~/.pi/agent/extensions`). Outside a Herdr pane, that file loads normally.
62
- - If you installed a separate `herdr-atomic-reporter` extension, disable one of the two reporters to prevent flickering status updates.
66
+ - Inside a Herdr pane, Atomic's built-in reporter supersedes Herdr's legacy file integration and skips both `herdr-agent-state.ts` and `herdr-agent-state.js` (usually in `~/.pi/agent/extensions`). Outside a Herdr pane, those files load normally.
67
+ - If you installed a separate `herdr-atomic-reporter` extension, remove or disable one of the two reporters to prevent flickering status updates.
63
68
 
64
- Custom launchers must supply `HERDR_ENV=1` along with nonempty `HERDR_BIN_PATH`, `HERDR_PANE_ID`, and `HERDR_SOCKET_PATH` values. See [Herdr's integration guide](https://herdr.dev/docs/integrations/#integrate-your-own-agent).
69
+ Custom launchers must supply `HERDR_ENV=1` along with non-empty `HERDR_BIN_PATH`, `HERDR_PANE_ID`, and `HERDR_SOCKET_PATH` values. See [Herdr's integration guide](https://herdr.dev/docs/integrations/#integrate-your-own-agent).
65
70
 
66
- Reloading or compacting a session keeps Atomic registered in the pane. If status stops updating, check Herdr's connection and reload Atomic. Reporting failures do not interrupt the agent, and Atomic does not automatically poll to reconnect.
71
+ Each `herdr` CLI status call times out after 5 seconds (with a 64 KiB output buffer). Reporting errors never interrupt the agent, and each error category logs to stderr at most once per session. Reloading or compacting a session keeps Atomic registered while enabled; if status stops updating, check Herdr's connection and run `/reload` (Atomic does not poll to reconnect).
67
72
 
68
73
  ## Privacy
69
74
 
package/docs/index.md CHANGED
@@ -1,15 +1,14 @@
1
1
  ---
2
- title: "Overview"
3
- description: "Atomic documentation overview"
2
+ title: "Atomic documentation"
3
+ sidebarTitle: "Overview"
4
+ description: "Install Atomic, connect a model provider, and explore guides, customization APIs, and CLI references."
4
5
  ---
5
6
 
6
- # Atomic documentation
7
-
8
- Atomic is a terminal coding-agent runtime with built-in file, shell, search, codemode, subagent, MCP, web access, and Intercom tools. Extend it with TypeScript extensions, skills, prompt templates, themes, and Atomic packages.
7
+ Atomic is a terminal coding agent with built-in file, shell, search, codemode, subagent, MCP, web access, and Intercom tools. Extend it with TypeScript extensions, skills, prompt templates, themes, and Atomic packages.
9
8
 
10
9
  ## Quick start
11
10
 
12
- Install with a package manager (requires Node.js 22.19+):
11
+ Install with a package manager (requires Node.js 22.19+, or Bun 1.4.2+ for Bun installs):
13
12
 
14
13
  ```bash
15
14
  npm install -g @bastani/atomic
@@ -31,7 +30,7 @@ curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh
31
30
  irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
32
31
  ```
33
32
 
34
- The archive installer verifies the GitHub Release checksum and installs into a versioned directory. See [Release archive](/getting-started/installation#release-archive) for `ATOMIC_VERSION`, `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR`, `GITHUB_TOKEN`/`GH_TOKEN`, default paths, and `PATH` setup.
33
+ The archive installer verifies the GitHub Release checksum and installs into a versioned directory. See [Release archive](/getting-started/installation#release-archive) for version pinning, custom install paths, and `PATH` setup.
35
34
 
36
35
  Start Atomic in any project directory:
37
36
 
@@ -39,19 +38,19 @@ Start Atomic in any project directory:
39
38
  atomic
40
39
  ```
41
40
 
42
- Authenticate with `/login` for a subscription provider, or export an API key such as `ANTHROPIC_API_KEY` before launching. See [Quickstart](/quickstart) for the full first-run walkthrough.
43
-
44
- ## Documentation paths
45
-
46
- - **[Learn](/guides).** Install Atomic, complete your first session, and learn interactive commands, sessions, compaction, and providers.
47
- - **[Build](/build).** Extend Atomic with prompt templates, skills, subagents, Intercom, codemode, extensions, and packages, or embed it through the [SDK, RPC, or JSON mode](/programmatic).
48
- - **[Reference](/reference).** Look up CLI flags, settings, environment variables, keybindings, tools, storage, and API contracts.
41
+ Authenticate with `/login`, run `atomic auth login <provider>` in your shell, or export an API key such as `ANTHROPIC_API_KEY` before launching. See [Quickstart](/quickstart) for the full first-run walkthrough.
49
42
 
50
- ### First successful session
43
+ ## First successful session
51
44
 
52
45
  1. [Install Atomic](/getting-started/installation).
53
46
  2. [Authenticate a provider](/getting-started/authentication).
54
- 3. [Start your first session](/getting-started/first-session).
47
+ 3. [Run your first session](/getting-started/first-session).
55
48
  4. [Add project instructions](/getting-started/project-instructions).
56
- 5. [Learn interactive commands](/usage).
49
+ 5. [Use interactive mode](/usage).
57
50
  6. [Manage sessions](/sessions) and [compaction](/compaction).
51
+
52
+ ## Documentation paths
53
+
54
+ - **[Learn](/guides).** Install Atomic, run interactive and non-interactive sessions, manage context and snapshots, delegate work with subagents and Intercom, connect providers, and review security and containerization.
55
+ - **[Build](/build).** Customize Atomic with skills, prompt templates, themes, extensions, and packages, orchestrate agents, define custom providers, or embed Atomic through the [SDK, RPC, or JSON mode](/programmatic).
56
+ - **[Reference](/reference).** Look up CLI commands and flags, settings, environment variables, keybindings, tools, storage, customization schemas, API protocols, and platform setup.
@@ -1,43 +1,22 @@
1
1
  ---
2
- title: Intercom operations
3
- description: Connection states, delivery behavior, notifications, shortcuts, and recovery.
2
+ title: "Operate Intercom"
3
+ sidebarTitle: "Operations"
4
+ description: "Configure Intercom connections, multi-machine routing, broker upgrades, delivery recovery, and troubleshooting."
4
5
  ---
5
6
 
6
- # Intercom operations
7
+ This guide explains how Atomic sessions connect to the local Intercom broker, how delivery and multi-machine routing work, and how to diagnose connection or upgrade issues.
7
8
 
8
- ## Connection states and recovery
9
-
10
- Start with the state you can observe. The sections below explain each lifecycle and delivery rule in detail.
11
-
12
- | State | What you see | What to do |
13
- | --- | --- | --- |
14
- | Not connected or waiting for lazy admission | Interactive sessions join in the background a few seconds after startup, unless startup join is off or the folder is not trusted yet. Print (`-p`), JSON, RPC, SDK sessions, and sessions whose tool selection excludes `intercom` join only on first Intercom use or when launching a subagent with Intercom. Subagents launched with Intercom join as soon as their session starts. | Invoke an Intercom tool, `/intercom`, or ALT+M in that session. The broker starts on demand. See [How Connection Works](#how-connection-works). |
15
- | Recoverable disconnect | An explicit Intercom call or overlay action fails visibly while background recovery keeps running. | Wait for reconnect. Check the reported outcome before repeating a send, ask, or reply, and never automatically repeat an unknown outcome. See [How It Works](#how-it-works). |
16
- | Reconnect backoff | The session stays disconnected between reconnect attempts. | No action is needed to keep recovery moving. Retries wait 1, 2, 5, 10, then 30 seconds until the session connects or closes. See [How It Works](#how-it-works). |
17
- | Destination-side admission failure | A non-parent asker receives a correlated failed-ask message, or an inline error while waiting, instead of a reply. | Act on the destination error, then send again once the recipient can accept messages. See [Subagent Notifications](#subagent-notifications). |
18
- | Broker restart or concurrent startup | Sessions disappear briefly, or several sessions start Intercom at once. | Usually no action is needed. Clients reconnect automatically, and startup locking prevents duplicate brokers. See [How It Works](#how-it-works). |
19
- | Broker started by an older Atomic | After an upgrade, the first session on the newer version replaces the older broker; sessions briefly reconnect. If replacement fails, the session warns that it uses the older broker locally. | Usually nothing. If the warning appears, run `atomic intercom restart` when a brief reconnect is acceptable. See [Upgrading Atomic with sessions running](#upgrading-atomic-with-sessions-running). |
20
- | Broker accepts connections but stops answering | List or send requests time out. | Allow about a minute for automatic broker replacement, then reconnect backoff. A request timeout can add up to five seconds for a health check. Check the logs below if it repeats. See [How It Works](#how-it-works). |
21
- | Broker does not start | The startup or readiness error prints the broker log path and a bounded tail. | Read `~/.atomic/agent/intercom/broker.log`, or the Intercom directory under `ATOMIC_CODING_AGENT_DIR`. See [How It Works](#how-it-works). |
22
- | Half-closed peer or undeliverable send | The send returns `Session not found`; its message ID remains retryable. | Refresh the session list and retry after the target reconnects. See [How It Works](#how-it-works). |
23
- | Subagent that is starting | A send or ask to a starting, resuming, or relaunching background subagent waits for registration instead of returning `Session not found` (up to twice `sessionStartTimeoutMs` plus 2 minutes, capped at 1 hour; 20 seconds across nodes). If startup fails, the sender gets the failure reason. | Wait for the send to return. Run `subagent({ action: "status", id })` to inspect start progress. See [How It Works](#how-it-works). |
24
- | Subagent being restored after a restart | A send or ask to a restoring background subagent waits up to 20 seconds by name, Atomic session ID, or pre-restart Intercom ID. If it is still restoring after 20 seconds, the sender gets a retryable error; if it did not survive the restart, the sender is told it is gone. | Retry shortly if the subagent is still restoring, or launch a fresh subagent if it did not survive. See [How It Works](#how-it-works). |
25
- | Subagent that finished or was paused | A single-target `send` or `ask` from the `intercom` tool to a completed or failed subagent returns at once as queued and resumes the subagent. One to a paused or quit subagent queues without resuming until the launching session continues it ([Messages that resume a finished subagent](/intercom/reference#messages-that-resume-a-finished-subagent)). | Wait for the reply or result. If delivery fails later, you get one delivery failure and can resend if still needed. See [How It Works](#how-it-works). |
26
- | Subagent that ended or dropped off | A send or ask to a subagent that just disconnected waits up to 20 seconds for reconnection or an owner report. If not queued for resume, senders in its group receive a typed error (`recipient_completed`, `recipient_failed`, `recipient_stopped`, `recipient_cancelled`, or retryable `recipient_disconnected`); other groups get `Session not found` ([Subagents with no live session](/intercom/reference#subagents-with-no-live-session)). | Ask the launching session to resume the subagent, or launch a fresh subagent if it was cancelled. See [How It Works](#how-it-works). |
27
- | Subagent released while it waits | A send or ask to a [released subagent](/subagents#released-subagents) waits while its launching session wakes it (20 seconds default, up to 120 seconds on confirmed wake; 20 seconds across nodes). Failures set `reasonCode` (`recipient_not_restored`, `recipient_parked`, or retryable `recipient_owner_suspended`). | Retry shortly, or resume the subagent if it is paused or quit. Only the launching session owns its hold ([Released subagents](/intercom/reference#released-subagents)). See [How It Works](#how-it-works). |
28
- | Queued for an offline session | With [multi-node routing](#running-intercom-across-machines) on, a send, ask, or reply to a recently disconnected session returns at once as queued (`Message queued for <target>`, `target: "offline session"`). An ask returns without waiting. | Do not resend as a new message. The broker delivers it when that session reconnects on any host sharing the database. See [Offline sessions](#offline-sessions). |
29
-
30
- ## How Connection Works
9
+ ## How connection works
31
10
 
32
- An interactive session connects to Intercom in the background a few seconds after it starts, including new, resumed, or forked terminal sessions. Neither the initial render nor your first prompt waits for this connection. Once connected, other sessions in its group can list and message it immediately.
11
+ An interactive session connects to Intercom in the background 3 seconds after startup, including new, resumed, or forked terminal sessions. Neither the initial render nor your first prompt waits for this connection. Once connected, other sessions in its group can list and message it immediately.
33
12
 
34
- In an untrusted folder, an interactive session waits until you trust the folder or send the first prompt before joining. If the broker cannot be reached at startup, the session retries silently after 1, 2, 5, 10, and 30 seconds, then waits until your first Intercom use. It always registers with the same name and group it would use on first use.
13
+ In an untrusted folder, an interactive session waits until you trust the folder or send your first prompt before joining. If the broker cannot be reached at startup, the session retries silently up to 5 times (after 1, 2, 5, 10, and 30 seconds), then waits until your first Intercom use. It always registers with the same name and group it would use on first use.
35
14
 
36
- Non-interactive and restricted sessions connect lazily when you or the model invoke the `intercom` tool, `/intercom`, or ALT+M. This applies to print (`-p`), JSON, RPC, and SDK sessions, as well as interactive sessions whose tool selection excludes `intercom`. An interactive session also joins lazily when `joinAtStartup` is `false` in [Intercom configuration](/intercom/reference#configuration) or when `ATOMIC_INTERCOM_JOIN_AT_STARTUP=0` is set (`1` turns startup join back on). Any session connects immediately when it launches a subagent with Intercom so it can authorize supervisor contact.
15
+ Non-interactive and restricted sessions connect on first use when you or the model invoke the `intercom` tool, `/intercom`, or `Alt+M`. This applies to print (`-p`), JSON, RPC, and SDK sessions, as well as interactive sessions whose tool selection excludes `intercom`. An interactive session also waits for first use when `joinAtStartup` is `false` in [Intercom configuration](/intercom/reference#configuration) or when `ATOMIC_INTERCOM_JOIN_AT_STARTUP=0` (or `false`, case-insensitive; legacy alias `PI_INTERCOM_JOIN_AT_STARTUP`) is set (`1` or `true` turns startup join back on). Any session connects immediately when it launches a subagent with Intercom so it can authorize supervisor contact.
37
16
 
38
17
  A subagent launched with Intercom connects as soon as its session starts, before its first turn, regardless of `joinAtStartup`. It inherits the launching session's group unless the launch sets `group`.
39
18
 
40
- If registration cannot reach the broker, the start waits at `registering on Intercom` and retries after 1, 2, 5, and 10 seconds, then every 30 seconds. A start past `sessionStartTimeoutMs` counts as stalled and retries once before failing ([Background launches and waiting](/subagents#background-launches-and-waiting)). If the broker fails to spawn, the subagent start fails immediately with the broker's error.
19
+ If subagent registration cannot reach the broker, startup waits at `registering on Intercom` and retries after 1, 2, 5, and 10 seconds, then every 30 seconds. A start past `sessionStartTimeoutMs` counts as stalled and retries once before failing ([Background launches and waiting](/subagents#background-launches-and-waiting)). If the broker fails to spawn, the subagent start fails immediately with the broker's error.
41
20
 
42
21
  A session is connected to Intercom when all of these hold:
43
22
 
@@ -45,21 +24,21 @@ A session is connected to Intercom when all of these hold:
45
24
  - The local broker is running or can be started on demand.
46
25
  - At least one join trigger applies: an interactive session with `intercom` enabled, startup join on, and a trusted folder or started prompt; a subagent launched with Intercom; an explicit Intercom call or overlay action; or a subagent launch that uses Intercom.
47
26
 
48
- The session list and ALT+M picker display connected agent sessions, not every open Atomic process. Internal control connections never appear as recipients and do not affect session counts. Agent sessions remain visible and messageable while executing tools or waiting for human input.
27
+ The session list and `Alt+M` picker display connected agent sessions, not every open Atomic process. Internal control connections never appear as recipients and do not affect session counts. Agent sessions remain visible and messageable while executing tools or waiting for human input.
49
28
 
50
- Use `/name` to give sessions readable targets such as `planner` and `worker`. Unnamed sessions receive a runtime-only fallback alias like `subagent-chat-1a2b3c4d-1111-4222-8333-123456789abc` so peers can address them. That fallback alias is never saved as the session title, so `/resume` still displays the transcript preview.
29
+ Use `/name` to give sessions readable targets such as `planner` and `worker`. Unnamed sessions receive a runtime-only fallback alias of the form `subagent-chat-<id>` (stripping any leading `session-` prefix from the session ID) so peers can address them. That fallback alias is never saved as the session title, so `/resume` still displays the transcript preview.
51
30
 
52
31
  ### Troubleshooting initialization
53
32
 
54
- `Intercom heavy initialization failed; a later call will retry: ...` means initialization failed temporarily and will retry on a later Intercom call. Interactive sessions display this as a yellow warning in chat; print, JSON, and RPC sessions print console diagnostics. Terminal relay and cleanup failures appear as error notifications in interactive sessions.
33
+ If Intercom cannot start or connect its background client, Atomic logs `Intercom heavy initialization failed; a later call will retry: ...` and retries on a later Intercom call. Interactive sessions show this as a yellow warning in chat; print, JSON, and RPC sessions print console diagnostics. Terminal relay and cleanup failures appear as error notifications in interactive sessions.
55
34
 
56
- If initialization keeps failing, inspect the reported error and `~/.atomic/agent/intercom/broker.log` (or the Intercom directory under `ATOMIC_CODING_AGENT_DIR`). Never resend an operation whose delivery outcome was reported as unknown before checking with the recipient.
35
+ If initialization keeps failing, inspect the reported error and `~/.atomic/agent/intercom/broker.log` (or the Intercom directory under `ATOMIC_CODING_AGENT_DIR`). Never resend a message whose delivery outcome was reported as unknown before checking with the recipient.
57
36
 
58
37
  ### Upgrading Atomic with sessions running
59
38
 
60
- Sessions on one machine share one local broker, and that broker keeps running after you install a newer Atomic release. Run `atomic intercom status` to see the running broker's PID, connected session count, storage match, multi-node state, and protocol version.
39
+ Sessions on one machine share one local broker, and that broker keeps running after you install a newer Atomic release. Run `atomic intercom status` to inspect the running broker's PID, connected session count, storage match, multi-node state, and protocol version.
61
40
 
62
- - **Automatic handover.** When a session on a newer Atomic version finds an older compatible broker, it asks that broker to shut down, waits up to a minute for exit (older Windows brokers can take around 30 seconds with active sessions), and starts the new broker. Existing sessions reconnect automatically, keep their session IDs, and continue exchanging messages across versions.
41
+ - **Automatic handover.** When a session on a newer Atomic version finds an older compatible broker, it asks that broker to shut down, waits up to 1 minute for exit (older Windows brokers can take around 30 seconds with active sessions), and starts the new broker. Existing sessions reconnect automatically, keep their session IDs, and continue exchanging messages across versions.
63
42
  - **When replacement fails.** If the older broker does not stop, uses a different shared storage selection, or speaks an incompatible protocol, the session leaves it running. Without multi-node storage, the session shows one warning and runs locally on the existing broker; requests that need newer features fail with `IntercomBrokerProtocolError`. With multi-node storage configured, the session refuses to register with `IntercomRoutingUnavailableError` because it cannot verify cross-machine routing. Run `atomic intercom restart` to replace the broker in either case.
64
43
  - **Installer and update hook.** Installers and `atomic update` finish by running `atomic intercom upgrade`. It stops an older broker immediately when no sessions are connected, and leaves an active broker for the next newer session to hand over safely. You can run `atomic intercom upgrade` manually at any time (for example after `npm install -g`).
65
44
  - **Windows npm upgrades from 0.10.4 or earlier.** If `npm install -g @bastani/atomic` fails with `EBUSY` on `dist\builtin\intercom`, an earlier broker is still holding that directory as its working directory. Close running Atomic sessions, wait 5 seconds (or run `atomic intercom restart`), and re-run the update. From 0.10.5 onward, the broker runs outside the installation directory and does not block npm updates or uninstalls.
@@ -72,15 +51,15 @@ Atomic 0.10.0 removed workflows along with `workflow:<rootRunId>/...` stage targ
72
51
 
73
52
  Messages sent to a `workflow:<rootRunId>/...` target are not queued for unstarted stages and return `Session not found`. If a 0.9.x workflow run is still active on a 0.10.0+ broker, each started stage registers as an ordinary session in its `workflow:<runId>` group; join that group to reach the stage by its session ID or name.
74
53
 
75
- ## How It Works
54
+ ## How it works
76
55
 
77
56
  ### Broker lifecycle and retries
78
57
 
79
- The local broker starts on demand when the first session connects and exits after 5 seconds with no registered sessions. Clients reconnect automatically after 1, 2, 5, 10, and then 30 seconds while keeping explicit connection errors visible.
58
+ The local broker starts on demand when the first session connects and exits automatically 5 seconds after its last session disconnects. Clients reconnect automatically after 1, 2, 5, 10, and then 30 seconds while keeping explicit connection errors visible.
80
59
 
81
60
  A built-in watchdog terminates an unresponsive broker if it stops answering health checks for about a minute, allowing clients to spawn a replacement. A single slow request does not trigger replacement, and an OS-suspended process cannot run its own watchdog. If a broker remains stuck, verify which process owns it before stopping it manually.
82
61
 
83
- For `send`, `ask`, and `reply`, the `intercom` tool manages reconnect recovery internally. Each call makes one initial attempt plus up to three retries (waiting 1, 2, and 5 seconds) within an 11-minute operation deadline. Retries preserve the message ID, arguments, attachments, and reply thread. Caller-supplied `retryToken` arguments are rejected without sending; each new tool call is a fresh operation.
62
+ For `send`, `ask`, and `reply`, the `intercom` tool manages reconnect recovery internally. Each call makes one initial attempt plus up to three retries (waiting 1, 2, and 5 seconds) within an 11-minute operation deadline. Retries preserve the message ID, arguments, attachments, and reply thread; each new tool call is a fresh operation.
84
63
 
85
64
  If initialization fails before delivery starts, the tool returns `outcome: "not_sent"`. Only recoverable disconnects trigger retries; unrelated errors stop immediately. Cancelling a call stops further retries without undoing an already accepted delivery.
86
65
 
@@ -94,39 +73,38 @@ If the recipient does not confirm the save within about 8 seconds, the sender re
94
73
 
95
74
  Intercom refuses new deliveries when it cannot safely track duplicates (such as storage or capacity failures). Do not delete Intercom database files to force a resend when an outcome is unknown.
96
75
 
97
- Custom SDK hosts can optionally pass `recipientPurpose` (`"agent"` or `"control"`) when registering a session; omitting it defaults to `"agent"`. Invalid values are rejected, and a session's purpose cannot change after registration.
98
-
99
76
  ### Local files, logs, and locks
100
77
 
101
78
  Configuration, logs, and local queues live in `~/.atomic/agent/intercom/` (or under `ATOMIC_CODING_AGENT_DIR`, falling back to `PI_CODING_AGENT_DIR`). Edit `config.json` to change [Intercom settings](/intercom/reference#configuration).
102
79
 
103
80
  - **Logs.** Read `broker.log` when startup fails; ordinary diagnostics are capped at 8 KiB per broker. The previous broker's log is kept in `broker.log.previous`, and `broker-watchdog.log` records the latest watchdog termination's time, PID, and reason. Keep these files when reporting stalls.
104
81
  - **Local queues and deduplication.** `delivered-messages.sqlite` tracks recently delivered message IDs across restarts, and `ended-child-queue.sqlite` stores queued messages for finished or paused subagents ([Across restarts](/intercom/reference#across-restarts)). Both are created when the first session registers. Do not delete them while troubleshooting delivery outcomes.
105
- - **Session teardown.** Disposing a session cancels any unstarted broker spawn and waits for a broker it already launched to finish starting. Once `dispose()` resolves, the session makes no further writes to the agent directory. On Windows, a running broker keeps `broker.log` open until it exits about 5 seconds after its last session disconnects.
82
+ - **Session teardown.** Disposing a session cancels any unstarted broker spawn and waits for a broker it already launched to finish starting. Once `dispose()` resolves, the session makes no further writes to the agent directory. On Windows, a running broker keeps `broker.log` open until its 5-second idle exit completes.
106
83
  - **Unchecked startup locks.** If startup encounters a lock held by a process Atomic cannot inspect (for example on a shared filesystem, across containers, or owned by another user), Atomic leaves the lock untouched. After 30 seconds it logs the lock path and recovery steps. Confirm that no process on any host sharing the directory still needs the files before removing them, and never remove the SQLite database files.
107
84
 
108
- ## Subagent Notifications
85
+ ## Subagent notifications
109
86
 
110
87
  Intercom delivers subagent results and control notices from the [subagent runtime](/subagents) back to the launching session.
111
88
 
112
89
  ### Subagent control notices
113
90
 
114
- The `subagent` tool's `control` options choose which activity notices reach the parent and over which channels:
91
+ The `subagent` tool's `control` options (or `control` in `~/.atomic/agent/extensions/subagent/config.json`) configure when activity notices fire and where they go:
115
92
 
93
+ - **`needsAttentionAfterMs`.** Defaults to `60000` (1 minute without observed activity).
94
+ - **`activeNoticeAfterMs`.** Defaults to `240000` (4 minutes elapsed while active).
95
+ - **`failedToolAttemptsBeforeAttention`.** Defaults to `3` consecutive mutating-tool failures.
116
96
  - **`notifyOn`.** Defaults to `["active_long_running", "needs_attention"]`.
117
97
  - **`notifyChannels`.** Defaults to `["event", "intercom"]`.
118
98
 
119
- Run results report each subagent's Intercom target as `Run intercom target` or `Previous intercom target`; a target may no longer be live after completion. Call `intercom({ action: "status" })` before launching subagents if you want to verify your connection and group memberships.
99
+ Run results report each subagent's Intercom target as `Run intercom target` or `Previous intercom target`; a target may no longer be live after completion. Call `intercom({ action: "status" })` before launching subagents to verify your connection and group memberships.
120
100
 
121
101
  Subagents launched with Intercom connect before their first turn and inherit the launching session's group unless the launch sets `group`. Fresh subagents still receive Intercom even when an extension allowlist omits it.
122
102
 
123
103
  ### Delivery ordering
124
104
 
125
- In normal task-host runs, both single-child and parallel launches run in the background without cancelling siblings. An `intercom` `ask` returns at delivery and delivers its reply later as a message in the same child. A `contact_supervisor` decision or interview waits only in the requesting child and continues that same execution when answered. Sends and progress updates are non-blocking.
126
-
127
- Only a direct single-child launch in an SDK session without a task host retains the terminal `[TASK_CONTEXT]` fresh-child handoff when a blocking parent request is claimed.
105
+ In standard interactive and background sessions, single and parallel subagent launches run without cancelling siblings. An `intercom` `ask` returns at delivery and delivers its reply later as a message in the same subagent. A `contact_supervisor` decision or interview waits only in the requesting subagent and continues that same subagent when answered. Sends and progress updates never block. (Only a direct single-child launch in an embedded SDK session without background task management uses the terminal `[TASK_CONTEXT]` handoff when a blocking supervisor request is claimed.)
128
106
 
129
- Queued messages from a child arrive before its completion notice. Delivery retries never rerun work or alter its outcome. Messages from one sender arrive in order whether admitted immediately or queued until the recipient is idle.
107
+ Queued messages from a subagent arrive before its completion notice. Delivery retries never rerun work or alter its outcome. Messages from one sender arrive in order whether delivered immediately or queued until the recipient is idle.
130
108
 
131
109
  ## Running Intercom across machines
132
110
 
@@ -136,7 +114,7 @@ By default, each machine's broker serves only sessions on that machine. With mul
136
114
 
137
115
  For a team, run `atomic team join <url> --token-file <path>` to configure the team database for Intercom while keeping session transcripts local and restarting the broker. CI runners use `ATOMIC_PROFILE=ci` instead. See [Team and CI setup](/guides/team-setup).
138
116
 
139
- To configure multi-node routing manually, give every machine the same top-level `storage` selection and `prefix`, using a [storage adapter](/storage#selecting-an-adapter) that implements `openDatabase` and connects to a shared database ([Sharing storage across hosts](/storage#sharing-storage-across-hosts)). Install the adapter on every machine, for example as an [Atomic package](/storage#adapters-from-atomic-packages). Both npm installations and standalone binaries support multi-node routing.
117
+ To configure multi-node routing manually, give every machine the same top-level `storage` selection and `prefix`, using a database-backed [storage adapter](/storage#selecting-an-adapter) (such as SQLite, libSQL, or PostgreSQL) connected to a shared database ([Sharing storage across hosts](/storage#sharing-storage-across-hosts)). Install the adapter on every machine, for example as an [Atomic package](/storage#adapters-from-atomic-packages). Both npm installations and standalone binaries support multi-node routing.
140
118
 
141
119
  The broker reads its storage selection from:
142
120
 
@@ -160,18 +138,22 @@ Each broker logs `Intercom multi-node routing is on (adapter <adapter>, prefix <
160
138
 
161
139
  - No global or process-level `storage` is configured (project `.atomic/settings.json`, `sessions.storage`, and `ATOMIC_SESSIONS_STORAGE` do not enable multi-node routing).
162
140
  - Storage is in memory (`{ "memory": true }` or `{ "path": ":memory:" }`).
163
- - The adapter implements only `openSessionStore` without `openDatabase`.
141
+ - The storage adapter stores only session files and does not provide shared database tables.
164
142
  - The selection is invalid (such as a missing `env` secret or an unloadable adapter package).
165
143
 
166
144
  A local `path` selection shares only among brokers on the same machine opening the same file. Never place a local SQLite file on a network filesystem. Brokers using different `prefix` values cannot see each other's sessions, allowing one database to isolate separate teams or tenants.
167
145
 
168
146
  ### Project groups
169
147
 
170
- When multi-node routing is on, sessions without an explicit group join `project:<owner>/<repo>` instead of `default`. The name comes from the repository's `origin` remote, falling back to the repository directory name when there is no `origin`, or the working directory name outside Git. This prevents sessions from different repositories on a shared database from accidentally messaging each other.
148
+ When multi-node routing is on, sessions without an explicit group join `project:<path>` instead of `default`. This prevents sessions from different repositories on a shared database from accidentally messaging each other.
171
149
 
172
- Explicit groups still take precedence: an inherited subagent group, an SDK host policy, `ATOMIC_INTERCOM_GROUP`, or `group` in `config.json`. Joining `default` explicitly while multi-node routing is on prints a warning (in the UI or once on stderr for non-interactive runs) because every teammate sharing the database can message `default`. Running sessions keep their current group until restarted or reloaded.
150
+ How the project group name is derived:
173
151
 
174
- Inside a Git repository, Intercom runs `git` to inspect `origin`. If Git is missing or fails, Intercom fails startup with `ProjectGroupError` until you install Git, fix the repository error, or set `ATOMIC_INTERCOM_GROUP` to bypass the lookup.
152
+ - **Git detection.** Atomic walks up ancestor directories looking for `.git` without spawning `git`. Outside a Git repository, it uses the working directory's base name (`project:<dirname>`) and never runs `git`, so missing Git does not fail outside a Git repo.
153
+ - **Remote URL path and casing.** Inside a Git repository, Atomic runs `git` to inspect `origin`, falling back to the repository directory name when no `origin` is configured. All path segments are preserved (so nested paths such as `https://gitlab.com/org/team/repo.git` become `project:org/team/repo`). **Casing from the remote URL is preserved verbatim** (`project:Owner/Repo` and `project:owner/repo` are different groups). Make sure teammates configure matching casing on their `origin` URLs or set `ATOMIC_INTERCOM_GROUP`.
154
+ - **Missing or broken Git inside a repo.** If `.git` exists but `git` is missing or fails, Intercom fails startup with `ProjectGroupError` until you install Git, fix the repository error, or set `ATOMIC_INTERCOM_GROUP` to bypass the lookup.
155
+
156
+ Explicit groups take precedence over the project group: an inherited subagent group, an SDK host policy, `ATOMIC_INTERCOM_GROUP`, or `group` in `config.json`. Joining `default` explicitly while multi-node routing is on prints a warning (in the UI or once on stderr for non-interactive runs) because every teammate sharing the database can message `default`. Running sessions keep their current group until restarted or reloaded.
175
157
 
176
158
  Before registering, each session verifies the running broker's routing mode so a session never accidentally joins `default` on a multi-node broker or runs locally when shared storage was requested. If the running broker's storage disagrees with the session (for example after switching `storage` or `ATOMIC_PROFILE=ci`), run `atomic intercom restart` and restart the session. For `ProjectGroupError` and the `IntercomRouting*Error` classes (`IntercomRoutingMismatchError`, `IntercomRoutingUnavailableError`, `IntercomRoutingTimeoutError`, `IntercomRoutingChangedError`), see [Routing and project-group errors](/intercom/reference#routing-and-project-group-errors).
177
159
 
@@ -182,7 +164,7 @@ Sessions connected to brokers on other machines appear in `intercom list` and be
182
164
  - `send`, `ask`, and `reply` keep sender identity, reply threads, and save-confirmed `delivered` receipts.
183
165
  - Group isolation and [return paths](/intercom/reference#answering-a-sender-outside-your-groups) enforce the same rules across machines.
184
166
  - Supervisor traffic from `contact_supervisor` preserves supervisor routing.
185
- - Holds for restoring or released subagents work across machines with the same error codes ([Connection states and recovery](#connection-states-and-recovery)).
167
+ - Routing holds for restoring or released subagents work across machines with the same error codes ([Connection states and recovery](#connection-states-and-recovery)).
186
168
  - Retry deduplication prevents duplicate delivery across nodes.
187
169
 
188
170
  If a local session and a remote session share the same name, name lookup prefers the local session. Use distinct session names or address remote peers by session ID.
@@ -220,7 +202,7 @@ When a machine or broker stops abruptly, its sessions still look connected for u
220
202
 
221
203
  - Run `atomic storage status` on both machines to verify they use the exact same `storage` selection and `prefix`, and that each broker reports `storage: matches the selection above`. Run `atomic intercom restart` if a broker started before a settings change.
222
204
  - Run `atomic intercom status` or inspect `broker.log` for `Intercom multi-node routing is on`, `off`, or `unavailable`. Remember that a local `path` selection only reaches brokers on the same machine.
223
- - Confirm the remote session has actually joined Intercom (for non-interactive or lazy sessions, call `intercom({ action: "status" })` once) and shares a group with your session.
205
+ - Confirm the remote session has actually joined Intercom (for non-interactive or first-use sessions, call `intercom({ action: "status" })` once) and shares a group with your session (check remote URL casing if using `project:<path>` groups).
224
206
  - If the database is temporarily slow, `intercom list` falls back to local sessions after 2 seconds; retry shortly.
225
207
 
226
208
  **A send stays queued.** The recipient is offline. It receives the message when the same Atomic session reconnects with the same home group on a host using the same storage and prefix.
@@ -231,24 +213,44 @@ On startup failure, the broker logs `Intercom multi-node routing is unavailable:
231
213
 
232
214
  **A cross-machine ask never gets an answer.** If the remote recipient disconnects before answering, the asker is not notified and the ask stays pending. Cancel it with `intercom({ action: "cancel", askId })` and ask again once the recipient returns.
233
215
 
234
- ## Keyboard Shortcuts
216
+ ## Connection states and recovery
217
+
218
+ Use this table to diagnose what you observe in chat, `/intercom`, or tool responses:
219
+
220
+ | State | What you see | What to do |
221
+ | --- | --- | --- |
222
+ | Not connected yet (connects on first use) | Interactive sessions join 3 seconds after startup unless startup join is off or the folder is untrusted. Print (`-p`), JSON, RPC, SDK sessions, and sessions excluding `intercom` join only on first use or when launching a subagent with Intercom. Subagents join as soon as their session starts. | Invoke an Intercom tool, `/intercom`, or `Alt+M` in that session. The broker starts on demand. See [How connection works](#how-connection-works). |
223
+ | Recoverable disconnect | An explicit Intercom call or overlay action fails visibly while background recovery keeps running. | Wait for reconnect. Check the reported outcome before repeating a send, ask, or reply, and never automatically repeat an unknown outcome. See [How it works](#how-it-works). |
224
+ | Reconnect backoff | The session stays disconnected between reconnect attempts. | No action is needed. Retries wait 1, 2, 5, 10, then 30 seconds until the session connects or closes. See [How it works](#how-it-works). |
225
+ | Recipient refused the message | A non-parent asker receives a correlated failed-ask message, or an inline error while waiting, instead of a reply. | Act on the destination error, then send again once the recipient can accept messages. See [Subagent notifications](#subagent-notifications). |
226
+ | Broker restart or concurrent startup | Sessions disappear briefly, or several sessions start Intercom at once. | Usually no action is needed. Clients reconnect automatically, and startup locking prevents duplicate brokers. See [How it works](#how-it-works). |
227
+ | Broker started by an older Atomic | After an upgrade, the first session on the newer version replaces the older broker; sessions briefly reconnect. If replacement fails, the session warns that it uses the older broker locally. | Usually nothing. If the warning appears, run `atomic intercom restart` when a brief reconnect is acceptable. See [Upgrading Atomic with sessions running](#upgrading-atomic-with-sessions-running). |
228
+ | Broker accepts connections but stops answering | List or send requests time out. | Allow about a minute for automatic broker replacement, then reconnect backoff. A request timeout can add up to 5 seconds for a health check. Check `broker.log` if it repeats. See [How it works](#how-it-works). |
229
+ | Broker does not start | The startup or readiness error prints the broker log path and a bounded tail. | Read `~/.atomic/agent/intercom/broker.log`, or the Intercom directory under `ATOMIC_CODING_AGENT_DIR`. See [How it works](#how-it-works). |
230
+ | Peer disconnected unexpectedly | The send returns `Session not found`; its message ID remains retryable. | Refresh the session list and retry after the target reconnects. See [How it works](#how-it-works). |
231
+ | Subagent that is starting | A send or ask to a starting, resuming, or relaunching background subagent waits for registration instead of returning `Session not found` (up to twice `sessionStartTimeoutMs` plus 2 minutes, capped at 1 hour; 20 seconds across nodes). If startup fails, the sender gets the failure reason. | Wait for the send to return. Run `subagent({ action: "status", id })` to inspect start progress. See [How it works](#how-it-works). |
232
+ | Subagent being restored after a restart | A send or ask to a restoring background subagent waits up to 20 seconds by name, Atomic session ID, or pre-restart Intercom ID. If it is still restoring after 20 seconds, the sender gets a retryable error; if it did not survive the restart, the sender is told it is gone. | Retry shortly if the subagent is still restoring, or launch a fresh subagent if it did not survive. See [How it works](#how-it-works). |
233
+ | Subagent that finished or was paused | A single-target `send` or `ask` from the `intercom` tool to a completed or failed subagent returns at once as queued and resumes the subagent. One to a paused or quit subagent queues without resuming until the launching session continues it ([Messages that resume a finished subagent](/intercom/reference#messages-that-resume-a-finished-subagent)). | Wait for the reply or result. If delivery fails later, you get one delivery failure and can resend if still needed. See [How it works](#how-it-works). |
234
+ | Subagent that ended or dropped off | A send or ask to a subagent that just disconnected waits up to 20 seconds for reconnection or an owner report. If not queued for resume, senders in its group receive a typed error (`recipient_completed`, `recipient_failed`, `recipient_stopped`, `recipient_cancelled`, or retryable `recipient_disconnected`); other groups get `Session not found` ([Subagents with no live session](/intercom/reference#subagents-with-no-live-session)). | Ask the launching session to resume the subagent, or launch a fresh subagent if it was cancelled. See [How it works](#how-it-works). |
235
+ | Subagent released while it waits | A send or ask to a [released subagent](/subagents#released-subagents) waits while its launching session wakes it (20 seconds default, up to 120 seconds on confirmed wake; 20 seconds across nodes). Failures set `reasonCode` (`recipient_not_restored`, `recipient_parked`, or retryable `recipient_owner_suspended`). | Retry shortly, or resume the subagent if it is paused or quit. Only the launching session owns its hold ([Released subagents](/intercom/reference#released-subagents)). See [How it works](#how-it-works). |
236
+ | Queued for an offline session | With [multi-node routing](#running-intercom-across-machines) on, a send, ask, or reply to a recently disconnected session returns at once as queued (`Message queued for <target>`, `target: "offline session"`). An ask returns without waiting. | Do not resend as a new message. The broker delivers it when that session reconnects on any host sharing the database. See [Offline sessions](#offline-sessions). |
237
+
238
+ ## Keyboard shortcuts
235
239
 
236
240
  | Key | Action |
237
241
  | --- | --- |
238
- | ALT+M | Open session list overlay |
239
- | ↑/↓ | Navigate session list |
240
- | Enter | Select session or send message |
241
- | Escape | Cancel or close overlay |
242
+ | `Alt+M` | Open session list overlay |
243
+ | `↑`/`↓` | Navigate session list |
244
+ | `Enter` | Select session or send message |
245
+ | `Esc` | Cancel or close overlay |
242
246
 
243
247
  ## Limitations
244
248
 
245
249
  - **Local broker sockets.** Each session connects to the broker on its own machine over local sockets or pipes. Cross-machine delivery requires a shared storage database ([Running Intercom across machines](#running-intercom-across-machines)).
246
250
  - **No separate Intercom log.** Messages live in each session's history rather than a dedicated inbox or transcript file.
247
- - **No attachment picker in the overlay.** `file`, `snippet`, and `context` attachments work through the `intercom` tool and protocol, not the ALT+M compose overlay.
251
+ - **No attachment picker in the overlay.** `file`, `snippet`, and `context` attachments work through the `intercom` tool and protocol, not the `Alt+M` compose overlay.
248
252
  - **Only connected sessions appear.** `intercom list` and the overlay show sessions connected to the broker, not every open Atomic process.
249
- - **On-demand broker lifecycle.** The broker starts when the first session connects and exits after 5 seconds idle; sessions reconnect automatically if it restarts.
250
253
  - **Unsaved sessions.** A session started with `--no-session` keeps received messages only in memory, so unread messages are lost if it exits.
251
- - **Paused or quit subagents.** Single-target messages from `intercom` to a paused or quit subagent queue durably across broker restarts without resuming it, waiting until the launching session continues it. Queued messages fail once if the subagent is cancelled, or if the launching session ends or stays away for 7 days in a row. Pattern sends and older clients do not queue and get `recipient_stopped` or `Session not found` ([Run control](/subagents#run-control)).
252
- - **Subagents whose launching session is not running.** Live and restoring holds apply while the launching session is open or after it reported the subagent. Messages from `intercom` to reported completed, failed, paused, or quit subagents queue durably in `ended-child-queue.sqlite` or shared storage for up to 7 days while that session is away. Unreported or expired subagents return `Session not found` unless multi-node offline queueing applies. Unrestored holds end on disconnect, or after 60 seconds in hosts without recovery such as `atomic -p`.
254
+ - **Subagent queues when the launching session is away.** Routing holds for starting or restoring subagents apply while the launching session is open (ending on disconnect, or after 60 seconds in single-run modes without recovery such as `atomic -p`). Messages to reported completed, failed, paused, or quit subagents queue durably in `ended-child-queue.sqlite` or shared storage for up to 7 days while the launching session is away; pattern sends and older clients do not queue ([Run control](/subagents#run-control)).
253
255
  - **Released subagent asks on the local broker.** With multi-node routing on, replies from another machine survive broker restarts for asks sent to remote peers. Questions asked of a session on the subagent's own local broker are kept only by that broker, so a broker restart delivers a timeout to the subagent ([Released subagents](/intercom/reference#released-subagents)).
254
- - **Offline session queueing scope.** With [multi-node routing](#running-intercom-across-machines) on, sends to a session that disconnected within about 7 days (including a subagent session) queue for its return instead of returning `Session not found`, unless an active subagent hold or ended-subagent queue handles them first ([Offline sessions](#offline-sessions)).
256
+ - **Offline session queueing precedence.** With [multi-node routing](#running-intercom-across-machines) on, sends to a session that disconnected within about 7 days (including a subagent session) queue for its return instead of returning `Session not found`, unless an active subagent hold or ended-subagent queue handles them first ([Offline sessions](#offline-sessions)).