@bastani/atomic 0.10.14-alpha.1 → 0.10.15-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 (341) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
  6. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
  7. package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
  8. package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
  9. package/dist/_shared/runtime-O4KCSG4C.js +2 -2
  10. package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
  11. package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
  12. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  13. package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
  14. package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
  15. package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
  16. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
  17. package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
  18. package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
  19. package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
  20. package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
  21. package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
  22. package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
  23. package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
  24. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  25. package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
  26. package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
  27. package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
  28. package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
  29. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  30. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  31. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  32. package/dist/builtin/intercom/package.json +1 -1
  33. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  34. package/dist/builtin/mcp/package.json +1 -1
  35. package/dist/builtin/subagents/package.json +1 -1
  36. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  37. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  38. package/dist/builtin/web-access/package.json +1 -1
  39. package/dist/cli/auth-cli.code.js +1 -1
  40. package/dist/cli/auth-cli.impl.js +3 -3
  41. package/dist/cli/auth-cli.js +3 -3
  42. package/dist/cli/blueprint-command.impl.js +3 -3
  43. package/dist/cli/blueprint-command.js +3 -3
  44. package/dist/cli/intercom-command.code.js +3 -3
  45. package/dist/cli/intercom-command.impl.js +3 -3
  46. package/dist/cli/intercom-command.js +3 -3
  47. package/dist/cli/list-models.impl.js +3 -3
  48. package/dist/cli/list-models.js +3 -3
  49. package/dist/cli/session-picker.code.js +1 -1
  50. package/dist/cli/session-picker.impl.js +3 -3
  51. package/dist/cli/session-picker.js +3 -3
  52. package/dist/cli/startup-ui.code.js +1 -1
  53. package/dist/cli/startup-ui.impl.js +3 -3
  54. package/dist/cli/startup-ui.js +3 -3
  55. package/dist/cli/storage-command.impl.js +3 -3
  56. package/dist/cli/storage-command.js +3 -3
  57. package/dist/cli/storage-search-session.code.js +1 -1
  58. package/dist/cli/storage-search-session.impl.js +3 -3
  59. package/dist/cli/storage-search-session.js +3 -3
  60. package/dist/cli/team-command.code.js +1 -1
  61. package/dist/cli/team-command.impl.js +3 -3
  62. package/dist/cli/team-command.js +3 -3
  63. package/dist/cli.js +2 -2
  64. package/dist/core/compaction/compactor.d.ts +0 -8
  65. package/dist/core/debug.impl.js +3 -3
  66. package/dist/core/debug.js +3 -3
  67. package/dist/core/export-html/card-projection.impl.js +3 -3
  68. package/dist/core/export-html/card-projection.js +3 -3
  69. package/dist/core/export-html/index.code.js +2 -2
  70. package/dist/core/export-html/index.impl.js +3 -3
  71. package/dist/core/export-html/index.js +3 -3
  72. package/dist/core/export-html/json-spans.impl.js +3 -3
  73. package/dist/core/export-html/json-spans.js +3 -3
  74. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  75. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  76. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  77. package/dist/core/export-html/tool-renderer.js +3 -3
  78. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  79. package/dist/core/extensions/jiti-loader.js +3 -3
  80. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  81. package/dist/core/extensions/jiti-static-loader.js +3 -3
  82. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  83. package/dist/core/extensions/loader-host-modules.js +3 -3
  84. package/dist/core/intercom-broker-control-host.code.js +1 -1
  85. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  86. package/dist/core/intercom-broker-control-host.js +3 -3
  87. package/dist/core/intercom-broker-control.code.js +2 -2
  88. package/dist/core/intercom-broker-control.impl.js +3 -3
  89. package/dist/core/intercom-broker-control.js +3 -3
  90. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  91. package/dist/core/package-manager-storage-adapters.js +3 -3
  92. package/dist/core/sdk.code.js +1 -1
  93. package/dist/core/sdk.impl.js +3 -3
  94. package/dist/core/sdk.js +3 -3
  95. package/dist/core/session-manager-core.js +3 -3
  96. package/dist/core/session-manager-list.impl.js +3 -3
  97. package/dist/core/session-manager-list.js +3 -3
  98. package/dist/core/session-manager.impl.js +3 -3
  99. package/dist/core/session-manager.js +3 -3
  100. package/dist/core/session-storage.impl.js +3 -3
  101. package/dist/core/session-storage.js +3 -3
  102. package/dist/core/storage/index.js +2 -2
  103. package/dist/core/storage/node-sqlite-thread.js +2 -2
  104. package/dist/core/storage/node-sqlite.js +2 -2
  105. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  106. package/dist/core/storage/offline-snapshot-file.js +3 -3
  107. package/dist/core/storage/provider.js +2 -2
  108. package/dist/core/storage/selection.js +2 -2
  109. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  110. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  111. package/dist/core/storage/session/branch-fork-source.js +3 -3
  112. package/dist/core/storage/session/card-view.impl.js +3 -3
  113. package/dist/core/storage/session/card-view.js +3 -3
  114. package/dist/core/storage/session/child-reader.code.js +2 -2
  115. package/dist/core/storage/session/child-reader.impl.js +3 -3
  116. package/dist/core/storage/session/child-reader.js +3 -3
  117. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  118. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  119. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  120. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  121. package/dist/core/storage/session/expanded-child-details.js +3 -3
  122. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  123. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  124. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  125. package/dist/core/storage/session/fork-row-index.js +3 -3
  126. package/dist/core/storage/session/fork-staging.code.js +1 -1
  127. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  128. package/dist/core/storage/session/fork-staging.js +3 -3
  129. package/dist/core/storage/session/fork-window.code.js +2 -2
  130. package/dist/core/storage/session/fork-window.impl.js +3 -3
  131. package/dist/core/storage/session/fork-window.js +3 -3
  132. package/dist/core/storage/session/history-pages.impl.js +3 -3
  133. package/dist/core/storage/session/history-pages.js +3 -3
  134. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  135. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  136. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  137. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  138. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  139. package/dist/core/storage/session/memory-session-store.js +3 -3
  140. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  141. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  142. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  143. package/dist/core/storage/session/released-history-files.code.js +1 -1
  144. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  145. package/dist/core/storage/session/released-history-files.js +3 -3
  146. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  147. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  148. package/dist/core/storage/session/session-resume.impl.js +3 -3
  149. package/dist/core/storage/session/session-resume.js +3 -3
  150. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  151. package/dist/core/storage/session/snapshot-cut.js +3 -3
  152. package/dist/core/storage/session/snapshot-history.code.js +2 -2
  153. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  154. package/dist/core/storage/session/snapshot-history.js +3 -3
  155. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  156. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  157. package/dist/core/storage/session/sql-session-store.js +3 -3
  158. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  159. package/dist/core/storage/session/tree-outline.js +3 -3
  160. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  161. package/dist/core/storage/session/tree-presentation.js +3 -3
  162. package/dist/core/storage/storage-status.impl.js +3 -3
  163. package/dist/core/storage/storage-status.js +3 -3
  164. package/dist/core/storage/team.impl.js +3 -3
  165. package/dist/core/storage/team.js +3 -3
  166. package/dist/core/structured-output/index.code.js +1 -1
  167. package/dist/core/structured-output/index.impl.js +3 -3
  168. package/dist/core/structured-output/index.js +3 -3
  169. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  170. package/dist/core/tasks/task-completion-entry.js +3 -3
  171. package/dist/core/tasks/task-file-history.code.js +2 -2
  172. package/dist/core/tasks/task-file-history.impl.js +3 -3
  173. package/dist/core/tasks/task-file-history.js +3 -3
  174. package/dist/core/tasks/task-reference-archive.code.js +2 -2
  175. package/dist/core/tasks/task-reference-archive.js +3 -3
  176. package/dist/core/tasks/task-reference-identity.js +3 -3
  177. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  178. package/dist/core/tasks/task-reference-stream.js +3 -3
  179. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  180. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  181. package/dist/core/tasks/task-view-source.impl.js +3 -3
  182. package/dist/core/tasks/task-view-source.js +3 -3
  183. package/dist/core/tools/read-url.impl.js +3 -3
  184. package/dist/core/tools/read-url.js +3 -3
  185. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  186. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  187. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  188. package/dist/core/worktree-snapshot/errors.js +3 -3
  189. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  190. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  191. package/dist/extensions/codemode/execute.impl.js +3 -3
  192. package/dist/extensions/codemode/execute.js +3 -3
  193. package/dist/extensions/codemode/renderer.impl.js +3 -3
  194. package/dist/extensions/codemode/renderer.js +3 -3
  195. package/dist/extensions/mcp/cli.code.js +1 -1
  196. package/dist/extensions/mcp/cli.impl.js +3 -3
  197. package/dist/extensions/mcp/cli.js +3 -3
  198. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  199. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  200. package/dist/extensions/mcp/cli.lazy.js +3 -3
  201. package/dist/extensions/mcp/runtime.code.js +1 -1
  202. package/dist/extensions/mcp/runtime.impl.js +3 -3
  203. package/dist/extensions/mcp/runtime.js +3 -3
  204. package/dist/index.d.ts +21 -1
  205. package/dist/index.js +2 -2
  206. package/dist/main-first-time-setup.code.js +1 -1
  207. package/dist/main-first-time-setup.impl.js +3 -3
  208. package/dist/main-first-time-setup.js +3 -3
  209. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  210. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  211. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  212. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  213. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  214. package/dist/modes/print-mode.js +1 -1
  215. package/dist/package-manager-cli.code.js +2 -2
  216. package/dist/package-manager-cli.impl.js +3 -3
  217. package/dist/package-manager-cli.js +3 -3
  218. package/dist/startup-files.json +1 -1
  219. package/dist/startup-stages/6.js +1 -1
  220. package/dist/utils/startup-database-spare.code.js +1 -1
  221. package/dist/utils/startup-database-spare.impl.js +3 -3
  222. package/dist/utils/startup-database-spare.js +3 -3
  223. package/dist/utils/tools-manager.impl.js +3 -3
  224. package/dist/utils/tools-manager.js +3 -3
  225. package/docs/background-tasks/reference.md +182 -0
  226. package/docs/background-tasks.md +98 -405
  227. package/docs/build.md +67 -27
  228. package/docs/changelog.mdx +9 -0
  229. package/docs/codemode.md +108 -39
  230. package/docs/compaction/branch-summaries.md +54 -0
  231. package/docs/compaction/custom-compactors.md +161 -0
  232. package/docs/compaction/memory-compaction.md +77 -0
  233. package/docs/compaction/reference.md +86 -38
  234. package/docs/compaction.md +51 -252
  235. package/docs/computer-use.md +169 -321
  236. package/docs/containerization.md +71 -57
  237. package/docs/custom-provider/api-reference.md +119 -25
  238. package/docs/custom-provider/oauth.md +114 -132
  239. package/docs/custom-provider/override.md +37 -27
  240. package/docs/custom-provider/registration.md +107 -83
  241. package/docs/custom-provider/streaming.md +85 -71
  242. package/docs/custom-provider.md +85 -52
  243. package/docs/development.md +39 -29
  244. package/docs/docs.json +76 -63
  245. package/docs/environment-variables.md +94 -44
  246. package/docs/extensions/api-reference.md +86 -43
  247. package/docs/extensions/authoring.md +162 -154
  248. package/docs/extensions/events.md +80 -25
  249. package/docs/extensions/examples.md +90 -85
  250. package/docs/extensions/ui.md +206 -82
  251. package/docs/extensions.md +79 -108
  252. package/docs/getting-started/authentication.md +67 -36
  253. package/docs/getting-started/first-session.md +53 -43
  254. package/docs/getting-started/installation.md +116 -89
  255. package/docs/getting-started/project-instructions.md +48 -34
  256. package/docs/guides/configuration.md +82 -20
  257. package/docs/guides/non-interactive.md +66 -24
  258. package/docs/guides/resume-on-any-machine.md +135 -82
  259. package/docs/guides/team-setup.md +114 -105
  260. package/docs/guides.md +76 -32
  261. package/docs/herdr.md +15 -16
  262. package/docs/how-atomic-works.md +140 -0
  263. package/docs/index.md +58 -44
  264. package/docs/intercom/operations.md +141 -151
  265. package/docs/intercom/reference.md +85 -108
  266. package/docs/intercom.md +84 -145
  267. package/docs/json.md +120 -67
  268. package/docs/keybindings.md +85 -49
  269. package/docs/libraries/agent-core.md +137 -275
  270. package/docs/libraries/ai.md +100 -84
  271. package/docs/libraries/codemode.md +210 -300
  272. package/docs/libraries/schema.md +59 -53
  273. package/docs/libraries/storage-postgres.md +49 -35
  274. package/docs/libraries/telemetry.md +153 -354
  275. package/docs/libraries/tui.md +265 -393
  276. package/docs/libraries.md +42 -26
  277. package/docs/llama-cpp.md +171 -161
  278. package/docs/mcp-servers.md +90 -51
  279. package/docs/models/choose-a-model.md +188 -0
  280. package/docs/models/reference.md +74 -30
  281. package/docs/models.md +153 -88
  282. package/docs/orchestration/migrating-workflows.md +23 -16
  283. package/docs/orchestration/patterns.md +39 -44
  284. package/docs/orchestration.md +65 -26
  285. package/docs/packages/authoring.md +51 -29
  286. package/docs/packages/reference.md +42 -21
  287. package/docs/packages.md +69 -58
  288. package/docs/programmatic.md +118 -24
  289. package/docs/prompt-templates.md +84 -83
  290. package/docs/providers/reference.md +43 -48
  291. package/docs/providers.md +219 -451
  292. package/docs/quickstart.md +140 -120
  293. package/docs/reference/cli.md +135 -97
  294. package/docs/reference.md +20 -18
  295. package/docs/rpc/examples.md +76 -20
  296. package/docs/rpc/extension-ui.md +64 -38
  297. package/docs/rpc/protocol.md +361 -110
  298. package/docs/rpc.md +57 -17
  299. package/docs/sdk/reference.md +409 -534
  300. package/docs/sdk/storage.md +53 -13
  301. package/docs/sdk/structured-decisions.md +82 -56
  302. package/docs/sdk/web-server.md +57 -43
  303. package/docs/sdk.md +106 -84
  304. package/docs/security.md +42 -64
  305. package/docs/session-format.md +62 -38
  306. package/docs/sessions.md +99 -214
  307. package/docs/settings.md +165 -195
  308. package/docs/shell-aliases.md +9 -6
  309. package/docs/skills/authoring.md +69 -48
  310. package/docs/skills/reference.md +51 -20
  311. package/docs/skills.md +99 -148
  312. package/docs/slash-commands.md +129 -0
  313. package/docs/storage/custom-adapters.md +160 -85
  314. package/docs/storage/jsonl.md +81 -66
  315. package/docs/storage/postgres/pgbouncer.md +120 -126
  316. package/docs/storage/postgres/tuning.md +120 -143
  317. package/docs/storage/postgres.md +314 -330
  318. package/docs/storage/sqlite.md +71 -42
  319. package/docs/storage.md +298 -302
  320. package/docs/subagents/authoring.md +55 -38
  321. package/docs/subagents/reference.md +73 -33
  322. package/docs/subagents.md +119 -187
  323. package/docs/terminal-setup.md +50 -38
  324. package/docs/termux.md +67 -41
  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
