@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.
- package/CHANGELOG.md +29 -0
- 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 +9 -0
- 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 +76 -63
- 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 +116 -89
- 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 +15 -16
- 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 -18
- 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 +50 -38
- package/docs/termux.md +67 -41
- 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
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Intercom reference"
|
|
3
3
|
sidebarTitle: "Intercom"
|
|
4
|
-
description: "Complete specification of the intercom tool, targeting rules, groups, delivery limits,
|
|
4
|
+
description: "Complete specification of the intercom tool, targeting rules, groups, delivery limits, config.json, and exported SDK errors."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
This page is the exact reference for the `intercom` tool, group rules,
|
|
7
|
+
This page is the exact reference for the `intercom` tool, targeting and group rules, wake queues, `config.json`, codemode access, and SDK errors exported from `@bastani/atomic`.
|
|
8
|
+
|
|
9
|
+
For daily usage and `contact_supervisor`, see [Coordinate sessions with Intercom](/intercom). For multi-machine setup, broker upgrades, and troubleshooting, see [Operate Intercom](/intercom/operations). For programmatic group and reach setup, see [Intercom group and reach in the SDK](/sdk#intercom-group-and-reach).
|
|
8
10
|
|
|
9
11
|
## The `intercom` tool {#the-intercom-tool}
|
|
10
12
|
|
|
@@ -13,40 +15,38 @@ This page is the exact reference for the `intercom` tool, group rules, `config.j
|
|
|
13
15
|
| `action` | string | `"list"`, `"groups"`, `"join"`, `"leave"`, `"send"`, `"ask"`, `"reply"`, `"pending"`, `"cancel"`, or `"status"`. |
|
|
14
16
|
| `to` | string | Exact session name, full session ID, or unique 8-hex session UUID prefix. `send` also accepts a session-name glob (`*` only) or `subagents:` target ([Sending to several sessions at once](#sending-to-several-sessions-at-once)). `ask` requires one exact target. |
|
|
15
17
|
| `message` | string | Message text for `send`, `ask`, or `reply`. |
|
|
16
|
-
| `broadcast` | boolean | For `send` to a session-name glob: set `true` to
|
|
18
|
+
| `broadcast` | boolean | For `send` to a session-name glob: set `true` to reach every match. Without it, a glob matching more than one session is refused with the match list. `subagents:` targets broadcast without this flag. |
|
|
17
19
|
| `attachments` | array | Optional `file`, `snippet`, or `context` attachments (`{ type, name, content, language? }`). |
|
|
18
20
|
| `delivery` | string | Case-sensitive mode for `send` and `ask`: `"steer"` (default, arrives after current tool calls without cancelling work), `"followUp"` (arrives after the recipient finishes and stops), or `"interrupt"` (cancels the current model call or cancellable tool call immediately). |
|
|
19
|
-
| `wait` | object | For `ask`: how long to wait for an inline reply before yielding, matching `bash`. Omit for the
|
|
21
|
+
| `wait` | object | For `ask`: how long to wait for an inline reply before yielding, matching `bash`. Omit for the owner wait policy (default 10-second yield, or wait until reply when an SDK host configures `tasks.wait.kind: "until-settled"`), pass `{ kind: "foreground", budgetMs }` to wait up to a budget, or pass `{ kind: "background" }` to return at delivery. |
|
|
20
22
|
| `askId` | string | For `cancel`: any unique case-sensitive prefix (or full ID) of one of your pending outbound asks. If both `askId` and `replyTo` are passed to `cancel`, `askId` takes precedence and `replyTo` is ignored. |
|
|
21
|
-
| `replyTo` | string | Exact message ID or exact 8-hex UUID prefix of an unresolved inbound ask. With `reply`, overrides current-turn and pending-ask fallback. With `cancel`, closes that inbound ask without
|
|
22
|
-
| `group` | string | Group name for `join` or
|
|
23
|
+
| `replyTo` | string | Exact message ID or exact 8-hex UUID prefix of an unresolved inbound ask. With `reply`, overrides current-turn and pending-ask fallback. With `send`, skips `confirmSend` confirmation and marks that inbound ask replied. With `cancel`, closes that inbound ask without notifying its sender. |
|
|
24
|
+
| `group` | string | Group name for `join` or targeted `leave`, or a read-only group filter for `list` and `status`. Passing `group` on `send` or `ask` fails with an error if the session is not a member of that group, and is ignored if it is (`send` and `ask` always route within your memberships or reach policy). |
|
|
23
25
|
|
|
24
26
|
### Actions
|
|
25
27
|
|
|
26
28
|
| Action | Behavior |
|
|
27
29
|
| --- | --- |
|
|
28
|
-
| `join` | Adds a trimmed named group membership, creating the group if needed. Waits for broker confirmation and reports the resulting membership set. Joining `default` while multi-node routing is on adds a warning. `true` and `auto` are reserved (case-insensitively) for subagent auto-groups. |
|
|
30
|
+
| `join` | Adds a trimmed named group membership, creating the group if needed. Waits for broker confirmation and reports the resulting membership set. Joining `default` while multi-node routing is on adds a warning. `"true"` and `"auto"` are reserved (case-insensitively) for subagent auto-groups. |
|
|
29
31
|
| `leave` | With `group`, removes that membership and keeps all others; if it was your only remaining group, returns you to your resolved startup home group (for example `project:<path>` under multi-node routing, or `"default"` locally). Without `group`, resets memberships to the startup home group. Reports the resulting membership set. |
|
|
30
|
-
| `groups` | Lists every group with at least one connected session,
|
|
32
|
+
| `groups` | Lists every group with at least one connected session, its session count, and whether this session belongs to it. |
|
|
31
33
|
| `list` | Lists the current session and active sessions visible through your memberships. Pass `group` for a read-only view of one group. |
|
|
32
34
|
| `send` | Fire-and-forget delivery through ordinary Intercom. Requires `to` and `message`; cannot message the current session. |
|
|
33
35
|
| `ask` | Sends a question to a live recipient and returns at delivery with `askId`, `delivered`, and `recipient` (`name`, `state`, and `currentAction` when known). A reply within `wait` returns inline; otherwise the ask stays pending with no expiry and its reply arrives later as a message ([send vs ask vs reply](#send-vs-ask-vs-reply)). |
|
|
34
36
|
| `reply` | Answers the Intercom message that triggered the current turn, or falls back to the sole unresolved inbound ask. With multiple pending asks, pass `to` or inspect with `pending` and pass `replyTo`. |
|
|
35
37
|
| `pending` | Lists unresolved inbound asks (sender, message ID, elapsed time, and preview) and your pending outbound asks (ask ID, target, elapsed time, and question). |
|
|
36
|
-
| `cancel` | With `askId` (any unique case-sensitive prefix), cancels one of your outbound asks (a reply
|
|
37
|
-
| `status` | Reports connection state, session ID, all group memberships (plus reachable groups when a [reach policy](#reach-policies) applies), visible active session count,
|
|
38
|
+
| `cancel` | With `askId` (any unique case-sensitive prefix), cancels one of your outbound asks (a late reply still displays once, marked late). With `replyTo` (exact full ID or exact 8-hex prefix), closes an inbound ask without replying; it leaves `pending`, stays closed across restarts, and sends nothing to the asker. If both `askId` and `replyTo` are passed, `askId` wins. |
|
|
39
|
+
| `status` | Reports connection state, session ID, all group memberships (plus reachable groups when a [reach policy](#reach-policies) applies), visible active session count, broker multi-node routing state with live peer broker count, and pending outbound ask count. Passing `group` performs a read-only peek. |
|
|
38
40
|
|
|
39
|
-
To give two
|
|
41
|
+
To give two sessions a private shared group, have both call:
|
|
40
42
|
|
|
41
43
|
```typescript
|
|
42
44
|
intercom({ action: "join", group: "api-review" })
|
|
43
45
|
```
|
|
44
46
|
|
|
45
|
-
Joining is additive and keeps existing memberships and the current session ID.
|
|
46
|
-
|
|
47
|
-
Reconnection preserves the startup home identity separately from joined memberships. Groups you explicitly left stay absent after reconnect, and the startup group is not automatically re-added.
|
|
47
|
+
Joining is additive and keeps existing memberships and the current session ID. Call `intercom({ action: "leave", group: "api-review" })` to remove one group, or `intercom({ action: "leave" })` to reset to the startup home group. Rejected or unacknowledged changes leave membership state unchanged. Reconnection preserves the startup home identity separately from joined memberships, so groups you left stay absent after reconnect.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Intercom records sent and received messages as custom entries in session history (see [CustomEntry in Session file format](/session-format#customentry)).
|
|
50
50
|
|
|
51
51
|
### Targeting sessions
|
|
52
52
|
|
|
@@ -59,7 +59,7 @@ Live session lookup checks targets in this order:
|
|
|
59
59
|
|
|
60
60
|
Ambiguous prefixes list only authorized candidates and require the full UUID. Isolated subagents can target their authorized supervisor by a unique 8-hex UUID prefix without gaining access to unrelated groups.
|
|
61
61
|
|
|
62
|
-
Reopened sessions and restored background subagents reclaim their previous Intercom session ID so peers can keep using the ID printed by `intercom list`.
|
|
62
|
+
Reopened sessions and restored background subagents reclaim their previous Intercom session ID (persisted as a custom session entry; see [Session file format](/session-format#customentry)) so peers can keep using the ID printed by `intercom list`. While a live session holds an ID, another registration receives a fresh ID instead; once released, only that same Atomic session can reclaim it while the broker remembers its previous holder.
|
|
63
63
|
|
|
64
64
|
With [multi-node routing](/intercom/operations#running-intercom-across-machines), session ID reclaim works across machines once the shared database has the current schema (on [PostgreSQL](/storage/postgres), run `atomic storage migrate` as the schema owner role):
|
|
65
65
|
|
|
@@ -75,12 +75,12 @@ With [multi-node routing](/intercom/operations#running-intercom-across-machines)
|
|
|
75
75
|
| Target | Reaches |
|
|
76
76
|
| --- | --- |
|
|
77
77
|
| `subagent-worker-*`, `subagent-*`, `*` | Every visible live session in your groups whose name (or session ID if unnamed) matches, excluding yourself. **Only `*` is a wildcard** (case-insensitive); `?` and `[...]` match literally. |
|
|
78
|
-
| `subagents:*` | Every **running, released, or paused** subagent launched by this session across all runs.
|
|
79
|
-
| `subagents:<runId>/*` | Every **running, released, or paused** subagent in one `subagent` run (`subagents:` prefix is case-sensitive; `<runId>` cannot contain `/` or `*`).
|
|
78
|
+
| `subagents:*` | Every **running, released, or paused** subagent launched by this session across all runs. Excludes `quit` subagents. |
|
|
79
|
+
| `subagents:<runId>/*` | Every **running, released, or paused** subagent in one `subagent` run (`subagents:` prefix is case-sensitive; `<runId>` cannot contain `/` or `*`). Excludes `quit` subagents. |
|
|
80
80
|
|
|
81
81
|
Each recipient receives its own direct send (dispatched up to 16 concurrently) with standard receipts, refusals, and reconnect retries. Pattern sends never [resume a finished subagent](#messages-that-resume-a-finished-subagent): a copy targeting an ended subagent returns the refusal in [Subagents with no live session](#subagents-with-no-live-session). The result lists every recipient's outcome (`delivered`, `queued`, `not delivered` with reason, or `outcome unknown`) and errors only if zero recipients were reached. A glob matching no visible session returns an error listing up to 5 closest visible names.
|
|
82
82
|
|
|
83
|
-
A name glob matching more than one session (including `*`) requires `broadcast: true`. Without it, nothing is sent and the error lists every match so you can pick one exact name or repeat with `broadcast: true`. A glob matching a single session sends without the flag
|
|
83
|
+
A name glob matching more than one session (including `*`) requires `broadcast: true`. Without it, nothing is sent and the error lists every match so you can pick one exact name or repeat with `broadcast: true`. A glob matching a single session sends without the flag, and `subagents:*` / `subagents:<runId>/*` never require `broadcast: true`. When `confirmSend: true` is set in an interactive session, a pattern send shows one confirmation prompt listing all matched recipients before sending.
|
|
84
84
|
|
|
85
85
|
```typescript
|
|
86
86
|
intercom({ action: "send", to: "subagent-worker-*", message: "Scope changed", broadcast: true })
|
|
@@ -88,16 +88,14 @@ intercom({ action: "send", to: "subagent-worker-*", message: "Scope changed", br
|
|
|
88
88
|
|
|
89
89
|
Patterns match only live sessions visible in `intercom list` and never cross group boundaries. `ask` and `replyTo` require one exact target and reject patterns.
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
Session list rows show the copyable session ID first, followed by status and working directory. Generated fallback aliases are hidden in list formatting while remaining valid lookup targets. Non-agent connections (such as internal control connections) are always refused as message targets.
|
|
91
|
+
Session list rows display the copyable session ID first, followed by status and working directory. Generated fallback aliases are hidden in list formatting while remaining valid lookup targets. Non-agent connections (such as internal control connections) are always refused as message targets.
|
|
94
92
|
|
|
95
93
|
### Groups
|
|
96
94
|
|
|
97
95
|
Every session belongs to a non-empty set of Intercom groups. Sessions with no explicit group belong only to `"default"` locally (or their [project group](/intercom/operations#project-groups) when multi-node routing is on). Ordinary discovery and messaging require at least one shared group membership; cross-group sends are rejected by the broker.
|
|
98
96
|
|
|
99
97
|
- **Case sensitivity.** Group names are case-sensitive (`"Team"` and `"team"` are separate groups). The reserved names `"true"` and `"auto"` are rejected case-insensitively by `join` and `leave`.
|
|
100
|
-
- **Leaving your last group.** Calling `leave` with `group` naming your only group returns you to your resolved startup home group (
|
|
98
|
+
- **Leaving your last group.** Calling `leave` with `group` naming your only group returns you to your resolved startup home group (`project:<path>` under multi-node routing, or `"default"` locally). Calling `leave` with no `group` resets all memberships to your startup home group.
|
|
101
99
|
- **Persistence.** Joined and left memberships persist across restarts of the same session under the same home group, and are not inherited by forked sessions.
|
|
102
100
|
- **Commands.** `list` returns the union of sessions visible through your memberships (or a read-only peek of one `group`), `groups` lists all active groups, and `status` reports your complete membership set.
|
|
103
101
|
|
|
@@ -106,7 +104,7 @@ Home group resolution follows this precedence (highest first):
|
|
|
106
104
|
1. Explicit task or subagent `group`
|
|
107
105
|
2. Inherited launching-session group
|
|
108
106
|
3. SDK host `group` passed to [`createAgentSession({ intercom })`](/sdk#intercom-group-and-reach)
|
|
109
|
-
4. Environment variable `ATOMIC_INTERCOM_GROUP` (setting `ATOMIC_INTERCOM_GROUP=""`
|
|
107
|
+
4. Environment variable `ATOMIC_INTERCOM_GROUP` (setting `ATOMIC_INTERCOM_GROUP=""` shadows legacy `PI_INTERCOM_GROUP` and falls through to `config.json`)
|
|
110
108
|
5. `"group"` in Intercom `config.json`
|
|
111
109
|
6. Project group `project:<path>` while multi-node routing is on
|
|
112
110
|
7. `"default"`
|
|
@@ -118,10 +116,10 @@ Supervisor authorization is granted by the launching parent and allows `contact_
|
|
|
118
116
|
A session can receive a message from outside its groups (for example from a session with a [reach policy](#reach-policies), or through supervisor escalation). The recipient may answer that sender directly using `send` or `ask` without joining a new group, subject to strict return-path limits:
|
|
119
117
|
|
|
120
118
|
- **Single-session scope.** The return path reaches only that specific sender by explicit `send` or `ask`, never by pattern send (`*`, `subagents:*`), and does not add the sender to `intercom list`.
|
|
121
|
-
- **Session-bound.** When the sender quits permanently, the path closes; another session taking the same name or ID later cannot be reached through it.
|
|
122
|
-
- **Count and
|
|
119
|
+
- **Session-bound.** Both sessions must have a stable session identity (return address) to open or use a return path. When the sender quits permanently, the path closes; another session taking the same name or ID later cannot be reached through it.
|
|
120
|
+
- **Count, window, and broker cap.** Up to **3 messages** within **30 minutes** of the sender's latest message to you. Each new message from that sender resets the count and 30-minute window; retried deliveries do not reopen it, and retried answers count once. Each broker keeps up to **10,000** active return paths, dropping and closing the oldest when full.
|
|
123
121
|
- **Multi-node support.** Return paths work identically across machines, including offline-session queueing if the sender disconnects.
|
|
124
|
-
- **Reach-policy exclusion.** A session
|
|
122
|
+
- **Reach-policy exclusion.** A session with its own [reach policy](#reach-policies) never uses return paths; recipients without a reach policy can still answer it through a return path.
|
|
125
123
|
|
|
126
124
|
Once closed, sends to that sender fail with `<sender> is outside your intercom groups and its return path has closed`. Return paths live in broker memory and clear on broker restart. If a session inside your own groups shares the same name, address the external sender by session ID. For longer exchanges, join a shared group.
|
|
127
125
|
|
|
@@ -133,7 +131,7 @@ Once closed, sends to that sender fail with `<sender> is outside your intercom g
|
|
|
133
131
|
|
|
134
132
|
| `wait` | Behavior |
|
|
135
133
|
| --- | --- |
|
|
136
|
-
| Omitted | Waits up to the automatic yield (default 10 seconds) and returns the reply inline if it arrives in time. |
|
|
134
|
+
| Omitted | Waits up to the owner's automatic yield (default 10 seconds; waits until reply if an SDK host configures `tasks.wait.kind: "until-settled"`) and returns the reply inline if it arrives in time. |
|
|
137
135
|
| `{ kind: "foreground", budgetMs }` | Waits up to `budgetMs`, then yields. |
|
|
138
136
|
| `{ kind: "background" }` | Returns immediately after delivery. |
|
|
139
137
|
|
|
@@ -150,11 +148,11 @@ If an `ask` yields or is interrupted, it stays pending with no expiry. Its reply
|
|
|
150
148
|
|
|
151
149
|
An inbound ask stays in `pending` until you reply to it or close it with `intercom({ action: "cancel", replyTo })`. It also closes automatically when no reply can reach the asker (for example if the asker was one of your subagents and ended, or if the broker rejects the route).
|
|
152
150
|
|
|
153
|
-
**Subagents and terminal
|
|
151
|
+
**Subagents and terminal children.** Single-target `send` and `ask` calls from `intercom` to completed or failed subagents queue immediately and resume the subagent through its launching session. Calls to paused or quit subagents queue without resuming until the launching session continues them.
|
|
154
152
|
|
|
155
|
-
Only permanently cancelled (`killed`) subagents, pattern sends, calls past the wake rate or chain limits, or a
|
|
153
|
+
Only permanently cancelled (`killed`) subagents, pattern sends, calls past the wake rate or chain limits, or a live non-interactive child whose host marks it terminal (`replyCapability: "terminal"` in session metadata, indicating the child cannot answer interactive asks) reject asks immediately with `Target noninteractive child is terminal and cannot reply; launch a fresh child with explicit context`. In-flight pending asks fail explicitly if the recipient terminates before replying. Live interactive idle sessions remain askable.
|
|
156
154
|
|
|
157
|
-
**`contact_supervisor`** allows one blocking `need_decision`
|
|
155
|
+
**`contact_supervisor`** allows one blocking `need_decision` or `interview_request` wait per subagent at a time (coexisting with ordinary peer asks and sharing the `maxPendingAsks` capacity). Only `progress_update` unconditionally requires `message`; `need_decision` allows omitting `message` (sending an empty question, so callers should always supply a clear question), and `interview_request` requires `interview` with an optional `message`. A second concurrent blocking supervisor wait fails with `Already waiting for a supervisor reply`. Blocking waits time out after 10 minutes. Only a direct single-child launch in an embedded SDK session without background task management uses the terminal `[TASK_CONTEXT]` fresh-child handoff when a blocking request is claimed.
|
|
158
156
|
|
|
159
157
|
**`reply`** targets the incoming Intercom message that triggered the current turn, or falls back to the single unresolved inbound ask. When multiple asks are pending, inspect with `pending` and pass `to` or the exact `replyTo` message ID (required when one sender has multiple open asks). Explicit `to` and `replyTo` selectors override the active turn, must match each other if both are provided, and fail without fallback when unknown or stale.
|
|
160
158
|
|
|
@@ -171,7 +169,7 @@ Message text is capped at **1 MiB** (UTF-8 bytes), and text plus all attachment
|
|
|
171
169
|
|
|
172
170
|
For larger payloads, write a file and send its path.
|
|
173
171
|
|
|
174
|
-
Any received message whose text and attachments exceed **50
|
|
172
|
+
Any received message whose text and attachments exceed **50 KiB** (51,200 UTF-8 bytes) is saved to a file in the recipient's session directory (or temporary directory when unsaved) instead of entering context whole. The chat card displays a preview and the file path, matching oversized tool output.
|
|
175
173
|
|
|
176
174
|
## Configuration
|
|
177
175
|
|
|
@@ -179,8 +177,6 @@ Create `~/.atomic/agent/intercom/config.json` (or under `ATOMIC_CODING_AGENT_DIR
|
|
|
179
177
|
|
|
180
178
|
```json
|
|
181
179
|
{
|
|
182
|
-
"brokerCommand": "npx",
|
|
183
|
-
"brokerArgs": ["--no-install", "tsx"],
|
|
184
180
|
"brokerStartupTimeoutMs": 30000,
|
|
185
181
|
"confirmSend": false,
|
|
186
182
|
"maxPendingAsks": 6,
|
|
@@ -193,8 +189,6 @@ Create `~/.atomic/agent/intercom/config.json` (or under `ATOMIC_CODING_AGENT_DIR
|
|
|
193
189
|
|
|
194
190
|
| Setting | Default | Description |
|
|
195
191
|
| --- | --- | --- |
|
|
196
|
-
| `brokerCommand` | `"npx"` | Non-empty trimmed string naming the command used to start the local broker process. The default sentinel uses Atomic's own runtime without requiring `npx` or `tsx` on `PATH`. |
|
|
197
|
-
| `brokerArgs` | `["--no-install", "tsx"]` | String array of arguments passed to `brokerCommand` before the broker script path. |
|
|
198
192
|
| `brokerStartupTimeoutMs` | `30000` | Integer >= `1000`. Milliseconds a spawn attempt waits for a newly started broker to answer on its socket. |
|
|
199
193
|
| `confirmSend` | `false` | Boolean. Show a confirmation dialog before single or broadcast non-reply sends in interactive sessions with UI. |
|
|
200
194
|
| `maxPendingAsks` | `6` | Integer >= `1`. Maximum concurrent blocking reply waits per session (shared by `intercom` `ask` and `contact_supervisor`); further asks still send and deliver replies as messages. |
|
|
@@ -202,8 +196,10 @@ Create `~/.atomic/agent/intercom/config.json` (or under `ATOMIC_CODING_AGENT_DIR
|
|
|
202
196
|
| `status` | None | Optional custom string suffix appended after the automatic lifecycle status (for example `thinking · researching`). |
|
|
203
197
|
| `group` | `"default"`, or project group with multi-node routing | String setting the default home Intercom group ([Groups](#groups)). An empty string `""` falls through to the project group or `"default"`. Overridden by `ATOMIC_INTERCOM_GROUP` / `PI_INTERCOM_GROUP`, SDK host `intercom` policy, and subagent group injection. |
|
|
204
198
|
| `joinAtStartup` | `true` | Boolean. Have interactive sessions join Intercom automatically 3 seconds after startup. Set `false` to join on first Intercom use instead. Overridden by `ATOMIC_INTERCOM_JOIN_AT_STARTUP` (`0`/`false` disables, `1`/`true` enables; legacy `PI_INTERCOM_JOIN_AT_STARTUP`). |
|
|
199
|
+
| `brokerCommand` | Bundled runtime | Optional non-empty trimmed command string overriding the runtime used to spawn the local broker. Leave unset to use Atomic's bundled runtime (`npx` and `tsx` are not required on `PATH`). |
|
|
200
|
+
| `brokerArgs` | Bundled runtime | Optional string array of arguments passed to `brokerCommand` before the broker script path. Set together with `brokerCommand` when using a custom runtime. |
|
|
205
201
|
|
|
206
|
-
|
|
202
|
+
For example, to run the local broker with Bun from `PATH` instead of Atomic's bundled runtime:
|
|
207
203
|
|
|
208
204
|
```json
|
|
209
205
|
{
|
|
@@ -214,15 +210,13 @@ Explicit custom broker commands remain supported. For example, to run the broker
|
|
|
214
210
|
|
|
215
211
|
Config validation is strict for the 9 recognized keys above (unknown extra keys are ignored): if `config.json` is invalid JSON or any recognized key has an invalid type or range, the entire file is rejected, an error is logged, and all defaults apply.
|
|
216
212
|
|
|
217
|
-
Intercom publishes live session status automatically: sessions register as `idle`, switch to `thinking` while running, show `tool:<name>` during tool calls, and return to `idle` on completion. Any configured `status` string is appended rather than replacing lifecycle status.
|
|
218
|
-
|
|
219
|
-
Activity status is separate from reply capability. As an SDK/host metadata field, session rows expose `replyCapability` (`"live"` or `"terminal"`) when supplied by the host. A still-connected non-interactive child marked `"terminal"` rejects asks even if its activity reads `idle`, while a completed or failed subagent whose session has ended is resumed by single-target `send` or `ask` from the `intercom` tool.
|
|
213
|
+
Intercom publishes live session status automatically: sessions register as `idle`, switch to `thinking` while running, show `tool:<name>` during tool calls, and return to `idle` on completion. Any configured `status` string is appended rather than replacing lifecycle status. Session rows may also include host-supplied `replyCapability` (`"live"` or `"terminal"`) to indicate whether a live non-interactive child can answer interactive asks.
|
|
220
214
|
|
|
221
215
|
## Subagent delivery and wake queues
|
|
222
216
|
|
|
223
217
|
### Released subagents
|
|
224
218
|
|
|
225
|
-
A [released subagent](/subagents#released-subagents) stays addressable through its launching session. That session asks the broker to hold sends
|
|
219
|
+
A [released subagent](/subagents#released-subagents) stays addressable through its launching session. That session asks the broker to hold sends targeting the subagent's name and IDs and wakes the subagent when a message arrives. Only the launching session owns that hold; if its connection closes, sends wait up to 20 seconds and fail with `recipient_owner_suspended` until the same Atomic session reconnects and takes the hold back.
|
|
226
220
|
|
|
227
221
|
A background subagent waiting on an `ask` or on `contact_supervisor` (`need_decision` or `interview_request`) can be released while its question remains open, under both local and [multi-node routing](/intercom/operations#running-intercom-across-machines). While multi-node routing is starting or unavailable, the subagent stays live instead.
|
|
228
222
|
|
|
@@ -230,43 +224,56 @@ A background subagent waiting on an `ask` or on `contact_supervisor` (`need_deci
|
|
|
230
224
|
- **Exactly-once replies.** Each question accepts one reply across all nodes. Later replies to the same question are refused and never queued as ordinary messages. Retries with the same message ID return the first attempt's outcome.
|
|
231
225
|
- **When a reply is refused.** A reply fails without reaching the subagent if the launching session disconnected, dropped the hold, or ended, or if the subagent itself ended or was stopped. If the subagent's `ask` already yielded before release, the reply (or refusal) is held like an ordinary send and wakes the subagent as a `Reply to your ask` message.
|
|
232
226
|
- **Authorized receiver only.** Only the relaunched subagent presenting the launching session's supervisor capability receives held sends. Unrelated sessions registering the same name receive nothing and do not end the hold.
|
|
233
|
-
- **Save confirmation.** The launching session confirms the reply once saved. If it does not confirm within about 8 seconds, the replier gets an [uncertain-outcome failure](/intercom/operations#
|
|
227
|
+
- **Save confirmation.** The launching session confirms the reply once saved. If it does not confirm within about 8 seconds, the replier gets an [uncertain-outcome failure](/intercom/operations#delivery-receipts-and-crash-recovery) and may retry. Reusing a message ID already awaiting confirmation for another reply fails with `message_id_conflict`.
|
|
234
228
|
- **How long a question stays open.** A reply route backed by a live launching session stays open until answered or until the question's original deadline expires. A reply route whose launching session disconnected or never reserved the subagent is dropped once the launching session has been away for 7 days, matching away-session ask retention.
|
|
235
229
|
- **Multi-node and restarts.** Without multi-node routing, the replier and launching session must share a local broker, and a broker restart drops local reply routes (delivering a timeout to the subagent). With multi-node routing on, questions asked of remote peers live in the shared database and survive both session reopens and broker restarts.
|
|
236
|
-
- **
|
|
230
|
+
- **Capacity limits.** Each local broker keeps up to **10,000** local released-asker reply routes (shared-database routes do not count toward this cap; past 10,000, new routes are refused and the subagent wakes with a failed-ask message). Restoring and released holds accept up to **256** held sends per child and remember up to **4,096** orphaned reservations for disconnected launching sessions (evicting the oldest when full).
|
|
231
|
+
|
|
232
|
+
**Reply and hold refusal `reasonCode` values:**
|
|
233
|
+
|
|
234
|
+
| `reasonCode` | Retryable | When | What to do |
|
|
235
|
+
| --- | --- | --- | --- |
|
|
236
|
+
| `released_reply_answered` | No | The launching session already accepted another reply to this question, or refused a duplicate handoff after a lost confirmation. | Do not resend this reply. Send a new ordinary message if the subagent needs follow-up. |
|
|
237
|
+
| `released_reply_in_flight` | Yes | Another reply to this question is currently being handed to the launching session. | Wait briefly, then reply again if the question is still unanswered. |
|
|
238
|
+
| `route_unavailable` | Yes | The ask's reply route is still being restored or its broker is temporarily unreachable (`details.retryLater: true`). | Try replying again shortly. |
|
|
239
|
+
| `message_id_conflict` | No | The message ID is already awaiting confirmation for another reply or was already delivered with a different target or payload. | Send a new reply with a fresh message ID. |
|
|
240
|
+
| `recipient_not_restored` | Yes | A send or ask was held while the subagent was restoring or waking, and the hold ended first. | Retry shortly if the subagent is still restoring, or launch a fresh subagent if it did not survive. |
|
|
241
|
+
| `recipient_parked` | No | The launching session keeps the subagent parked (paused or quit) and does not wake it automatically for sends. | Ask the launching session to resume the subagent. |
|
|
242
|
+
| `recipient_owner_suspended` | Yes | The subagent is released, but its launching session is disconnected or suspended. | Retry once the launching session reconnects. |
|
|
237
243
|
|
|
238
244
|
### Subagents with no live session
|
|
239
245
|
|
|
240
246
|
When a non-released subagent disconnects or ends, the broker holds sends and asks targeting its name, Atomic session ID, or Intercom session ID for up to 20 seconds. If it reconnects under its launching session's authorization, held messages deliver once in order.
|
|
241
247
|
|
|
242
|
-
Once the launching session reports how the run ended, senders in the subagent's group (and the launching session) receive either automatic resume queueing (see below) or a
|
|
243
|
-
|
|
244
|
-
The send result exposes `reasonCode` and `error` (`target`, `childName`, optional `childId`, `hint`, `retryable`). Check `isIntercomRecipientGoneError`, `isSubagentRecipientEndedError`, `isSubagentRecipientDisconnectedError`, `isSubagentRecipientOwnerSuspendedError`, or `isRetryableIntercomRecipientGoneError` rather than matching text. Import these classes, guards, `IntercomRecipientGoneErrorCode`, and `serializeIntercomRecipientGoneError` / `rehydrateIntercomRecipientGoneError` from `@bastani/intercom`.
|
|
248
|
+
Once the launching session reports how the run ended, senders in the subagent's group (and the launching session) receive either automatic resume queueing (see below) or a delivery refusal explaining why the subagent is gone. Senders in other groups receive `Session not found`. If no owner report arrives within 20 seconds, senders receive a retryable `recipient_disconnected` refusal.
|
|
245
249
|
|
|
246
|
-
|
|
247
|
-
| --- | --- | --- | --- | --- |
|
|
248
|
-
| `SubagentRecipientEndedError` | `recipient_completed` | The subagent completed, and the send did not [ask to resume it](#messages-that-resume-a-finished-subagent) or hit a wake bound. | `false` | Ask the launching session to run `subagent({ action: "resume", id: "<childId>", message })`. |
|
|
249
|
-
| `SubagentRecipientEndedError` | `recipient_failed` | The subagent failed. | `false` | Same as above. |
|
|
250
|
-
| `SubagentRecipientEndedError` | `recipient_stopped` | The subagent was paused, quit, or interrupted. | `false` | Same as above. |
|
|
251
|
-
| `SubagentRecipientEndedError` | `recipient_cancelled` | The subagent was permanently cancelled. | `false` | Launch a fresh subagent if its work is still needed. |
|
|
252
|
-
| `SubagentRecipientDisconnectedError` | `recipient_disconnected` | The subagent disconnected, did not reconnect within 20 seconds, and no owner report arrived. | `true` | Check `subagent({ action: "status" })` in the launching session, or retry shortly. |
|
|
253
|
-
| `SubagentRecipientOwnerSuspendedError` | `recipient_owner_suspended` | The subagent is released, but its launching session is disconnected or suspended. | `true` | Retry once the launching session reconnects. |
|
|
250
|
+
When a delivery is refused, the tool result reports the human-readable reason and guidance (and underlying broker failures carry the `reasonCode` below):
|
|
254
251
|
|
|
255
|
-
|
|
252
|
+
| `reasonCode` | Retryable | When | What to do |
|
|
253
|
+
| --- | --- | --- | --- |
|
|
254
|
+
| `recipient_completed` | No | The subagent completed and the send did not trigger automatic resume (for example, a pattern send or a wake-limit refusal). | Ask the launching session to run `subagent({ action: "resume", id: "<childId>", message })`. |
|
|
255
|
+
| `recipient_failed` | No | The subagent failed and was not queued for resume. | Same as above. |
|
|
256
|
+
| `recipient_stopped` | No | The subagent was paused, quit, or interrupted and was not queued for resume. | Same as above. |
|
|
257
|
+
| `recipient_cancelled` | No | The subagent was permanently cancelled. | Launch a fresh subagent if its work is still needed. |
|
|
258
|
+
| `recipient_disconnected` | Yes | The subagent disconnected, did not reconnect within 20 seconds, and no owner report arrived. | Check `subagent({ action: "status" })` in the launching session, or retry shortly. |
|
|
259
|
+
| `recipient_owner_suspended` | Yes | The subagent is released, but its launching session is disconnected or suspended. | Retry once the launching session reconnects. |
|
|
260
|
+
| `recipient_not_restored` | Yes | The hold ended while the subagent was being restored or woken. | Retry shortly, or launch a fresh subagent if it did not survive. |
|
|
261
|
+
| `recipient_parked` | No | The launching session parked the subagent (paused or quit) and will not auto-wake it. | Ask the launching session to resume the subagent. |
|
|
256
262
|
|
|
257
263
|
### Messages that resume a finished subagent
|
|
258
264
|
|
|
259
|
-
A single-target `send` or `ask` from the `intercom` tool to a subagent by name or ID
|
|
265
|
+
A single-target `send` or `ask` from the `intercom` tool to a subagent by name or ID wakes a completed or failed subagent automatically. Behavior depends on the subagent's current state:
|
|
260
266
|
|
|
261
|
-
|
|
|
267
|
+
| Subagent state | Immediate tool result | What happens next |
|
|
262
268
|
| --- | --- | --- |
|
|
263
|
-
| Completed or failed | Returns at once with `queued: true` and `target: "resuming subagent"`. | The launching session resumes the subagent in its own session (same model, tools, and agent) and delivers your message
|
|
264
|
-
|
|
|
265
|
-
|
|
|
269
|
+
| Completed or failed | Returns at once with `queued: true` and `target: "resuming subagent"`. | The launching session resumes the subagent in its own session (same model, tools, and agent) and delivers your message as its next prompt. |
|
|
270
|
+
| Live subagent paused mid-turn (`Esc`) | Returns at once with `queued: true` and `target: "paused subagent (saved)"`. | Held by the live subagent itself and delivered when continued. |
|
|
271
|
+
| Stopped/paused or quit (or interrupted with its parent) | Returns at once with `queued: true` and `target: "paused subagent"`. | Held by the broker without auto-resuming. Delivered after the continuation prompt once the launching session continues it. |
|
|
272
|
+
| Permanently cancelled or gone | Refused immediately (`recipient_cancelled`). | Nothing is queued. |
|
|
266
273
|
|
|
267
274
|
The launching session keeps ownership of the resumed subagent: its completion notice, `/tasks` entry, budget, and `pause`/`quit` controls stay in that session, and its transcript records who woke it. An `ask` stays open and delivers its answer later as `Reply to your ask <id> from <name>`.
|
|
268
275
|
|
|
269
|
-
If a queued message can no longer be delivered, the sender receives one delivery failure (a failed ask or `Intercom delivery failed`). Common causes are the subagent being cancelled, the launching session declining or missing the 20-second wake reply window, the resumed subagent failing to start within 1 hour, or the launching session ending or staying away for 7 days
|
|
276
|
+
If a queued message can no longer be delivered, the sender receives one delivery failure (a failed ask or `Intercom delivery failed`). Common causes are the subagent being cancelled, the launching session declining or missing the 20-second wake reply window, the resumed subagent failing to start within 1 hour, or the launching session ending or staying away for 7 consecutive days.
|
|
270
277
|
|
|
271
278
|
Messages for paused subagents have no wait limit while the launching session stays connected. Senders outside the subagent's group still receive `Session not found`.
|
|
272
279
|
|
|
@@ -278,18 +285,18 @@ After a broker restart, crash, or reboot, the next broker restores queued messag
|
|
|
278
285
|
|
|
279
286
|
- When the launching session reconnects and reports the subagent, completed or failed subagents resume once for their queued messages, while paused or quit subagents keep waiting until continued.
|
|
280
287
|
- The broker waits up to 7 consecutive days while the launching session is away; reconnecting resets that 7-day counter, and connected launching sessions have no wait limit.
|
|
281
|
-
- A message already handed to the subagent just before a broker crash is redelivered on reconnect without triggering a duplicate resume, and
|
|
288
|
+
- A message already handed to the subagent just before a broker crash is redelivered on reconnect without triggering a duplicate resume, and an already-saved copy is ignored.
|
|
282
289
|
- A sender retrying the same message ID after a disconnect receives `queued` again without duplicating the stored message.
|
|
283
290
|
|
|
284
291
|
If the queue store cannot open at startup (after 2 seconds locally, or up to 5 seconds while waiting for a shared database), the broker falls back to memory and tells senders after a restart if any queued message was lost. Switching `storage` between local and shared also discards old unconsumed queues rather than redelivering messages already reported lost.
|
|
285
292
|
|
|
286
|
-
A write blocked by another process's lock for 5 seconds fails immediately. Local disk space is reclaimed automatically once the queue empties; shared databases reclaim deleted rows through their own maintenance, such as
|
|
293
|
+
A write blocked by another process's lock for 5 seconds fails immediately. Local disk space is reclaimed automatically once the queue empties; shared databases reclaim deleted rows through their own maintenance, such as PostgreSQL autovacuum.
|
|
287
294
|
|
|
288
|
-
**Wake and queue limits:**
|
|
295
|
+
**Wake, deduplication, and queue limits:**
|
|
289
296
|
|
|
290
|
-
- **Wake rate
|
|
291
|
-
- **
|
|
292
|
-
- **
|
|
297
|
+
- **Wake rate and chain limits.** At most **6** message-triggered resumes per subagent within **10 minutes**, and a maximum wake chain depth of **4** (remembered for up to **4,096** children per broker). Exceeding either limit returns the subagent's ended refusal with the reason.
|
|
298
|
+
- **Queue capacity.** Up to **256 messages** and **32 MiB** per subagent, **256 MiB** across one broker, and a **1,088 MiB** local-file cap. Queued messages are never dropped to make room; new messages past a cap are refused until space frees up.
|
|
299
|
+
- **Delivered-message cache.** `delivered-messages.sqlite` tracks up to **10,000** entries and **64 MiB** for cross-restart deduplication.
|
|
293
300
|
- **Scope.** Pattern sends (`subagents:*`, `name-*`), replies, and older clients never wake an ended subagent. Under [multi-node routing](/intercom/operations#running-intercom-across-machines), only senders on the launching session's broker trigger this wake queue; senders on other hosts use the [offline-session queue](/intercom/operations#offline-sessions).
|
|
294
301
|
|
|
295
302
|
## Programmatic and SDK reference
|
|
@@ -319,7 +326,7 @@ return Promise.all(
|
|
|
319
326
|
|
|
320
327
|
### Reach policies
|
|
321
328
|
|
|
322
|
-
An SDK host can assign a reach policy via [`createAgentSession({ intercom: { group, reachable } })`](/sdk#intercom-group-and-reach) and update `reachable` dynamically with `session.intercom.setReachable(groups)`. To disable Intercom completely in an SDK session, pass `builtins: { intercom: false }` ([SDK tools](/sdk/reference#tools)). Invalid group names or calling `setReachable()` on a session created without an `intercom` policy throw `IntercomPolicyError` from `@bastani/atomic`:
|
|
329
|
+
An SDK host can assign a reach policy via [`createAgentSession({ intercom: { group, reachable } })`](/sdk#intercom-group-and-reach) and update `reachable` dynamically with `session.intercom.setReachable(groups)`. To disable Intercom completely in an SDK session, pass `builtins: { intercom: false }` ([SDK tools](/sdk/reference#tools)). Invalid group names, exceeding policy limits, or calling `setReachable()` on a session created without an `intercom` policy throw `IntercomPolicyError` from `@bastani/atomic`:
|
|
323
330
|
|
|
324
331
|
```typescript
|
|
325
332
|
import { createAgentSession, IntercomPolicyError } from "@bastani/atomic";
|
|
@@ -341,55 +348,25 @@ const isolated = await createAgentSession({
|
|
|
341
348
|
});
|
|
342
349
|
```
|
|
343
350
|
|
|
344
|
-
- The session can list, send to, and ask only sessions in its home group, its `reachable` groups, or subgroups under its home group (`<group>/...`, where its subagents run). Out-of-policy targets fail with `Target session is outside this session's Intercom reach (...)` (or `Session not found` for unseen names) and are never queued or held.
|
|
345
|
-
-
|
|
346
|
-
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
|
|
350
|
-
The broker enforces reach policies server-side. Sessions with a reach policy require a current broker; if an older broker cannot be replaced automatically, connection fails with `IntercomReachUnsupportedError` until you run `atomic intercom restart`.
|
|
351
|
-
|
|
352
|
-
### Hosted sessions and registration purpose (SDK)
|
|
351
|
+
- **Allowed targets.** The session can list, send to, and ask only sessions in its home group, its `reachable` groups, or subgroups under its home group (`<group>/...`, where its subagents run). Out-of-policy targets fail with `Target session is outside this session's Intercom reach (...)` (or `Session not found` for unseen names) and are never queued or held.
|
|
352
|
+
- **Validation limits.** `reachable` accepts at most **1,000** groups (`MAX_INTERCOM_REACHABLE_GROUPS`, exported from `@bastani/atomic`). Group names must be non-empty trimmed strings up to **1,024** characters and cannot be the reserved names `"true"` or `"auto"` (case-insensitively).
|
|
353
|
+
- **One-way reach.** Reaching group B does not let group B initiate messages back unless B's own memberships or policy allow it. Replies to asks received by B are always allowed.
|
|
354
|
+
- **Group actions.** `groups` lists only home and reachable groups (including empty ones), `join` accepts only those groups, `leave` cannot remove the home group, and `list`/`status` peeks stay within reach.
|
|
355
|
+
- **Dynamic narrowing.** Narrowing `reachable` automatically leaves removed groups from the next call onward. In-flight sends already accepted by the broker keep their original reach; sends with unknown outcomes after a disconnect are never retried under a changed reach.
|
|
356
|
+
- **Subagent confinement.** Subagents of a policy-constrained session inherit a reach policy with their own group as home (placed under the parent's home group if custom) and no additional reachable groups. Launching a subagent in a group equal to or parenting one of the parent's `reachable` groups throws `IntercomPolicyError`. `contact_supervisor` keeps its authorized route.
|
|
353
357
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
A session can host lightweight sessions on its broker connection via `IntercomClient.hostSessions` (messages arrive as `hosted_message` events, and `send(to, { hostedSender })` sends as them). Refusals return `IntercomHostedSessionError` subclasses (`code`, `key` or `sessionId`, `hint`, `retryable: false`), importable with `isIntercomHostedSessionError` and `serializeIntercomHostedSessionError` / `rehydrateIntercomHostedSessionError` from `@bastani/intercom`:
|
|
357
|
-
|
|
358
|
-
| Class | `code` | When | What to do |
|
|
359
|
-
| --- | --- | --- | --- |
|
|
360
|
-
| `HostedSessionRequestError` | `invalid_hosted_frame` | Malformed request: 1 to 500 sessions per request under distinct non-empty keys, or 1 to 500 IDs to remove. | Fix the request and resend. |
|
|
361
|
-
| `HostedSessionRequestError` | `invalid_hosted_session` | Missing name, invalid agent registration, malformed return address, or group outside the hosting session's [reach policy](#reach-policies). | Fix the named item and resend. |
|
|
362
|
-
| `NotHostedSessionError` | `not_hosted_by_connection` | Send named a `hostedSender`, or removal named an ID, not hosted by this connection. | Use the hosting connection, or re-host after reconnecting. |
|
|
363
|
-
|
|
364
|
-
A hosting request unanswered after 5 seconds fails with `IntercomHostedSessionTimeoutError` (`code: "hosted_session_timeout"`, `retryable: true`). An older broker that does not support hosted sessions fails with `IntercomBrokerProtocolError` until you run `atomic intercom restart`.
|
|
365
|
-
|
|
366
|
-
### Released-subagent SDK errors
|
|
367
|
-
|
|
368
|
-
With multi-node routing on, a conflicting reply to a shared-database released-asker question returns a typed `IntercomReleasedReplyError` (`code`, `messageId`, `questionId`, `childName`, `hint`, `retryable`) with `reasonCode` matching `code`. Check `isIntercomReleasedReplyError`, `isReleasedReplyAnsweredError`, `isReleasedReplyInFlightError`, or `isRetryableIntercomReleasedReplyError` rather than matching message text. Import these classes, guards, `IntercomReleasedReplyErrorCode`, and `serializeIntercomReleasedReplyError` / `rehydrateIntercomReleasedReplyError` from `@bastani/intercom`.
|
|
369
|
-
|
|
370
|
-
| Class | `code` | When | `retryable` | What to do |
|
|
371
|
-
| --- | --- | --- | --- | --- |
|
|
372
|
-
| `ReleasedReplyAnsweredError` | `released_reply_answered` | The launching session already accepted another reply to this question, or refused a duplicate handoff after a lost confirmation. | `false` | Do not resend this reply. Send a new ordinary message if the subagent needs follow-up. |
|
|
373
|
-
| `ReleasedReplyInFlightError` | `released_reply_in_flight` | Another reply to this question is currently being handed to the launching session. | `true` | Wait, then reply again if the question is still unanswered. |
|
|
374
|
-
|
|
375
|
-
Reservation, drop, and wake-acknowledgement requests are atomic per request: if one item is refused, nothing in the request takes effect. Errors carry `code`, `childName` when applicable, `hint`, and `retryable: false`. Import classes, `isIntercomReleasedChildError`, `IntercomReleasedChildErrorCode`, and `serializeIntercomReleasedChildError` / `rehydrateIntercomReleasedChildError` from `@bastani/intercom`.
|
|
376
|
-
|
|
377
|
-
| Class | `code` | When | What to do |
|
|
378
|
-
| --- | --- | --- | --- |
|
|
379
|
-
| `ReleasedChildReservationError` | `not_owner` | Another session owns the child (reserved it first or authorized it as supervisor). | Send the request from the owning session, or launch a new child. |
|
|
380
|
-
| `ReleasedChildReservationError` | `group_not_allowed` | An older broker rejected a `workflow:` group reservation from a non-member session. | Reserve from a session in that group, or omit `group`. |
|
|
381
|
-
| `ReleasedChildReservationError` | `invalid_frame`, `invalid_child_name`, `invalid_alias`, `too_many_aliases`, `invalid_group` | Malformed request: requests accept 1 to 500 children, non-empty names other than `*`, at most 4 session-ID aliases, and string groups. | Fix the invalid item and retry. |
|
|
382
|
-
| `UnknownReleasedChildError` | `unknown_released_child` | Wake acknowledgement named a child no session reserved. | Reserve the child first. |
|
|
358
|
+
The broker enforces reach policies server-side. Sessions with a reach policy require a current broker; if an older broker cannot be replaced automatically, connection fails with a reach-policy unsupported error (`code: "reach_policy_unsupported"`) until you run `atomic intercom restart`.
|
|
383
359
|
|
|
384
360
|
### Broker errors
|
|
385
361
|
|
|
386
|
-
These classes belong to the `IntercomBrokerError` family and are exported from `@bastani/atomic` alongside `isIntercomBrokerError()`, `isIntercomBrokerProtocolError()`, `isIntercomBrokerUpgradeError()`, `isIntercomBrokerStopTimeoutError()`,
|
|
362
|
+
These classes belong to the `IntercomBrokerError` family and are exported from `@bastani/atomic` alongside `isIntercomBrokerError()`, `isIntercomBrokerProtocolError()`, `isIntercomBrokerUpgradeError()`, `isIntercomBrokerStopTimeoutError()`, `isIntercomBrokerSuccessorTimeoutError()`, `isRetryableIntercomBrokerError()`, `serializeIntercomBrokerError()`, and `rehydrateIntercomBrokerError()`.
|
|
387
363
|
|
|
388
364
|
| Class | `code` | When it happens | Fields | What to do |
|
|
389
365
|
| --- | --- | --- | --- | --- |
|
|
390
|
-
| `IntercomBrokerProtocolError` | `broker-protocol-unsupported` | The connected older broker does not support the requested feature (such as released-subagent holds or
|
|
366
|
+
| `IntercomBrokerProtocolError` | `broker-protocol-unsupported` | The connected older broker does not support the requested feature (such as released-subagent holds or reach policies). | `feature`, `brokerProtocolMin`, `brokerProtocolMax`, `requiredProtocol`, `hint`, `retryable: false` | Run `atomic intercom restart` to replace the broker, then retry. |
|
|
391
367
|
| `IntercomBrokerUpgradeError` | `broker-upgrade-failed` | Replacing an older broker failed while stopping it (`phase: "stop"`) or starting its successor (`phase: "start"`). `atomic intercom upgrade` exits with status 1; active sessions retry on reconnect backoff once the previous broker exits. | `phase`, `previousPid`, `previousProtocolMax`, `hint`, `retryable: true`, `cause` | For `"stop"`, run `atomic intercom restart`. For `"start"`, wait for reconnect or run `atomic intercom restart`. |
|
|
392
368
|
| `IntercomBrokerStopTimeoutError` | `broker-stop-timeout` | A broker asked to shut down did not exit before the timeout (1 minute for upgrades, 10 seconds for `atomic intercom restart`). | `phase: "stop"`, `pid`, `timeoutMs`, `elapsedMs`, `hint`, `retryable: true` | Wait for the broker process to exit, or stop it manually, then retry. |
|
|
369
|
+
| `IntercomBrokerSuccessorTimeoutError` | `broker-successor-timeout` | The broker retired during session registration and no replacement broker accepted registration before `timeoutMs`. | `phase: "registration"`, `timeoutMs`, `elapsedMs`, `attempts`, `hint`, `retryable: true`, `cause` | Wait for automatic retry or retry registration; inspect `broker.log` if it persists. |
|
|
393
370
|
|
|
394
371
|
### Routing and project-group errors
|
|
395
372
|
|