@bastani/atomic 0.10.14 → 0.10.15-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
- package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
- package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
- package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
- package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
- package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
- package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.code.js +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/compaction/compactor.d.ts +0 -8
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +1 -1
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +3 -3
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +2 -2
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +2 -2
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +2 -2
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +2 -2
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +1 -1
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/startup-database-spare.code.js +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +182 -0
- package/docs/background-tasks.md +98 -405
- package/docs/build.md +67 -27
- package/docs/changelog.mdx +11 -1
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +80 -67
- package/docs/environment-variables.md +94 -44
- package/docs/extensions/api-reference.md +86 -43
- package/docs/extensions/authoring.md +162 -154
- package/docs/extensions/events.md +80 -25
- package/docs/extensions/examples.md +90 -85
- package/docs/extensions/ui.md +206 -82
- package/docs/extensions.md +79 -108
- package/docs/getting-started/authentication.md +67 -36
- package/docs/getting-started/first-session.md +53 -43
- package/docs/getting-started/installation.md +117 -90
- package/docs/getting-started/project-instructions.md +48 -34
- package/docs/guides/configuration.md +82 -20
- package/docs/guides/non-interactive.md +66 -24
- package/docs/guides/resume-on-any-machine.md +135 -82
- package/docs/guides/team-setup.md +114 -105
- package/docs/guides.md +76 -32
- package/docs/herdr.md +16 -17
- package/docs/how-atomic-works.md +140 -0
- package/docs/index.md +58 -44
- package/docs/intercom/operations.md +141 -151
- package/docs/intercom/reference.md +85 -108
- package/docs/intercom.md +84 -145
- package/docs/json.md +120 -67
- package/docs/keybindings.md +85 -49
- package/docs/libraries/agent-core.md +137 -275
- package/docs/libraries/ai.md +100 -84
- package/docs/libraries/codemode.md +210 -300
- package/docs/libraries/schema.md +59 -53
- package/docs/libraries/storage-postgres.md +49 -35
- package/docs/libraries/telemetry.md +153 -354
- package/docs/libraries/tui.md +265 -393
- package/docs/libraries.md +42 -26
- package/docs/llama-cpp.md +171 -161
- package/docs/mcp-servers.md +90 -51
- package/docs/models/choose-a-model.md +188 -0
- package/docs/models/reference.md +74 -30
- package/docs/models.md +153 -88
- package/docs/orchestration/migrating-workflows.md +23 -16
- package/docs/orchestration/patterns.md +39 -44
- package/docs/orchestration.md +65 -26
- package/docs/packages/authoring.md +51 -29
- package/docs/packages/reference.md +42 -21
- package/docs/packages.md +69 -58
- package/docs/programmatic.md +118 -24
- package/docs/prompt-templates.md +84 -83
- package/docs/providers/reference.md +43 -48
- package/docs/providers.md +219 -451
- package/docs/quickstart.md +140 -120
- package/docs/reference/cli.md +135 -97
- package/docs/reference.md +20 -19
- package/docs/rpc/examples.md +76 -20
- package/docs/rpc/extension-ui.md +64 -38
- package/docs/rpc/protocol.md +361 -110
- package/docs/rpc.md +57 -17
- package/docs/sdk/reference.md +409 -534
- package/docs/sdk/storage.md +53 -13
- package/docs/sdk/structured-decisions.md +82 -56
- package/docs/sdk/web-server.md +57 -43
- package/docs/sdk.md +106 -84
- package/docs/security.md +42 -64
- package/docs/session-format.md +62 -38
- package/docs/sessions.md +99 -214
- package/docs/settings.md +165 -195
- package/docs/shell-aliases.md +9 -6
- package/docs/skills/authoring.md +69 -48
- package/docs/skills/reference.md +51 -20
- package/docs/skills.md +99 -148
- package/docs/slash-commands.md +129 -0
- package/docs/storage/custom-adapters.md +160 -85
- package/docs/storage/jsonl.md +81 -66
- package/docs/storage/postgres/pgbouncer.md +120 -126
- package/docs/storage/postgres/tuning.md +120 -143
- package/docs/storage/postgres.md +314 -330
- package/docs/storage/sqlite.md +71 -42
- package/docs/storage.md +298 -302
- package/docs/subagents/authoring.md +55 -38
- package/docs/subagents/reference.md +73 -33
- package/docs/subagents.md +119 -187
- package/docs/terminal-setup.md +51 -39
- package/docs/themes/reference.md +23 -19
- package/docs/themes.md +142 -127
- package/docs/tmux.md +47 -55
- package/docs/tools.md +147 -109
- package/docs/tui/reference.md +166 -214
- package/docs/tui.md +196 -341
- package/docs/usage.md +118 -138
- package/docs/verification.md +79 -51
- package/docs/web-access.md +121 -101
- package/docs/windows.md +26 -27
- package/docs/worktree-snapshots/reference.md +245 -0
- package/docs/worktree-snapshots.md +71 -259
- package/package.json +8 -8
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
- package/docs/guides/intercom.md +0 -32
- package/docs/guides/orchestration.md +0 -28
- package/docs/guides/subagents.md +0 -37
- package/docs/termux.md +0 -118
|
@@ -1,152 +1,152 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Operate Intercom"
|
|
3
|
-
sidebarTitle: "
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
51
|
-
- **Installer and update hook.** Installers and `atomic update` finish by running `atomic intercom upgrade
|
|
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
|
-
|
|
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
|
-
|
|
50
|
+
For exported SDK broker errors (`IntercomBrokerProtocolError`, `IntercomBrokerUpgradeError`, `IntercomBrokerStopTimeoutError`, and `IntercomBrokerSuccessorTimeoutError`), see [Broker errors](/intercom/reference#broker-errors).
|
|
57
51
|
|
|
58
|
-
|
|
52
|
+
### Mixed versions and workflows
|
|
59
53
|
|
|
60
|
-
|
|
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
|
-
|
|
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
|
-
|
|
58
|
+
## Broker lifecycle and crash recovery
|
|
65
59
|
|
|
66
|
-
|
|
60
|
+
### Lifecycle and automatic retries
|
|
67
61
|
|
|
68
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
89
|
-
- **Local queues and deduplication.**
|
|
90
|
-
-
|
|
91
|
-
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
###
|
|
111
|
+
### Enable multi-node routing
|
|
122
112
|
|
|
123
|
-
Point every machine at the same [PostgreSQL](/storage/postgres) database
|
|
113
|
+
Point every machine at the same [PostgreSQL](/storage/postgres) database using the same `prefix`:
|
|
124
114
|
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
144
|
+
The broker reads its storage selection from:
|
|
143
145
|
|
|
144
|
-
The
|
|
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
|
-
|
|
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
|
|
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`
|
|
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
|
|
169
|
-
- The selection is invalid (such as a missing `env` secret or
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
193
|
-
-
|
|
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
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
212
|
-
- Queued messages
|
|
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
|
|
214
|
-
-
|
|
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
|
-
|
|
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
|
|
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
|
|
224
|
-
- **No open ports.** Intercom opens no network listeners or broker-to-broker sockets
|
|
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
|
|
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
|
|
232
|
-
- Confirm the remote session has
|
|
233
|
-
- If the database
|
|
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
|
-
**
|
|
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
|
|
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
|
|
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
|
|
250
|
-
| Recoverable disconnect | An explicit Intercom call or overlay action fails visibly while background
|
|
251
|
-
| Reconnect backoff | The session stays disconnected between reconnect attempts. | No action
|
|
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
|
|
253
|
-
| Broker restart or concurrent startup | Sessions disappear briefly, or several sessions start Intercom at once. |
|
|
254
|
-
| Broker started by an older Atomic | After an upgrade, the first session on the newer version replaces the older broker
|
|
255
|
-
| Broker accepts connections but stops answering | List or send requests time out. | Allow about a minute for automatic
|
|
256
|
-
| Broker does not start | The startup or readiness error prints the broker log path and a bounded tail. |
|
|
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.
|
|
258
|
-
| Subagent that is starting | A send or ask to a starting, resuming, or relaunching background subagent waits for registration
|
|
259
|
-
| Subagent
|
|
260
|
-
| Subagent that finished or was paused | A single-target `send` or `ask`
|
|
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
|
|
262
|
-
| Subagent released while
|
|
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
|
|
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
|
|
277
|
-
- **No separate Intercom log.** Messages live in each session's history rather than a dedicated inbox
|
|
278
|
-
- **No attachment picker in the overlay.** `file`, `snippet`, and `context` attachments work through the `intercom` tool
|
|
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
|
|
281
|
-
- **Subagent queues
|
|
282
|
-
- **Released subagent asks on
|
|
283
|
-
- **Offline session queueing precedence.**
|
|
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)).
|