@@ -1,152 +1,152 @@
1
1
  ---
2
2
  title: "Operate Intercom"
3
- sidebarTitle: "Operations"
3
+ sidebarTitle: "Operate Intercom"
4
4
  description: "Configure Intercom connections, multi-machine routing, broker upgrades, delivery recovery, and troubleshooting."
5
5
  ---
6
6
 
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
+ This guide covers how Atomic sessions connect to Intercom, how the background broker handles restarts and upgrades, how to enable cross-machine messaging through shared storage, and how to diagnose delivery issues.
8
8
 
9
- Looking for another Intercom page? See [Intercom overview](/guides/intercom) for concepts, [Coordinate sessions with Intercom](/intercom) for quick-start patterns and `contact_supervisor`, [Intercom reference](/intercom/reference) for tool parameters and settings, or [Storage and Intercom CLI commands](/reference/cli#storage-and-intercom-commands) for broker subcommands.
9
+ For daily messaging patterns and `contact_supervisor`, see [Coordinate sessions with Intercom](/intercom). For the complete tool schema, `config.json` keys, and exported SDK error classes, see [Intercom reference](/intercom/reference). For CLI subcommands, see [Storage and Intercom CLI commands](/reference/cli#storage-and-intercom-commands).
10
10
 
11
- Common operational tasks on this page:
12
-
13
- - [Running Intercom across machines](#running-intercom-across-machines) for shared-database setup, project groups, and multi-node troubleshooting.
14
- - [Upgrading Atomic with sessions running](#upgrading-atomic-with-sessions-running) for broker handover, `atomic intercom upgrade`, and `atomic intercom restart`.
15
- - [Connection states and recovery](#connection-states-and-recovery) for diagnosing disconnects, holds, and queued deliveries.
11
+ | What you need | Jump to |
12
+ | --- | --- |
13
+ | Share Intercom across machines or a team | [Running Intercom across machines](#running-intercom-across-machines) |
14
+ | Upgrade Atomic without dropping active sessions | [Upgrading Atomic with sessions running](#upgrading-atomic-with-sessions-running) |
15
+ | Inspect logs, local queues, or socket paths | [Local files, logs, and locks](#local-files-logs-and-locks) |
16
+ | Diagnose a disconnect, hold, or queued send | [Connection states and recovery](#connection-states-and-recovery) |
16
17
 
17
18
  ## How connection works
18
19
 
19
- 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.
20
-
21
- 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.
22
-
23
- 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.
24
-
25
- 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`.
20
+ Interactive sessions connect to Intercom in the background 3 seconds after startup, including new, resumed, or forked sessions. Neither the initial render nor your first prompt waits for this connection. Once connected, other sessions in the same group can list and message it immediately.
26
21
 
27
- 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.
22
+ 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.
28
23
 
29
- A session is connected to Intercom when all of these hold:
24
+ 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, interactive sessions whose tool selection excludes `intercom`, and interactive sessions with `joinAtStartup: false` in [Intercom configuration](/intercom/reference#configuration) or `ATOMIC_INTERCOM_JOIN_AT_STARTUP=0` (or `false`; `1` or `true` turns startup join back on; legacy alias `PI_INTERCOM_JOIN_AT_STARTUP`). Any session connects immediately when it launches a subagent with Intercom so it can authorize supervisor contact.
30
25
 
31
- - The bundled Intercom extension is loaded in that session.
32
- - The local broker is running or can be started on demand.
33
- - 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.
26
+ Subagents launched with Intercom connect immediately before their first turn, regardless of `joinAtStartup`, and inherit the launching session's group unless the launch sets `group`. 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 itself fails to spawn, subagent startup fails immediately.
34
27
 
35
- 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.
28
+ A session appears in `intercom list` and the `Alt+M` overlay only when it is connected to the broker—not every open Atomic process is listed. Internal control connections never appear as recipients or affect session counts, and connected sessions stay visible and messageable while running tools or waiting for human input.
36
29
 
37
- 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.
30
+ Use `/name` to assign readable targets such as `planner` and `worker`. Unnamed sessions receive a runtime-only fallback alias (`subagent-chat-<id>`, stripping any leading `session-` prefix from the session ID) so peers can address them without overwriting the `/resume` transcript preview.
38
31
 
39
32
  ### Troubleshooting initialization
40
33
 
41
- 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.
34
+ If Intercom fails to start its background client or connect to the broker, interactive sessions show a yellow warning in chat while print, JSON, and RPC sessions print a diagnostic to stderr. Atomic leaves the session usable and retries automatically on the next Intercom call.
42
35
 
43
- 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.
36
+ If startup keeps failing, inspect the error message 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.
44
37
 
45
38
  ### Upgrading Atomic with sessions running
46
39
 
47
- 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.
40
+ Sessions on one machine share a single local broker that 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.
48
41
 
49
- - **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.
50
- - **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.
51
- - **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`).
52
- - **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.
42
+ - **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.
43
+ - **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 warns once and runs locally on the existing broker, failing only requests that require newer protocol features (`IntercomBrokerProtocolError`). With multi-node storage configured, the session refuses to register (`IntercomRoutingUnavailableError`) until you run `atomic intercom restart`.
44
+ - **Installer and update hook.** Installers and `atomic update` finish by running `atomic intercom upgrade`, which stops an idle older broker immediately and leaves an active one for smooth handover by the next newer session. You can run `atomic intercom upgrade` manually after `npm install -g`.
53
45
 
54
- For SDK error classes (`IntercomBrokerProtocolError`, `IntercomBrokerUpgradeError`, and `IntercomBrokerStopTimeoutError`) and their type guards, see [Broker errors](/intercom/reference#broker-errors).
46
+ <Note>
47
+ **Upgrading from Atomic 0.10.4 or earlier on Windows.** If `npm install -g @bastani/atomic` fails with `EBUSY` on `dist\builtin\intercom`, an older broker is holding that directory open. Close running Atomic sessions, wait 5 seconds (or run `atomic intercom restart`), and re-run the install. From 0.10.5 onward, the broker runs outside the installation directory and does not block npm updates or uninstalls.
48
+ </Note>
55
49
 
56
- ### Mixed versions and workflows
50
+ For exported SDK broker errors (`IntercomBrokerProtocolError`, `IntercomBrokerUpgradeError`, `IntercomBrokerStopTimeoutError`, and `IntercomBrokerSuccessorTimeoutError`), see [Broker errors](/intercom/reference#broker-errors).
57
51
 
58
- Atomic 0.10.0 removed workflows along with `workflow:<rootRunId>/...` stage targets and stage routes. Because the Intercom protocol range remains compatible, sessions running 0.9.x and 0.10.0+ continue exchanging sends, asks, replies, groups, subagent messages, and multi-node traffic through whichever broker is running.
52
+ ### Mixed versions and workflows
59
53
 
60
- 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.
54
+ Because the Intercom protocol range stays backward-compatible, sessions running 0.9.x and 0.10.0+ exchange sends, asks, replies, groups, subagent messages, and multi-node traffic through whichever broker is running.
61
55
 
62
- ## How it works
56
+ Atomic 0.10.0 removed workflows and `workflow:<rootRunId>/...` stage targets, which now return `Session not found` without queueing. 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 it by session ID or name.
63
57
 
64
- ### Broker lifecycle and retries
58
+ ## Broker lifecycle and crash recovery
65
59
 
66
- 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.
60
+ ### Lifecycle and automatic retries
67
61
 
68
- 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.
62
+ The local broker starts on demand when the first session connects and exits automatically 5 seconds after its last session disconnects. Clients reconnect with backoff (1, 2, 5, 10, then 30 seconds) while keeping explicit connection errors visible.
69
63
 
70
- 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.
64
+ A built-in watchdog terminates an unresponsive broker if it stops answering health checks for about a minute, allowing clients to start a replacement. A single slow request does not trigger replacement, and an OS-suspended process cannot run its own watchdog—check which process owns the broker PID before stopping a stuck broker manually.
71
65
 
72
- 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.
66
+ For `send`, `ask`, and `reply`, the `intercom` tool retries recoverable disconnects internally: one initial attempt plus up to three retries (waiting 1, 2, and 5 seconds) within an 11-minute deadline. Retries reuse the same message ID, arguments, attachments, and reply thread, whereas each new tool call is a fresh operation. If startup fails before delivery begins, the tool returns `outcome: "not_sent"`; cancelling a call stops retries without undoing an already accepted delivery.
73
67
 
74
68
  ### Delivery receipts and crash recovery
75
69
 
76
- `delivered` means the recipient saved the message to its session, not just received it on the socket. If a busy recipient closes or crashes before showing a saved message, resuming that session displays unread messages once in arrival order when the sender is still connected.
77
-
78
- Messages from a sender that is gone are recorded once in full without starting a turn. If Intercom is unreachable on reopen, or the sender is a relaunched subagent that has not reconnected yet, recovery defers the decision until the next reopen.
79
-
80
- If the recipient does not confirm the save within about 8 seconds, the sender receives an uncertain-outcome failure (`outcome: "unknown"`). **Check with the recipient before sending again.** A new tool call creates a fresh message, whereas Intercom's own retries reuse the original message ID so a recipient never displays a saved message twice.
70
+ `delivered` means the recipient saved the message to its session, not just received it over the socket. If a busy recipient closes or crashes before displaying a saved message, resuming that session replays unread messages once in arrival order when the sender is still connected. Messages from a sender that is gone are recorded once in full without starting a turn; if Intercom is unreachable on reopen or a relaunched subagent has not reconnected yet, recovery defers until the next reopen.
81
71
 
82
- 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.
72
+ If the recipient does not confirm saving within about 8 seconds, the sender receives an uncertain-outcome failure (`outcome: "unknown"`). **Check with the recipient before sending again**, because a new tool call sends a fresh message while Intercom's own retries deduplicate by message ID. Intercom refuses new deliveries if it cannot safely track duplicates (such as on storage or capacity errors).
83
73
 
84
74
  ### Local files, logs, and locks
85
75
 
86
- 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).
76
+ Configuration, logs, sockets, and durable 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).
87
77
 
88
- - **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.
89
- - **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.
90
- - **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.
91
- - **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.
78
+ - **Logs.** Read `broker.log` when startup fails (ordinary diagnostics cap at 8 KiB per broker). The prior broker's log is saved as `broker.log.previous`, and `broker-watchdog.log` records the latest watchdog termination's time, PID, and reason.
79
+ - **Local queues and deduplication.** On first registration, the broker creates owner-only local databases:
80
+ - `delivered-messages.sqlite` and its paired HMAC key `delivered-messages.key` track recently delivered message IDs across restarts so retries never duplicate messages.
81
+ - `away-asks.sqlite` stores open asks waiting on closed sessions and replies held for away askers.
82
+ - `ended-child-queue.sqlite` stores queued messages for finished or paused subagents ([Across restarts](/intercom/reference#across-restarts)).
83
+ - **Unix socket path relocation.** On Linux and macOS, if `<agentDir>/intercom/broker.sock` exceeds the OS Unix socket path length limit (107 bytes on Linux, 103 bytes on macOS and BSDs), the broker automatically binds under `$XDG_RUNTIME_DIR/atomic-intercom-<uid>/<digest>.sock` (falling back to `<tmpdir>/atomic-intercom-<uid>/<digest>.sock`) and writes the chosen path to `broker.sock.path`. That directory must be a real directory owned by your user with `0700` permissions; otherwise startup fails with `Intercom refuses the broker socket directory ...`.
84
+ - **Session teardown.** Disposing a session cancels any unstarted broker spawn and waits for a broker it already started to finish initializing before resolving. On Windows, a running broker keeps `broker.log` open until its 5-second idle exit finishes.
85
+ - **Unchecked startup locks.** If startup encounters a lock held by a process Atomic cannot inspect (for example across containers, on a shared filesystem, or owned by another user), Atomic leaves the lock untouched and logs the lock path and recovery steps after 30 seconds. Confirm no process still needs the files before removing a stale lock.
86
+
87
+ <Warning>
88
+ Never delete `delivered-messages.sqlite`, `delivered-messages.key`, `away-asks.sqlite`, or `ended-child-queue.sqlite` while troubleshooting delivery outcomes. Deleting them removes duplicate-delivery protection and drops queued messages or open asks.
89
+ </Warning>
92
90
 
93
91
  ## Subagent notifications
94
92
 
95
- Intercom delivers subagent results and control notices from the [subagent runtime](/subagents) back to the launching session.
93
+ Intercom delivers subagent run results and activity notices from the [subagent runtime](/subagents) back to the launching session.
96
94
 
97
95
  ### Subagent control notices
98
96
 
99
- The `subagent` tool's `control` options (or `control` in `~/.atomic/agent/extensions/subagent/config.json`) configure when activity notices fire and where they go:
100
-
101
- - **`needsAttentionAfterMs`.** Defaults to `60000` (1 minute without observed activity).
102
- - **`activeNoticeAfterMs`.** Defaults to `240000` (4 minutes elapsed while active).
103
- - **`failedToolAttemptsBeforeAttention`.** Defaults to `3` consecutive mutating-tool failures.
104
- - **`notifyOn`.** Defaults to `["active_long_running", "needs_attention"]`.
105
- - **`notifyChannels`.** Defaults to `["event", "intercom"]`.
106
-
107
- 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.
97
+ By default, Atomic monitors running subagents and notifies the parent session (both in chat and over Intercom) when a subagent has no observed activity for 1 minute, fails 3 consecutive mutating tool calls, or runs actively for 4 minutes. Adjust thresholds, events, or delivery channels through `control.*` in `~/.atomic/agent/extensions/subagent/config.json` or per-call `control` options; see [Subagent `config.json` reference](/subagents/reference#subagent-config-json-reference).
108
98
 
109
- 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.
99
+ Run results report each subagent's Intercom target as `Run intercom target` or `Previous intercom target` (a target may no longer be live once finished). Call `intercom({ action: "status" })` before launching subagents to verify your connection and groups. Fresh subagents launched with Intercom receive it even when an extension allowlist omits it.
110
100
 
111
101
  ### Delivery ordering
112
102
 
113
- 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.)
103
+ In standard interactive and background sessions, single and parallel subagent launches run without cancelling siblings. An `intercom` `ask` returns at delivery and delivers late replies as messages in the same subagent; a `contact_supervisor` decision or interview waits only inside the requesting subagent and resumes that subagent when answered. Sends and progress updates never block.
114
104
 
115
- 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.
105
+ Queued messages from a subagent arrive before its completion notice. Delivery retries never rerun work or change its outcome, and messages from one sender always arrive in order whether delivered immediately or queued until idle.
116
106
 
117
107
  ## Running Intercom across machines
118
108
 
119
- By default, each machine's broker serves only sessions on that machine. With multi-node routing enabled, brokers on different machines read and write a shared storage database to exchange messages. Sessions still connect only to their local broker, and brokers never open network ports or connect directly to each other.
109
+ By default, each machine's broker serves only local sessions. With multi-node routing enabled, brokers on different machines exchange messages through a shared database—sessions still connect only to their local broker, and brokers never open network ports or connect directly to each other.
120
110
 
121
- ### Turning it on
111
+ ### Enable multi-node routing
122
112
 
123
- Point every machine at the same [PostgreSQL](/storage/postgres) database, with the same `prefix`:
113
+ Point every machine at the same [PostgreSQL](/storage/postgres) database using the same `prefix`:
124
114
 
125
- 1. Set up the database once, as in [Set up the database](/storage/postgres#set-up-the-database). With a prefix, as below, pass the same `--prefix` to `atomic storage migrate`.
126
- 2. On every machine, install the PostgreSQL adapter, save the runtime role's password in a file, join the database, and restart the broker:
115
+ <Steps>
116
+ <Step title="Set up the PostgreSQL database once">
117
+ Follow [Set up the database](/storage/postgres#set-up-the-database). If you use a table prefix (such as `team_`), pass the same `--prefix` to `atomic storage migrate`.
118
+ </Step>
119
+ <Step title="Install the adapter and join on each machine">
120
+ Install the PostgreSQL adapter, save the runtime role's password in a temporary file, join the database, and restart the broker:
127
121
 
128
- ```bash
129
- atomic install npm:@bastani/atomic-storage-postgres
130
- (umask 077; printf 'Runtime password: '; read -rs password; printf '\n'; printf '%s' "$password" > ~/atomic-db-password)
131
- atomic storage join 'postgresql://atomic_runtime@db.example.com:5432/atomic' --password-file ~/atomic-db-password --prefix team_
132
- rm ~/atomic-db-password # atomic storage join keeps its own copy
133
- atomic intercom restart
134
- ```
122
+ ```bash
123
+ atomic install npm:@bastani/atomic-storage-postgres
124
+ (umask 077; printf 'Runtime password: '; read -rs password; printf '\n'; printf '%s' "$password" > ~/atomic-db-password)
125
+ atomic storage join 'postgresql://atomic_runtime@db.example.com:5432/atomic' --password-file ~/atomic-db-password --prefix team_
126
+ rm ~/atomic-db-password # atomic storage join keeps its own copy
127
+ atomic intercom restart
128
+ ```
129
+ </Step>
130
+ <Step title="Optional: keep personal sessions local">
131
+ `atomic storage join` sets top-level `storage`, which shares both sessions and Intercom. To share Intercom while keeping personal sessions in local SQLite (see [Set up teams and CI](/guides/team-setup)), add an empty `sessions.storage` object to `~/.atomic/agent/settings.json`:
135
132
 
136
- `atomic storage join` sets the top-level `storage` setting, which shares sessions too. To share Intercom but keep each machine's sessions local, as [Team and CI setup](/guides/team-setup) describes, also set `sessions.storage` to `{}` in `~/.atomic/agent/settings.json`, which keeps sessions in the default local SQLite file:
133
+ ```json
134
+ { "sessions": { "storage": {} } }
135
+ ```
136
+ </Step>
137
+ <Step title="Verify routing">
138
+ Run `atomic intercom status`, `atomic storage status`, or `intercom({ action: "status" })`. Look for the `Multi-node routing:` line showing the adapter, prefix, and live peer broker count.
139
+ </Step>
140
+ </Steps>
137
141
 
138
- ```json
139
- { "sessions": { "storage": {} } }
140
- ```
142
+ See [Sharing storage across hosts](/storage#sharing-storage-across-hosts) and [Storage and Intercom CLI commands](/reference/cli#storage-and-intercom-commands) for all options. Any database-backed [custom adapter](/storage/custom-adapters#selecting-an-adapter) also works when every machine uses the same `storage` setting and `prefix`, on both npm installs and standalone binaries.
141
143
 
142
- See [Sharing storage across hosts](/storage#sharing-storage-across-hosts) and [Storage and Intercom CLI commands](/reference/cli#storage-and-intercom-commands) for every option. Any database-backed [custom adapter](/storage/custom-adapters#selecting-an-adapter) works too, if every machine uses the same `storage` setting and `prefix`. Both npm installs and standalone binaries support multi-node routing.
144
+ The broker reads its storage selection from:
143
145
 
144
- The broker takes its store from:
146
+ 1. The launching process's `--storage`, `--storage-file`, or `ATOMIC_STORAGE` ([Selecting storage per process](/storage#selecting-storage-per-process)).
147
+ 2. Otherwise, the top-level `storage` setting in `~/.atomic/agent/settings.json` (or under `ATOMIC_CODING_AGENT_DIR`).
145
148
 
146
- 1. The process that starts it: `--storage`, `--storage-file`, or `ATOMIC_STORAGE`. See [Selecting storage per process](/storage#selecting-storage-per-process).
147
- 2. Otherwise, the top-level `storage` setting in `~/.atomic/agent/settings.json`, or in the agent directory that `ATOMIC_CODING_AGENT_DIR` names.
148
-
149
- For example, a setting that reads the password from an environment variable:
149
+ Example `settings.json` reading the password from an environment variable:
150
150
 
151
151
  ```json
152
152
  {
@@ -159,108 +159,98 @@ For example, a setting that reads the password from an environment variable:
159
159
  }
160
160
  ```
161
161
 
162
- A running broker keeps the storage selection it started with until it exits. After changing `storage`, run `atomic intercom restart` so sessions reconnect and start a broker using the new selection. Check state with `atomic intercom status`, `atomic storage status` ([Checking the selected storage](/storage#checking-the-selected-storage)), or `intercom({ action: "status" })`, which prints a `Multi-node routing:` line showing the adapter, prefix, and live peer broker count.
163
-
164
- Each broker logs `Intercom multi-node routing is on (adapter <adapter>, prefix <prefix>)` or `Intercom multi-node routing is off: <reason>` to `broker.log`. Multi-node routing stays off when:
162
+ A running broker keeps the storage selection it started with until it exits, so run `atomic intercom restart` after changing `storage`. Each broker logs `Intercom multi-node routing is on (...)` or `Intercom multi-node routing is off: <reason>` to `broker.log`. Multi-node routing stays off when:
165
163
 
166
- - No global or process-level `storage` is configured (project `.atomic/settings.json`, `sessions.storage`, and `ATOMIC_SESSIONS_STORAGE` do not enable multi-node routing).
164
+ - No global or process-level `storage` is configured (project `.atomic/settings.json`, `sessions.storage`, and `ATOMIC_SESSIONS_STORAGE` never enable multi-node routing).
167
165
  - Storage is in memory (`{ "memory": true }` or `{ "path": ":memory:" }`).
168
- - The storage adapter stores only session files and does not provide shared database tables.
169
- - The selection is invalid (such as a missing `env` secret or an unloadable adapter package).
166
+ - The storage adapter stores only session files and exposes no shared database tables.
167
+ - The selection is invalid (such as a missing `env` secret or unloadable adapter package).
170
168
 
171
- 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.
169
+ A local `path` selection shares only among brokers on the same machine—never place a local SQLite file on a network filesystem. Different `prefix` values isolate teams or tenants inside one database.
172
170
 
173
171
  ### Project groups
174
172
 
175
- 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.
173
+ When multi-node routing is on, sessions without an explicit group join `project:<path>` instead of `default` so sessions in different repositories cannot accidentally message each other.
176
174
 
177
- How the project group name is derived:
175
+ - **Git detection.** Atomic walks parent directories looking for `.git` without spawning `git`. Outside a Git repository, it uses the working directory's base name (`project:<dirname>`), so missing Git never fails outside a repository.
176
+ - **Remote URL path and casing.** Inside a Git repository, Atomic reads the `origin` remote URL (falling back to the repository directory name if `origin` is absent) and preserves all path segments (`https://gitlab.com/org/team/repo.git` becomes `project:org/team/repo`). **Casing is preserved verbatim**, so `project:Owner/Repo` and `project:owner/repo` are different groups—ensure teammates use matching remote casing or set `ATOMIC_INTERCOM_GROUP`.
177
+ - **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, or set `ATOMIC_INTERCOM_GROUP`.
178
178
 
179
- - **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.
180
- - **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`.
181
- - **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.
179
+ Explicit groups take precedence over the project group: an inherited subagent group, an SDK reach policy, `ATOMIC_INTERCOM_GROUP`, or `group` in `config.json`. Joining `default` explicitly while multi-node routing is on prints a warning because every teammate on the shared database can message `default`. Running sessions keep their current group until restarted or reloaded.
182
180
 
183
- 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.
184
-
185
- Before registering, each session checks the running broker's routing mode, so a session never joins `default` on a multi-node broker by accident, or runs locally when it asked for shared storage. If the running broker's store differs from the session's, for example after you change `storage`, 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).
181
+ Before registering, each session checks the running broker's routing mode so it never joins `default` on a multi-node broker or runs locally when it requested shared storage. If the running broker's storage differs from the session's, run `atomic intercom restart` and restart the session. For `ProjectGroupError` and `IntercomRouting*Error` classes, see [Routing and project-group errors](/intercom/reference#routing-and-project-group-errors).
186
182
 
187
183
  ### What works across machines
188
184
 
189
- Sessions connected to brokers on other machines appear in `intercom list` and behave like local sessions:
185
+ Sessions on remote brokers appear in `intercom list` and behave like local sessions:
190
186
 
191
187
  - `send`, `ask`, and `reply` keep sender identity, reply threads, and save-confirmed `delivered` receipts.
192
- - Group isolation and [return paths](/intercom/reference#answering-a-sender-outside-your-groups) enforce the same rules across machines.
193
- - Supervisor traffic from `contact_supervisor` preserves supervisor routing.
194
- - Routing holds for restoring or released subagents work across machines with the same error codes ([Connection states and recovery](#connection-states-and-recovery)).
195
- - Retry deduplication prevents duplicate delivery across nodes.
188
+ - Group isolation, [return paths](/intercom/reference#answering-a-sender-outside-your-groups), supervisor routing via `contact_supervisor`, and retry deduplication work identically across machines.
189
+ - Routing holds for restoring or released subagents work across machines with the same failure codes ([Connection states and recovery](#connection-states-and-recovery)).
196
190
 
197
- 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.
191
+ If a local and a remote session share the same name, lookup prefers the local session. Give sessions distinct names or address remote peers by session ID.
198
192
 
199
193
  ### Latency
200
194
 
201
- On PostgreSQL, the database notifies the receiving broker of a new message at once, so a cross-machine message usually arrives within a few database round trips. The `delivered` confirmation takes about as long. Brokers also check for missed messages every 5 seconds. When notifications are not available, for example behind a transaction pooler without `listenUrl`, brokers check the database every half second instead. See [Wake-ups](/storage/postgres#wake-ups). With a custom adapter, brokers check every half second. A backup check every 30 seconds recovers anything else.
195
+ On PostgreSQL, `LISTEN`/`NOTIFY` wakes the receiving broker immediately, so cross-machine messages and `delivered` receipts usually complete within a few database round trips (with a 5-second safety poll and a 30-second backup check). Behind a transaction pooler without `listenUrl`, or with a custom adapter, brokers poll every 0.5 seconds instead ([Wake-ups](/storage/postgres#wake-ups)).
202
196
 
203
- A sender waits about 8 seconds for a live recipient to confirm saving a message. A recipient actively saving reports progress to extend that wait up to 2 minutes, and a claimed remote delivery gets one extra 8-second window (about 16 seconds total) before reporting an uncertain outcome. The message is still delivered once; check with the recipient before resending.
197
+ Senders wait about 8 seconds for a live recipient to confirm saving; an actively saving recipient extends that window up to 2 minutes, and a claimed remote delivery gets one extra 8-second window (about 16 seconds total) before returning an uncertain outcome.
204
198
 
205
- Same-machine traffic does not depend on database availability. Local delivery checks the shared database for a prior cross-machine retry for at most 0.3 seconds. Initial connection waits at most 5 seconds for the database, and `intercom list` waits at most 2 seconds for remote sessions before returning local sessions alone.
199
+ Same-machine traffic does not depend on database availability: local delivery checks shared storage for a prior cross-machine retry for at most 0.3 seconds, initial connection waits at most 5 seconds, and `intercom list` falls back to local sessions alone if remote lookup takes more than 2 seconds.
206
200
 
207
201
  ### Offline sessions
208
202
 
209
- With multi-node routing on, a session that exits or crashes stays known to all brokers for about 7 days. It leaves `intercom list`, but peers in its group can still message it by name, Intercom session ID, or Atomic session ID:
203
+ With multi-node routing on, a session that exits or crashes stays known across brokers for about 7 days. It leaves `intercom list`, but peers in its group can still message it by name, Intercom session ID, or Atomic session ID:
210
204
 
211
- - Sends, asks, and replies return at once as queued (`Message queued for <target>`, `target: "offline session"`). Asks do not wait for a reply.
212
- - Queued messages remain in the shared database and deliver in order when the same Atomic session reconnects with the same home group on any machine using that storage.
213
- - Messages queued for a [released subagent](/subagents#released-subagents) wake it through its launching session (immediately on reconnect or within about 30 seconds). Paused or quit subagents are not woken automatically; their messages wait until resumed.
214
- - Delivery confirmations for queued messages only go to senders that are still connected; the original tool result remains queued.
215
- - Each offline session accepts at most **1,000 queued messages or 64 MiB**. Messages past that cap are refused without dropping earlier queued messages.
216
- - Messages expire undelivered if the session does not return within 7 days.
205
+ - Sends, asks, and replies return immediately as queued (`Message queued for <target>`, `target: "offline session"`); asks do not wait for a reply.
206
+ - Queued messages persist in the shared database and deliver in order when the same Atomic session reconnects with the same home group on any machine sharing that storage.
207
+ - Messages queued for a [released subagent](/subagents#released-subagents) wake it through its launching session (immediately on reconnect or within about 30 seconds). Paused or quit subagents wait until resumed.
208
+ - Each offline session holds up to **1,000 queued messages or 64 MiB**; messages past that limit are refused without dropping earlier ones. Messages expire undelivered after 7 days.
217
209
 
218
- When a machine or broker stops abruptly, its sessions still look connected for up to 30 seconds. Sends during that window time out with an uncertain outcome after about 8 seconds; after 30 seconds, sends queue normally, and any unconfirmed messages redeliver once on reconnect.
210
+ If a machine or broker crashes abruptly, its sessions appear connected for up to 30 seconds. Sends during that window time out with an uncertain outcome after about 8 seconds; after 30 seconds, sends queue normally and unconfirmed messages redeliver once on reconnect.
219
211
 
220
212
  ### Data and security
221
213
 
222
- - **Retention.** Cross-machine message text, attachments, and sender metadata stay in the shared database until delivered, and delivered rows are pruned 12 to 17 minutes later to protect against duplicate retries. Offline messages stay until delivered or expired after 7 days. One broker at a time does this cleanup, every 5 minutes; if it stops, another broker takes over within about 15 minutes. Session names, IDs, and group memberships are stored for discovery and routing.
223
- - **Database access.** Anyone who can read the shared database can read cross-machine Intercom messages. Keep credentials in `secrets` (`{ "env": ... }` or `{ "file": ... }`) rather than plain `options`, and use project groups rather than `default` so teammates in other repositories cannot inject prompts into your sessions.
224
- - **No open ports.** Intercom opens no network listeners or broker-to-broker sockets. Cross-machine security matches the shared database's authentication and transport security.
214
+ - **Retention.** Cross-machine messages, attachments, and sender metadata stay in shared storage until delivered, and delivered rows are pruned within about 15 minutes to prevent duplicate retries. Offline messages stay until delivered or expired after 7 days. One broker handles cleanup every 5 minutes, with another taking over within about 15 minutes if it stops.
215
+ - **Database access.** Anyone who can read the shared database can read cross-machine Intercom messages. Keep credentials in `secrets` (`{ "env": ... }` or `{ "file": ... }`) rather than plain `options`, and use project groups rather than `default`.
216
+ - **No open ports.** Intercom opens no network listeners or broker-to-broker sockets; network security matches your database's authentication and TLS configuration.
225
217
 
226
218
  ### Troubleshooting multi-node
227
219
 
228
220
  **A remote session does not appear in `intercom list`.**
229
221
 
230
- - 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.
231
- - 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.
232
- - 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).
233
- - If the database is temporarily slow, `intercom list` falls back to local sessions after 2 seconds; retry shortly.
234
-
235
- **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.
222
+ - Run `atomic storage status` on both machines to verify they share the exact `storage` selection and `prefix` and report `storage: matches the selection above`. Run `atomic intercom restart` if a broker predates a settings change.
223
+ - Run `atomic intercom status` or inspect `broker.log` for `Intercom multi-node routing is on`, `off`, or `unavailable`. Remember that a local `path` selection reaches only brokers on the same machine.
224
+ - Confirm the remote session has joined Intercom (call `intercom({ action: "status" })` once in first-use sessions) and shares a group with your session (check `origin` URL casing for `project:<path>` groups).
225
+ - If the database was briefly slow, `intercom list` falls back to local sessions after 2 seconds; retry shortly.
236
226
 
237
- **The shared database is unavailable.** Same-machine sessions keep messaging normally. Sends to remote sessions fail with `Session not found on this node, and Intercom could not reach the shared storage database to look for it on other nodes. Try again once the database is available.`
227
+ **A send stays queued.** The recipient is offline and will receive the message when that Atomic session reconnects with the same home group on any host sharing the database and prefix.
238
228
 
239
- On startup failure, the broker logs `Intercom multi-node routing is unavailable: <reason>` and retries with exponential backoff from 1 second up to 30 seconds without falling back to memory. If sends still fail after the database recovers, run `atomic intercom restart`.
229
+ **The shared database is unavailable.** Same-machine sessions continue messaging normally. Sends to remote sessions fail with `Session not found on this node, and Intercom could not reach the shared storage database to look for it on other nodes. Try again once the database is available.` On startup failure, the broker logs `Intercom multi-node routing is unavailable: <reason>` and retries with exponential backoff (1s to 30s) without falling back to memory. If sends still fail after recovery, run `atomic intercom restart`.
240
230
 
241
231
  **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.
242
232
 
243
233
  ## Connection states and recovery
244
234
 
245
- Use this table to diagnose what you observe in chat, `/intercom`, or tool responses:
235
+ Use this table to diagnose chat warnings, `/intercom` behavior, or tool responses. For underlying broker retries and crash recovery, see [Broker lifecycle and crash recovery](#broker-lifecycle-and-crash-recovery).
246
236
 
247
237
  | State | What you see | What to do |
248
238
  | --- | --- | --- |
249
- | 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). |
250
- | 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). |
251
- | 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). |
252
- | 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). |
253
- | 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). |
254
- | 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). |
255
- | 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). |
256
- | 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). |
257
- | 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). |
258
- | 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). |
259
- | 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). |
260
- | 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). |
261
- | 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). |
262
- | 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). |
263
- | 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). |
239
+ | 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 on first use or when launching a subagent with Intercom. Subagents join on start. | Invoke the `intercom` tool, `/intercom`, or `Alt+M` in that session; the broker starts on demand. See [How connection works](#how-connection-works). |
240
+ | Recoverable disconnect | An explicit Intercom call or overlay action fails visibly while background reconnection keeps running. | Wait for reconnect. Check the reported outcome before repeating a send, ask, or reply, and never repeat an unknown outcome automatically. |
241
+ | Reconnect backoff | The session stays disconnected between reconnect attempts. | No action needed. Retries wait 1, 2, 5, 10, then 30 seconds until connected or closed. |
242
+ | 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 refusal reason, then send again once the recipient can accept messages. |
243
+ | Broker restart or concurrent startup | Sessions disappear briefly, or several sessions start Intercom at once. | No action needed. Clients reconnect automatically, and startup locking prevents duplicate brokers. |
244
+ | Broker started by an older Atomic | After an upgrade, the first session on the newer version replaces the older broker and sessions reconnect briefly. 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). |
245
+ | Broker accepts connections but stops answering | List or send requests time out. | Allow about a minute for automatic watchdog replacement, then reconnect backoff. Check `broker.log` and `broker-watchdog.log` if it repeats. |
246
+ | Broker does not start | The startup or readiness error prints the broker log path and a bounded tail. | Inspect `~/.atomic/agent/intercom/broker.log` (or the Intercom directory under `ATOMIC_CODING_AGENT_DIR`). |
247
+ | Peer disconnected unexpectedly | The send returns `Session not found`; its message ID remains retryable. | Refresh the session list and retry after the target reconnects. |
248
+ | Subagent that is starting | A send or ask to a starting, resuming, or relaunching background subagent waits for registration (up to `2 × sessionStartTimeoutMs + 2 min`, capped at 1 hour; 20 seconds across nodes). If startup fails, the sender gets the failure reason. | Wait for the send to return, or run `subagent({ action: "status", id })` to inspect progress. |
249
+ | Subagent restoring 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, returning a retryable error if still restoring or a gone error if it did not survive. | Retry shortly if still restoring, or launch a fresh subagent if it did not survive. |
250
+ | Subagent that finished or was paused | A single-target `send` or `ask` to a completed or failed subagent returns immediately as queued and resumes it; one to a paused or quit subagent queues without resuming until continued ([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 needed. |
251
+ | 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 get a refusal with `reasonCode` (`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 one if it was cancelled. |
252
+ | Subagent released while waiting | 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 report `reasonCode` (`recipient_not_restored`, `recipient_parked`, or retryable `recipient_owner_suspended`). | Retry shortly, or ask the launching session to resume it if paused or quit. See [Released subagents](/intercom/reference#released-subagents). |
253
+ | 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 immediately as queued (`Message queued for <target>`, `target: "offline session"`). | Do not resend as a new message; the broker delivers it when that session reconnects. See [Offline sessions](#offline-sessions). |
264
254
 
265
255
  ## Keyboard shortcuts
266
256
 
@@ -273,11 +263,11 @@ Use this table to diagnose what you observe in chat, `/intercom`, or tool respon
273
263
 
274
264
  ## Limitations
275
265
 
276
- - **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)).
277
- - **No separate Intercom log.** Messages live in each session's history rather than a dedicated inbox or transcript file.
278
- - **No attachment picker in the overlay.** `file`, `snippet`, and `context` attachments work through the `intercom` tool and protocol, not the `Alt+M` compose overlay.
266
+ - **Local broker sockets.** Each session connects to the broker on its own machine over local sockets or Windows named pipes. Cross-machine delivery requires a shared database ([Running Intercom across machines](#running-intercom-across-machines)).
267
+ - **No separate Intercom log.** Messages live in each session's history rather than a dedicated inbox file.
268
+ - **No attachment picker in the overlay.** `file`, `snippet`, and `context` attachments work through the `intercom` tool, not the `Alt+M` compose overlay.
279
269
  - **Only connected sessions appear.** `intercom list` and the overlay show sessions connected to the broker, not every open Atomic process.
280
- - **Unsaved sessions.** A session started with `--no-session` keeps received messages only in memory, so unread messages are lost if it exits.
281
- - **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)).
282
- - **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)).
283
- - **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)).
270
+ - **Unsaved sessions.** A session started with `--no-session` keeps received messages only in memory, so unread messages are lost on exit.
271
+ - **Subagent queues while 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 non-recoverable single-run modes 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 never queue ([Run control](/subagents#run-control)).
272
+ - **Released subagent asks on a local broker.** Under multi-node routing, replies from remote machines survive broker restarts. Questions asked of a session on the subagent's own local broker live only in that broker, so a broker restart times out the ask ([Released subagents](/intercom/reference#released-subagents)).
273
+ - **Offline session queueing precedence.** Under [multi-node routing](#running-intercom-across-machines), sends to a session that disconnected within about 7 days 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)).