@bastani/atomic 0.10.9 → 0.10.10-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +211 -155
- 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 +27 -12
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
- package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
- package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
- package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +145 -58
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
- package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
- package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
- package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
- package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +85 -114
- package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
- package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
- package/dist/builtin/intercom/group.ts +7 -3
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +37 -27
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +8 -0
- package/dist/builtin/subagents/README.md +71 -138
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
- package/dist/builtin/web-access/CHANGELOG.md +9 -0
- package/dist/builtin/web-access/README.md +60 -87
- package/dist/builtin/web-access/index.bundle.mjs +387 -351
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +2 -2
- 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.code.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 +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/agent-session-methods.d.ts +4 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/compaction/compactor.d.ts +20 -14
- package/dist/core/compaction/errors.d.ts +120 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/model-resolver.d.ts +2 -2
- 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.code.js +1 -1
- 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/api-types.d.ts +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- 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.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/provider-types.d.ts +18 -6
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-context.js +1 -1
- 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 +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/model-config.d.ts +40 -0
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-resolver-scope.d.ts +4 -4
- package/dist/core/model-runtime.d.ts +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/provider-composer-internal.d.ts +11 -2
- package/dist/core/sdk.code.js +3 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- 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/settings-manager-basic-accessors.d.ts +6 -2
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.code.js +1 -1
- 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.code.js +2 -2
- 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 +3 -3
- 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.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +2 -2
- 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-extensions.d.ts +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -7
- package/dist/main-first-time-setup.code.js +2 -2
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- 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/interactive/theme/color-utils.d.ts +5 -5
- package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
- package/dist/modes/rpc/rpc-types.d.ts +29 -2
- package/dist/package-manager-cli.code.js +5 -5
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -2
- package/dist/startup-stages/9.js +2 -1
- package/dist/utils/native-module.d.ts +44 -0
- package/dist/utils/startup-database-spare.code.js +3 -3
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks.md +235 -243
- package/docs/build.md +12 -11
- package/docs/codemode.md +60 -51
- package/docs/compaction/reference.md +61 -24
- package/docs/compaction.md +117 -65
- package/docs/computer-use.md +179 -146
- package/docs/containerization.md +79 -33
- package/docs/custom-provider/api-reference.md +148 -11
- package/docs/custom-provider/oauth.md +44 -27
- package/docs/custom-provider/override.md +14 -7
- package/docs/custom-provider/registration.md +75 -65
- package/docs/custom-provider/streaming.md +42 -19
- package/docs/custom-provider.md +25 -61
- package/docs/development.md +47 -43
- package/docs/docs.json +33 -33
- package/docs/environment-variables.md +83 -57
- package/docs/extensions/api-reference.md +323 -734
- package/docs/extensions/authoring.md +186 -269
- package/docs/extensions/events.md +308 -375
- package/docs/extensions/examples.md +122 -74
- package/docs/extensions/ui.md +217 -197
- package/docs/extensions.md +152 -259
- package/docs/getting-started/authentication.md +27 -14
- package/docs/getting-started/first-session.md +25 -26
- package/docs/getting-started/installation.md +62 -84
- package/docs/getting-started/project-instructions.md +39 -14
- package/docs/guides/configuration.md +42 -20
- package/docs/guides/intercom.md +17 -13
- package/docs/guides/non-interactive.md +29 -16
- package/docs/guides/orchestration.md +16 -10
- package/docs/guides/resume-on-any-machine.md +54 -49
- package/docs/guides/subagents.md +22 -14
- package/docs/guides/team-setup.md +37 -26
- package/docs/guides.md +22 -21
- package/docs/herdr.md +21 -16
- package/docs/index.md +16 -17
- package/docs/intercom/operations.md +68 -66
- package/docs/intercom/reference.md +196 -191
- package/docs/intercom.md +103 -92
- package/docs/json.md +71 -71
- package/docs/keybindings.md +63 -50
- package/docs/libraries/agent-core.md +49 -8
- package/docs/libraries/ai.md +21 -12
- package/docs/libraries/codemode.md +28 -6
- package/docs/libraries/schema.md +7 -7
- package/docs/libraries/telemetry.md +7 -7
- package/docs/libraries/tui.md +74 -94
- package/docs/libraries.md +5 -5
- package/docs/llama-cpp.md +38 -33
- package/docs/mcp-servers.md +96 -90
- package/docs/models/reference.md +46 -33
- package/docs/models-configuration.md +12 -6
- package/docs/models.md +93 -88
- package/docs/orchestration/migrating-workflows.md +21 -19
- package/docs/orchestration/patterns.md +35 -20
- package/docs/orchestration.md +22 -21
- package/docs/packages/authoring.md +28 -19
- package/docs/packages/reference.md +75 -16
- package/docs/packages.md +31 -33
- package/docs/programmatic.md +22 -21
- package/docs/prompt-templates.md +63 -41
- package/docs/providers/reference.md +35 -19
- package/docs/providers.md +61 -71
- package/docs/quickstart.md +32 -46
- package/docs/reference/cli.md +249 -252
- package/docs/reference.md +23 -20
- package/docs/rpc/examples.md +74 -17
- package/docs/rpc/extension-ui.md +79 -62
- package/docs/rpc/protocol.md +816 -358
- package/docs/rpc.md +75 -151
- package/docs/sdk/reference.md +175 -45
- package/docs/sdk/structured-decisions.md +92 -62
- package/docs/sdk/web-server.md +79 -46
- package/docs/sdk.md +237 -195
- package/docs/security.md +106 -43
- package/docs/session-format.md +96 -59
- package/docs/sessions.md +149 -113
- package/docs/settings.md +289 -204
- package/docs/shell-aliases.md +15 -6
- package/docs/skills/authoring.md +17 -9
- package/docs/skills/reference.md +23 -21
- package/docs/skills.md +104 -97
- package/docs/storage.md +140 -242
- package/docs/subagents/authoring.md +147 -16
- package/docs/subagents/reference.md +100 -30
- package/docs/subagents.md +220 -252
- package/docs/terminal-setup.md +97 -69
- package/docs/termux.md +51 -85
- package/docs/themes/reference.md +51 -37
- package/docs/themes.md +49 -54
- package/docs/tmux.md +38 -21
- package/docs/tools.md +198 -147
- package/docs/tui/reference.md +64 -32
- package/docs/tui.md +38 -66
- package/docs/usage.md +76 -78
- package/docs/verification.md +25 -25
- package/docs/web-access.md +72 -55
- package/docs/windows.md +53 -58
- package/docs/worktree-snapshots.md +62 -65
- package/package.json +8 -8
- package/schemas/models.schema.json +51 -0
- package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
- package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
- package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
package/docs/background-tasks.md
CHANGED
|
@@ -1,28 +1,188 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
|
|
2
|
+
title: "Manage background tasks"
|
|
3
|
+
sidebarTitle: "Background tasks"
|
|
4
|
+
description: "Monitor, steer, and stop background subagents and shell commands while continuing your conversation."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Background subagents and shell commands keep running after their launch tool call returns. You can keep chatting in your main session, inspect live output, send steering messages, or stop individual tasks without losing your place.
|
|
7
8
|
|
|
8
|
-
Background subagents
|
|
9
|
+
## Background subagents
|
|
10
|
+
|
|
11
|
+
Every subagent runs in the background. Ask Atomic to delegate a bounded task in plain language:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
Have a codebase-analyzer trace the authentication flow in the background.
|
|
15
|
+
Keep working with me here while it runs.
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Tool callers launch single or parallel background subagents:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
subagent({
|
|
22
|
+
agent: "codebase-analyzer",
|
|
23
|
+
task: "Trace the authentication flow. Do not edit files.",
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
subagent({
|
|
27
|
+
tasks: [
|
|
28
|
+
{ agent: "codebase-analyzer", task: "Trace request authentication." },
|
|
29
|
+
{ agent: "codebase-pattern-finder", task: "Find authorization test patterns." },
|
|
30
|
+
],
|
|
31
|
+
concurrency: 2,
|
|
32
|
+
})
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Parallel tasks get independent IDs, and tasks beyond the concurrency limit wait in the queue. Run `/agents` to browse bundled and custom specialists before choosing one.
|
|
36
|
+
|
|
37
|
+
Intercom messaging never cancels a parallel batch. An `intercom` `ask` returns as soon as it is delivered and delivers late replies as messages, while a blocking `contact_supervisor` decision waits only inside the requesting subagent and continues that subagent once answered. Sends and progress updates never block. A parent's `subagent({ action: "wait", id })` yields so the parent can reply while keeping running subagents, concurrency slots, and queued siblings intact.
|
|
38
|
+
|
|
39
|
+
A launch result says **Launched in background**. That records that the subagent started, not its live state. Check the agent panel or `/tasks` for current status.
|
|
40
|
+
|
|
41
|
+
### Waiting is not restarting
|
|
42
|
+
|
|
43
|
+
When your next step depends on a subagent's result, wait on the task ID returned at launch:
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
subagent({ agent: "codebase-analyzer", task: "Trace the authentication flow." })
|
|
47
|
+
subagent({ action: "wait", id: taskId, budgetMs: 120000 })
|
|
48
|
+
subagent({ action: "status", id: taskId })
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If the wait budget expires or you press `Esc`, the same subagent keeps running in the background. Neither is a timeout or a stop. Wait again or let its completion notice arrive, and never launch a duplicate subagent just to get a result.
|
|
52
|
+
|
|
53
|
+
An `action: "wait"` call also yields when user steering or an Intercom message reaches your main session, leaving the subagent running under the same task ID while you respond. To hold, stop, or continue a subagent, use `pause`, `quit`, and `resume`; see [Run control](/subagents#run-control).
|
|
54
|
+
|
|
55
|
+
### Completion messages
|
|
9
56
|
|
|
10
|
-
|
|
57
|
+
When a background task ends, Atomic adds one unshaded notice line to the launching chat without waiting for a model reply. The glyph and color match the agent panel and `/tasks`:
|
|
58
|
+
|
|
59
|
+
- Green `●` completed
|
|
60
|
+
- `✗` failed
|
|
61
|
+
- Red `◯` stopped (user stops, execution timeouts, and paused or quit subagents awaiting resume)
|
|
62
|
+
- Dim `◌` [released while waiting](/subagents#released-subagents)
|
|
11
63
|
|
|
12
|
-
|
|
64
|
+
Each notice names the task or agent, its outcome, and how long it ran. A collapsed subagent notice shows the first wrapped line of its result; a shell notice shows only its summary line. Press `Ctrl+O` to expand the shell's retained output lines or the subagent's full retained result:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
● Background command "npm run build" completed (exit code 0) · 3m 2s
|
|
68
|
+
◯ Task "Sleep 300 seconds in background" was stopped by the user
|
|
69
|
+
● debugger finished · 1h 31m
|
|
70
|
+
⎿ Authentication starts in …
|
|
71
|
+
(ctrl+o for the full result)
|
|
72
|
+
◯ debugger quit · awaiting resume
|
|
73
|
+
◌ worker is waiting on bash (toolu_01) · 16m 16s
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Main chat and subagent views render the same notice format. Long titles shorten to fit one terminal row, expanded results wrap to the terminal width, and previews are bounded while keeping the subagent's full result intact.
|
|
77
|
+
|
|
78
|
+
- **Delivery and turn scheduling.** A notice goes only to the session that launched the task. Tasks that finish together reach the model in one batch and start one turn in an idle chat. A notice arriving mid-turn is read at the next safe point without starting an extra turn. After an interrupt, notices wait for your next message. Restored notices join the transcript without starting a turn.
|
|
79
|
+
- **Supervisor progress updates.** Progress messages appear as **Historical supervisor update** with their original `Sent:` timestamp. They describe the subagent's state when sent, can arrive after completion, and never override a final result or `/tasks`.
|
|
80
|
+
- **Two kinds of pause and stop.** Pressing `Esc` while viewing a subagent pauses only its active turn (`‖ paused` in yellow under **Working**; sending a message continues it). Calling `subagent({ action: "pause" | "quit", id })`, pressing `x` twice within 3 seconds in `/tasks` or the agent panel, or pressing `Ctrl+X Ctrl+K` stops the subagent resumably (red `◯` stopped, showing **paused · awaiting resume** or **quit · awaiting resume**). Both states stay resumable by sending a message while viewing the subagent or calling `subagent({ action: "resume", id })`.
|
|
81
|
+
- **Paused and quit notices.** Stopping a subagent with `pause` or `quit` (or pressing `x` twice) delivers a notice showing **paused · awaiting resume** or **quit · awaiting resume**, along with `Stop reason: pause` or `quit` and the exact `subagent({ action: "resume", id: "<child-id>" })` call.
|
|
82
|
+
- **Completed and failed notices.** Completed and failed subagents keep their sessions. Their notices tell the model that execution ended, advise against relaunching just to retrieve results, and include the `resume` call and Intercom name when available.
|
|
83
|
+
- **Resume IDs.** Expanding a completed, failed, paused, or quit subagent notice (`Ctrl+O`) shows `resume id <child-id>`. In `/tasks`, expanded rows and detail pages show it on the latest attempt only. Permanently cancelled subagents, released subagents, and background shells display no resume ID.
|
|
84
|
+
- **Deduplication and restoration.** Repeated stops or late results never duplicate a notice or overwrite a settled outcome. Closing the launching session suppresses late notices. Restored completions report available identity and outcome without inventing missing output.
|
|
85
|
+
|
|
86
|
+
## Background shells
|
|
87
|
+
|
|
88
|
+
Model `bash` calls on POSIX and native Windows, and `powershell` calls on native Windows, run under your session's background task manager. Subagent shells are managed by the launching main session; see [Shells started by subagents](#shells-started-by-subagents). A command that runs past its foreground observation budget returns a task ID and keeps running in the background while its execution timeout keeps counting.
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
// Ordinary commands wait for the session's default observation budget (10 seconds).
|
|
92
|
+
bash({ command: "npm run check" })
|
|
93
|
+
|
|
94
|
+
// Start a build in the background when you have independent work to do.
|
|
95
|
+
bash({ command: "npm run build", wait: { kind: "background" }, timeout: 600 })
|
|
96
|
+
|
|
97
|
+
// Wait longer when the test result is needed next; execution timeout is separate.
|
|
98
|
+
bash({ command: "npm test", wait: { kind: "foreground", budgetMs: 30000 }, timeout: 600 })
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Execution `timeout` is measured in seconds and is independent of observation `budgetMs`. Valid values are greater than `0` and up to `3600` seconds (default `300`), rounded to the nearest millisecond with a 1 ms minimum; invalid values fail before the command starts. A backgrounded launch names the timeout that will stop it:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
Command is still running (task task-1-0-3). Its execution timeout stops it after 300 seconds; launch it with a larger timeout (up to 3600 seconds) for a longer run.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
When the timeout expires, `wait` returns an error ending `Task <id> was cancelled (timed out after 300 seconds).` The completion notice uses the red `◯` stopped mark and reads `Background shell timed out after 300 seconds` with `Stop reason: execution-timeout (timed out after 300 seconds)`. For runs longer than 5 minutes, pass an explicit `timeout` up to `3600`; split longer work into shorter commands.
|
|
108
|
+
|
|
109
|
+
Observe an existing shell task without running the command again:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
bash({ action: "wait", id: taskId })
|
|
113
|
+
powershell({ action: "wait", id: taskId })
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- Pass the exact task ID from the same session. Omit `budgetMs` for the default observation budget, or pass `0` to check immediately without waiting.
|
|
117
|
+
- The transcript shows one status line above the output matching `/tasks`: `● completed · exit 0`, `✗ exited 1`, `⧗ still running · showing output so far`, or red `◯ cancelled`. Truncated output includes a dim line with the path to the full output file.
|
|
118
|
+
- While running, repeated yielded waits advance through retained output in bounded pages (returning no new output once caught up). Settled waits return all retained output again, with labelled gaps and truncation.
|
|
119
|
+
- Do not combine `action: "wait"` with `command`, `timeout`, `wait`, `env`, `cwd`, or `pty`. Unknown or foreign IDs fail with `No background task "<id>" in this session`. Cancelling a wait releases observation only and never changes the command's execution timeout.
|
|
120
|
+
|
|
121
|
+
### Stop a shell task from a tool call
|
|
122
|
+
|
|
123
|
+
Call `kill` with the exact task ID returned by `bash` or `powershell`:
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
kill({ id: taskId })
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Pass the task ID only, never a process ID, shell name, or subagent ID. `/tasks` stop controls remain available alongside `kill`.
|
|
130
|
+
|
|
131
|
+
The transcript shows `◼ stopping · cancellation requested`, `◯ cancelled`, or `● already completed · exit 0`. The structured result includes `taskId`, `decision`, `execution`, and `cleanup`. A cancellation request starts teardown rather than guaranteeing that every child process has exited immediately; wait until execution has settled and process cleanup is confirmed before assuming files or ports are free. If the command finished before `kill` ran, the original outcome is preserved.
|
|
132
|
+
|
|
133
|
+
If cleanup of a stopped shell cannot be confirmed within a few seconds (for example, because a background descendant still holds output open), `kill` reports `CleanupUnconfirmed` while Atomic continues verifying teardown for up to 15 seconds in the background. Killing a task never erases its output or completion notice.
|
|
134
|
+
|
|
135
|
+
Nonzero shell exits display as failures (`✗`), while user stops read `was stopped by the user`. Native Windows refuses background shell launches it cannot supervise, and legacy Windows WSL `bash.exe` stdin transport is unsupported (run Atomic inside WSL for POSIX Bash).
|
|
136
|
+
|
|
137
|
+
### Shells started by subagents
|
|
138
|
+
|
|
139
|
+
Subagents can run background `bash` and `powershell` commands. Those shells are managed by the launching main session so they can outlive the subagent, while still belonging to that subagent (only the subagent receives their notices, and they do not appear as top-level main-chat rows in `/tasks`). Subagents cannot launch other subagents.
|
|
140
|
+
|
|
141
|
+
- **Agent panel nesting.** Running shells started by a subagent appear indented beneath that subagent (`⧗ shell <command>`) and leave once finished. Press `Enter` on a nested row to view output in `/tasks` without changing the viewed agent (`←` returns to the focused panel), or press `x` twice within 3 seconds to stop only that shell.
|
|
142
|
+
- **Navigation hints inside subagent chats.** On a subagent's page in `/tasks`, a backgrounded command block displays a clickable `· /tasks to manage` hint (while the chat accepts input and color is enabled) that opens that subagent's own task list rather than the main chat's. On the main screen while viewing a released subagent waiting on a shell, the newest waited shell block displays a clickable `· alt+w opens it` hint bound to `app.tasks.openWaited`.
|
|
143
|
+
- **Control and ownership.** A subagent can wait on and `kill` only its own shells. Your main session can also wait on or stop a subagent's shell by task ID (`bash({ action: "wait", id })` or `kill({ id })`), and `Ctrl+X Ctrl+K` stops them along with all other tasks.
|
|
144
|
+
- **Completion delivery.** A shell's completion notice goes only to the subagent that started it, never to the main chat. Running subagents read it in their current turn, released subagents wake automatically, and finished, paused, or quit subagents receive it when next resumed or messaged.
|
|
145
|
+
- **Lifetime and early stops.** Shells keep running after their subagent finishes and stop when the launching main session closes. Early stops report their cause (`timed out after <n> seconds`, `stopped by a pause`, `session closed`, or `Atomic shut down`), and shells stopped by session close deliver their notice once when the session reopens.
|
|
146
|
+
|
|
147
|
+
Processes started in an external terminal outside Atomic are not tracked in `/tasks`.
|
|
148
|
+
|
|
149
|
+
## Choose how long to wait
|
|
150
|
+
|
|
151
|
+
The agent chooses foreground-first or background observation for each shell call. Every subagent runs in the background; wait on one with `subagent({ action: "wait", id })` when the next step depends on its result. Neither choice requires extra confirmation or changes tool permissions.
|
|
152
|
+
|
|
153
|
+
For ordinary shell commands, omit `wait` rather than routinely passing a 1-second budget. Short budgets background fast commands unnecessarily and add extra wait calls. Use explicit background observation when you have independent work to do, and a short budget only when you need control back sooner.
|
|
154
|
+
|
|
155
|
+
Keep immediately blocking work inline unless specialist focus, isolated context, or your request makes delegation worthwhile. After launching a subagent, continue independent work without duplicating it. Wait when its result becomes a dependency, and otherwise let completion notices arrive instead of polling.
|
|
156
|
+
|
|
157
|
+
| Call | Observation behavior |
|
|
158
|
+
| --- | --- |
|
|
159
|
+
| `bash` or `powershell` without `wait` | Waits for the session's command observation budget (default 10 seconds), then returns automatically if still running. |
|
|
160
|
+
| `subagent` launch | Returns as soon as the subagent starts; every subagent runs in the background. Any `wait` passed on launch is ignored, and a foreground `wait` adds a note pointing to `action: "wait"`. |
|
|
161
|
+
| `subagent({ action: "wait", id })` | Waits for the session's agent wait budget (default 30 seconds), or for `budgetMs`. `Esc` ends the wait immediately. |
|
|
162
|
+
| `bash` or `powershell` with `wait: { kind: "background" }` | Returns as soon as the command starts without waiting for it to finish. |
|
|
163
|
+
| `bash` or `powershell` with `wait: { kind: "foreground" }` | Waits for the session's command observation budget (default 10 seconds). |
|
|
164
|
+
| `bash` or `powershell` with `wait: { kind: "foreground", budgetMs: 1000 }` | Waits up to 1 second, then yields automatically if the command is still running. |
|
|
165
|
+
|
|
166
|
+
If a task finishes during observation, the call returns its final result directly. Automatic backgrounding means the observation budget elapsed, not a timeout failure, restart, or second run. If a wait for a dependency ends early, wait for actual completion before using the result.
|
|
167
|
+
|
|
168
|
+
Shell `budgetMs` accepts finite non-negative milliseconds, where `0` returns immediately without cancelling the task. On command launches, put `budgetMs` inside a foreground `wait`; on existing-task `action: "wait"` calls, pass `budgetMs` at the top level. Custom SDK sessions can override default budgets or set `tasks.wait.kind: "until-settled"` so omitted foreground budgets wait until completion, while explicit per-call budgets still take precedence.
|
|
169
|
+
|
|
170
|
+
## The agent panel
|
|
171
|
+
|
|
172
|
+
Below the prompt, the agent panel lists the session's active background subagents, one row each. A `main` row comes first and represents the main chat. Whichever agent the screen shows has a filled `●` and reads in bold:
|
|
13
173
|
|
|
14
174
|
```text
|
|
15
175
|
● main
|
|
16
|
-
◯ worker openai/gpt-5.
|
|
17
|
-
◯ debugger
|
|
176
|
+
◯ worker openai/gpt-5.4 high fix shipping batches 41m · ↓ 96.1k tokens
|
|
177
|
+
◯ debugger anthropic/claude-opus-4-6 medium #5220 spawn lock 18m · ↓ 87.4k tokens
|
|
18
178
|
⧗ shell npm test 12s
|
|
19
|
-
◯ worker anthropic/claude-sonnet-4-
|
|
179
|
+
◯ worker anthropic/claude-sonnet-4-6 high picker clamp stopped · 6m
|
|
20
180
|
```
|
|
21
181
|
|
|
22
182
|
- **Row contents.** Each row shows the status mark, agent name, active model and reasoning level, current task, elapsed time, and token usage. A row waiting for input shows its question. Task titles shorten cleanly and end in `…`.
|
|
23
183
|
- **Viewed marker (`●`).** While viewing the main chat, `● main` is bold. While viewing a subagent, its row is bold with `●` and `main` shows a muted `◯`. A resumed subagent stays one row, and `●` follows its latest attempt.
|
|
24
|
-
- **Model column.** The model column displays `provider/model-id` and reasoning level, matching the footer (omitting the level for models without reasoning levels). It updates whenever a subagent falls back to another model, resumes on a different one, or changes effort. Stopped or paused rows show the last turn's model; unknown models leave the column blank.
|
|
25
|
-
- **Responsive column sizing.** As the terminal narrows, task titles shorten first. Below 100 columns (or when a row lacks room for its task or elapsed time), the model column hides. Below 70 columns, the token count hides.
|
|
184
|
+
- **Model column.** The model column displays `provider/model-id` and reasoning level, matching the footer (omitting the level for models without reasoning levels). It caps at 40 columns, truncating the model ID while keeping the reasoning level intact, and updates whenever a subagent falls back to another model, resumes on a different one, or changes effort. Stopped or paused rows show the last turn's model; unknown models leave the column blank.
|
|
185
|
+
- **Responsive column sizing.** As the terminal narrows, task titles shorten first. Below 100 columns (or when a row lacks room for its task or elapsed time), the model column hides. Below 70 columns, the token count hides. If fewer than 8 columns remain for the task title, the task title hides completely.
|
|
26
186
|
- **Row limits.** Up to four rows appear while the prompt has focus, followed by `+N more`. The focused panel shows eight rows at a time. The `main` row does not count toward either limit. The viewed subagent and its running shells stay visible inside the four unfocused rows, and `+N more` counts every omitted row, including nested shells.
|
|
27
187
|
- **Finished and stopped rows.** Finished subagents leave the panel right away unless you are currently viewing them; a viewed finished subagent stays until you switch away or dismiss it with `x`, which returns to `main`. A stopped, paused, or interrupted subagent stays while other work runs, dims after 30 seconds, and leaves once nothing else is running. Finished subagents remain available in `/tasks`.
|
|
28
188
|
|
|
@@ -30,20 +190,20 @@ Status glyphs are shared across the agent panel, `/tasks`, completion notices, l
|
|
|
30
190
|
|
|
31
191
|
- `◯` running, in grey (`●` while you view it)
|
|
32
192
|
- `◆` needs input, showing its question
|
|
33
|
-
- `‖` paused
|
|
193
|
+
- `‖` active turn paused with `Esc`
|
|
34
194
|
- `○` queued
|
|
35
195
|
- `◌` waiting on a detached call or shell (released)
|
|
36
196
|
- `●` done, in green
|
|
37
197
|
- `✗` failed, showing the reason
|
|
38
198
|
- `◼` stopping
|
|
39
|
-
- `◯` stopped, in red (`●` while you view it)
|
|
199
|
+
- `◯` stopped, in red (`●` while you view it; covers user stops, timeouts, and `pause`/`quit` awaiting resume)
|
|
40
200
|
- `⧗` running shell nested under the subagent that started it
|
|
41
201
|
|
|
42
202
|
The main footer shows `↓ N agents` for the panel's subagent rows, and `N needs input` for rows awaiting an answer (including rows folded into `+N more`). When no panel rows are shown but `/tasks` holds subagents for this session, the footer shows `/tasks to see subagents`. While main-chat background shells run, `N shells · /tasks to manage` appears instead.
|
|
43
203
|
|
|
44
204
|
Main-chat background shells are counted in the footer and inspected through [`/tasks`](#open-the-task-inspector). A subagent's own running shells appear as indented rows (`⧗ shell <command>`) directly beneath that subagent and leave once they finish or when their parent subagent leaves.
|
|
45
205
|
|
|
46
|
-
Press `↓` on an empty prompt to focus the panel from either `main` or a subagent (while a viewed subagent's question form has focus, `↓` moves its selection instead):
|
|
206
|
+
Press `↓` on an empty prompt to focus the panel from either `main` or a subagent (while a viewed subagent's question form has focus, `↓` moves its selection instead). Returning to the panel with `↓` selects your most recently selected subagent row and restores its scroll position, falling back to the nearest surviving row if that subagent left (and resetting to the top row once the panel empties):
|
|
47
207
|
|
|
48
208
|
- `↑` and `↓` select rows, including `main` and nested shell rows. The selected row shows `∀` before its mark in default text color.
|
|
49
209
|
- `Enter` or `→` on a subagent switches the chat screen to that subagent and returns focus to the prompt.
|
|
@@ -56,7 +216,7 @@ In fullscreen mode, clicking any row acts like `Enter`. Clicking `main` switches
|
|
|
56
216
|
|
|
57
217
|
If an extension panel source fails, Atomic hides its invalid rows and warns once per source while keeping other rows and chat usable. Fix the extension and run `/reload` to register it again. Extension authors can add rows with [`atomic.registerAgentPanelSource()`](/extensions/api-reference#atomic-registeragentpanelsource-source).
|
|
58
218
|
|
|
59
|
-
|
|
219
|
+
## Viewing a subagent
|
|
60
220
|
|
|
61
221
|
Atomic uses one chat screen for the main chat and every subagent. Selecting a subagent from the agent panel or `/tasks` displays its live transcript and points the prompt box at that subagent.
|
|
62
222
|
|
|
@@ -64,27 +224,32 @@ Atomic uses one chat screen for the main chat and every subagent. Selecting a su
|
|
|
64
224
|
- **Switching back.** Press `←` on an empty prompt (the hint reads `← main chat`), or select `main` in the panel and press `Enter` or click `main`. The subagent keeps running with its queued messages and draft intact, and main's scroll position and draft are restored. When the prompt has text, `←` moves the cursor.
|
|
65
225
|
- **Per-agent drafts.** Each agent keeps its own unsent draft (text, cursor, pasted blocks, and undo history) across switches and resumes. Keys typed while a subagent view opens land in its prompt once ready; pressing `Esc` cancels the switch and keeps what you typed for that subagent.
|
|
66
226
|
- **Prompt history.** `↑`, `↓`, and `Ctrl+R` walk and search the viewed agent's own history (for a subagent: its task, resume messages, and messages you sent it). Returning to `main` restores main's history. Messages still queued return via `Alt+Up` or `Esc`, not `↑`.
|
|
67
|
-
- **Steering, queuing, and pausing.** While a viewed subagent works, `Enter` queues a steering message and `Alt+Enter` queues a follow-up (`Steering:` and `Follow-up:` rows above the prompt). `Alt+Up` pulls queued messages back into the prompt. Pressing `Esc` (or `Ctrl+C` on an empty prompt) pauses the viewed subagent without affecting main chat or switching back to `main`. Sending a message to a finished or stopped subagent resumes it in the same task.
|
|
227
|
+
- **Steering, queuing, and pausing.** While a viewed subagent works, `Enter` queues a steering message and `Alt+Enter` queues a follow-up (`Steering:` and `Follow-up:` rows above the prompt). `Alt+Up` pulls queued messages back into the prompt. Pressing `Esc` (or `Ctrl+C` on an empty prompt) pauses the viewed subagent's active turn (`‖ paused`) without affecting main chat or switching back to `main`. Sending a message to a finished, paused, or stopped subagent continues or resumes it in the same task.
|
|
68
228
|
- **Questions, scrolling, and notices.** When a viewed subagent waits on `ask_user_question` or an approval form, the form opens at the bottom of its transcript and takes input until answered. Scrolling, click-to-expand, `Ctrl+O`, `Ctrl+T`, and selection act on the viewed transcript. Main chat notices still record in main's transcript and mirror up to three rows under the subagent's view.
|
|
69
|
-
- **When a viewed subagent is gone.** If the viewed subagent is dismissed, removed, or
|
|
229
|
+
- **When a viewed subagent is gone.** If the viewed subagent is dismissed, removed, or Atomic's background process restarts, Atomic returns to `main` and places any unsent draft into main's prompt with the notice `<name> is gone; your message to it is in the prompt.` If you submit that unedited text and it runs a main-conversation or model-changing command, Atomic asks to confirm first.
|
|
70
230
|
- **Waited shell shortcut.** While viewing a released subagent waiting on a shell (`◌ waiting on bash`), the newest waited shell shows a clickable `· alt+w opens it` hint. Press `Alt+W` (`app.tasks.openWaited`) or click the hint to open its output in `/tasks`; `←` returns to the subagent view.
|
|
71
231
|
|
|
72
|
-
|
|
232
|
+
### Commands while viewing a subagent
|
|
73
233
|
|
|
74
234
|
| What you type or press | Behavior while viewing a subagent |
|
|
75
235
|
| --- | --- |
|
|
76
236
|
| `/settings`, `/scoped-models`, `/tasks`, `/resume`, `/export`, `/share`, `/trust`, `/login`, `/logout`, `/reload`, `/quit`, `/exit`, and the resume shortcut (`app.session.resume`) | Run on `main` in place while the subagent stays on screen. `/tasks` lists all tasks of the session; `/resume` opens the session picker. |
|
|
77
237
|
| Bundled extension commands (`/agents`, `/mcp`, `/intercom`, `/curator`, `/google-account`, `/search`, `/websearch`, `/llama`) | Run on `main` in place while the subagent stays on screen. |
|
|
78
238
|
| `/session`, `/tools`, `/changelog`, `/hotkeys`, `/name` | Switch to `main` first so output prints in the main transcript while preserving main's draft. |
|
|
79
|
-
| `/compact`, `/tree`, `/fork`, `/clone`, `/new`, `/import`, registered `/clear` or `/rewind`, and session shortcuts (`app.session.new/tree/fork`) | Ask to confirm: `/<command> acts on the main conversation, not <agent>` (**Cancel** selected first). Once confirmed, they run on `main
|
|
239
|
+
| `/compact`, `/tree`, `/fork`, `/clone`, `/new`, `/import`, registered `/clear` or `/rewind`, and session shortcuts (`app.session.new/tree/fork`) | Ask to confirm: `/<command> acts on the main conversation, not <agent>` (**Cancel** selected first). Once confirmed, they run on `main`: `/new` and `/import` switch to `main` immediately, while `/fork` and `/clone` switch to `main` once the replacement finishes. **Cancel** or `Esc` restores the text in the subagent's prompt. |
|
|
80
240
|
| `/model`, `/thinking`, model selector or cycling (`Ctrl+L`, `Ctrl+P`, `Shift+Ctrl+P`), thinking cycling (`Shift+Tab`) | Refused with a notice under the subagent's transcript. Switch to `main` to change main's model or thinking level. |
|
|
81
241
|
| `!cmd`, `!!cmd` | Refused with `` `!` commands run in the main chat. Switch to main to run them. `` Text stays in the prompt. |
|
|
82
242
|
| `/copy` | Copies the viewed subagent's last assistant message to the clipboard. |
|
|
83
243
|
| `/skill:<name>`, prompt templates, user or project extension commands, and ordinary text | Sent to the viewed subagent's own session using its own skills, templates, and working directory. |
|
|
84
244
|
|
|
85
|
-
|
|
245
|
+
Command interception depends on arguments:
|
|
86
246
|
|
|
87
|
-
|
|
247
|
+
- Commands that take arguments (`/tasks`, `/model`, `/thinking`, `/export`, `/import`, `/name`, `/login`, `/logout`, `/compact`, `/resume`, plus `/session snapshot`) are intercepted even when followed by arguments.
|
|
248
|
+
- All other built-in commands (`/settings`, `/scoped-models`, `/share`, `/trust`, `/reload`, `/quit`, `/exit`, `/tools`, `/changelog`, `/hotkeys`, `/tree`, `/fork`, `/clone`, `/new`, `/copy`) match only when typed bare. Adding extra text (such as `/copy that` or `/new idea`) sends the line to the subagent as ordinary text.
|
|
249
|
+
|
|
250
|
+
Typing `/` completes built-ins, bundled extension commands, and the viewed subagent's skills, templates, and extension commands. `@` and `Tab` complete paths in the subagent's working directory. See [Task inspection](/subagents#task-inspection).
|
|
251
|
+
|
|
252
|
+
## Open the task inspector
|
|
88
253
|
|
|
89
254
|
Run `/tasks` to inspect running and finished subagents and shells without stopping them. The picker opens in the editor slot with the conversation visible above it.
|
|
90
255
|
|
|
@@ -92,117 +257,58 @@ Run `/tasks` to inspect running and finished subagents and shells without stoppi
|
|
|
92
257
|
- **Hint line.** The footer lists the keys for the selected row: `↑↓ select · space peek · enter/→ open · x stop · / filter · esc/← close · ? keys`. On a finished row, `x` reads `dismiss`.
|
|
93
258
|
- **Peek cards (`Space`).** Opens an inline card under the selected row showing model, current tool call, and usage. A running subagent waiting on nothing also offers a reply box where `Enter` sends a message. On a card without a reply box, `Space`, `Esc`, or `←` closes it (`space/esc/← close`). Inside a reply box, `Esc` or `←` at the start closes the card while keeping your unsent draft.
|
|
94
259
|
- **Subagents waiting for input.** A waiting subagent opens no peek card: its row displays the question, and `Space`, `Enter`, or `→` closes `/tasks` and shows that subagent on the chat screen (`space/enter/→ answer`). Text typed in the list is never sent as an answer.
|
|
95
|
-
- **Paused subagents.** A subagent paused with `Esc` reads `‖ paused` under **Working** with elapsed time held. Its detail page reads `‖ Paused · send to continue`, and sending a message continues it.
|
|
260
|
+
- **Paused subagents.** A subagent whose turn was paused with `Esc` reads `‖ paused` under **Working** with elapsed time held. Its detail page reads `‖ Paused · send to continue`, and sending a message continues it.
|
|
96
261
|
- **Reply draft safety.** While a reply sends, the card shows `Sending…` (`Esc` or `←` closes `/tasks`). Your first character binds the draft to the current question; if the question changes before you send, the draft clears with a notice so text never answers the wrong question. Send failures keep your text while the inspector stays open, or report in chat if you already closed it.
|
|
97
|
-
- **Opening and filtering.** `Enter`, `→`, or clicking a row opens it: on a subagent, it opens the subagent on the chat screen; on a shell, it opens the shell output page (or detail page when no output exists). `/` filters by name or task (`Enter` keeps the filter; `Esc` clears it). Returning to `/tasks` from a viewed subagent, detail page, shell output, waited shell, or stdin sheet keeps selection and scroll position on the item you came from (following it if it moves or resumes, or selecting its next or previous neighbour if it left the list)
|
|
262
|
+
- **Opening and filtering.** `Enter`, `→`, or clicking a row opens it: on a subagent, it opens the subagent on the chat screen; on a shell, it opens the shell output page (or detail page when no output exists). `/` filters by name or task (`Enter` keeps the filter; `Esc` clears it). Returning to `/tasks` from a viewed subagent, detail page, shell output, waited shell, or stdin sheet keeps selection and scroll position on the item you came from (following it if it moves or resumes, or selecting its next or previous neighbour if it left the list). Opening `/tasks` while viewing a subagent selects that subagent, and closing `/tasks` with `Esc` or `←` resets the next fresh open to the top.
|
|
98
263
|
- **Shell output page.** Detail and shell output pages use the full screen. A shell output page shows the command, status (and exit code once finished), live runtime, error text when failed, and the last 8 KiB of retained output (starting on a whole UTF-8 character, with trailing blank lines trimmed) in a scrollable rounded box, with a line-range note when output overflows (unframed below 24 columns).
|
|
99
264
|
- **Shell output controls and input.** On a shell output page, scroll with `PageUp`/`PageDown` (`pgup/pgdn`) or the mouse wheel, press `x` twice within 3 seconds to stop a running shell, press `?` for its keys overlay, and press `←` to go back. Shell input stays in the sheet under `Input to <command>` with `enter send · ← back to list`.
|
|
100
265
|
|
|
101
266
|
Completed background work remains available in `/tasks`, even after a later wait. Shell commands that a tool call is still actively waiting on are excluded. Updates never open or close `/tasks` automatically, and closing `/tasks` never stops work.
|
|
102
267
|
|
|
103
|
-
While the chat is idle, the picker footer shows the resolved model, reasoning level, working directory, Git branch, and MCP status. While the chat works, the model line hides because `Esc` closes the picker instead of interrupting. Opening `/tasks` is navigation, not an approval prompt, so it never marks Herdr blocked.
|
|
104
|
-
|
|
105
|
-
## Choose how long to wait
|
|
106
|
-
|
|
107
|
-
The agent chooses foreground-first or background observation for each authorized shell call. Every subagent runs in the background; the agent waits on one with `subagent({ action: "wait", id })` when the next step depends on its result. Neither choice requires extra user confirmation or relaxes tool permissions or task ownership.
|
|
108
|
-
|
|
109
|
-
For ordinary shell commands, omit `wait` rather than routinely passing a one-second budget. Short budgets background fast commands unnecessarily and add extra wait calls. Use explicit background observation when you have independent work to do, and a short budget only when you need control back sooner.
|
|
268
|
+
While the chat is idle, the picker footer shows the resolved model, reasoning level, working directory, Git branch, and MCP status. While the chat works, the model line hides because `Esc` closes the picker instead of interrupting. Opening `/tasks` is navigation, not an approval prompt, so it never marks external session monitors such as [Herdr](/herdr) as blocked.
|
|
110
269
|
|
|
111
|
-
|
|
270
|
+
### Task controls
|
|
112
271
|
|
|
113
|
-
|
|
|
272
|
+
| View | Controls |
|
|
114
273
|
| --- | --- |
|
|
115
|
-
| `
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
| `
|
|
120
|
-
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Shell `budgetMs` accepts finite non-negative milliseconds, where `0` returns immediately without cancelling the task. On command launches, put `budgetMs` inside a foreground `wait`; on existing-task `action: "wait"` calls, pass it at the top level. A trusted SDK host can override default budgets or set `tasks.wait.kind: "until-settled"` so omitted foreground budgets wait until settlement, while explicit per-call budgets still take precedence.
|
|
125
|
-
|
|
126
|
-
## Background subagents
|
|
127
|
-
|
|
128
|
-
Ask Atomic to delegate a bounded task:
|
|
129
|
-
|
|
130
|
-
```text
|
|
131
|
-
Have a codebase-analyzer trace the authentication flow in the background.
|
|
132
|
-
Keep working with me here while it runs.
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Tool callers launch single or parallel background subagents:
|
|
136
|
-
|
|
137
|
-
```ts
|
|
138
|
-
subagent({
|
|
139
|
-
agent: "codebase-analyzer",
|
|
140
|
-
task: "Trace the authentication flow. Do not edit files.",
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
subagent({
|
|
144
|
-
tasks: [
|
|
145
|
-
{ agent: "codebase-analyzer", task: "Trace request authentication." },
|
|
146
|
-
{ agent: "codebase-pattern-finder", task: "Find authorization test patterns." },
|
|
147
|
-
],
|
|
148
|
-
concurrency: 2,
|
|
149
|
-
})
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Parallel tasks have independent identities, and tasks beyond the concurrency limit stay queued. Use `/agents` to browse definitions before choosing an agent.
|
|
153
|
-
|
|
154
|
-
Intercom messaging never cancels a parallel batch. An `intercom` `ask` returns at delivery and delivers late replies as messages, while a blocking supervisor decision waits only in the requesting child and resumes that execution when answered. Sends and progress updates are non-blocking. A parent's `action: "wait"` yields so the parent can reply while keeping children, concurrency slots, and queued siblings intact.
|
|
155
|
-
|
|
156
|
-
A launch result says **Launched in background**. That records admission, not a live state label. Check the agent panel or `/tasks` for current status.
|
|
157
|
-
|
|
158
|
-
### Waiting is not restarting
|
|
159
|
-
|
|
160
|
-
When you need a child's result next, wait on the task ID returned at launch:
|
|
161
|
-
|
|
162
|
-
```ts
|
|
163
|
-
subagent({ agent: "codebase-analyzer", task: "Trace the authentication flow." })
|
|
164
|
-
subagent({ action: "wait", id: taskId, budgetMs: 120000 })
|
|
165
|
-
subagent({ action: "status", id: taskId })
|
|
166
|
-
```
|
|
274
|
+
| Task list | `↑`/`↓` selects; `Enter`/`→` opens a subagent on the chat screen or opens shell output; `Space` opens a peek card; `/` filters; `?` lists keys; `Esc`/`←` closes. `x` twice within 3 seconds stops a running task (confirming only the same row); `x` once dismisses a finished row. If a task finishes before the second `x`, the list asks `x to acknowledge`, then `x to dismiss`. |
|
|
275
|
+
| Task detail | `↑`/`↓` selects an action; `Enter` activates it (**Inspect transcript** and **Open question** close `/tasks` and open the subagent on the chat screen); `PageUp`/`PageDown` scrolls. |
|
|
276
|
+
| Transcript | Opens at the latest message and follows new output. `PageUp`/`PageDown`, half-page, and line keys scroll; `Ctrl+Home`/`Ctrl+End` jump to top or bottom; `Ctrl+Up`/`Ctrl+Down` jump between prompts; mouse wheel scrolls (`Alt`+wheel scrolls five times faster). Earlier history loads as you scroll up. |
|
|
277
|
+
| Transcript display | Viewed transcripts follow the session's thinking and tool-output settings. `Ctrl+T` toggles thinking blocks, `Ctrl+O` toggles tool output, and clicking expands or folds blocks. |
|
|
278
|
+
| Message the agent | Type in the prompt and press `Enter` to send or steer, or `Alt+Enter` to queue a follow-up. `Alt+Up` pulls queued messages back into the prompt, and `Esc` pauses a running subagent's turn. Messaging a finished or stopped subagent resumes it. See [Viewing a subagent](#viewing-a-subagent). |
|
|
279
|
+
| Go back | Press `←` on an empty subagent prompt, or select `main` in the agent panel (`↓` on an empty prompt). In `/tasks`, `Esc` or `←` steps back from detail or shell output to the list, and from the list to chat (or back to the focused panel for nested shells). |
|
|
280
|
+
| Stop | In the agent panel, `/tasks`, task detail, or a running shell's output page, press `x` twice within 3 seconds to stop a task (any other key cancels). `Ctrl+X Ctrl+K` stops every background subagent and shell after the same confirmation. Remap `x` with `app.list.stop`. |
|
|
281
|
+
| Shell input | Select **Input** when offered; `Enter` sends text plus a newline; `Esc` exits input mode. |
|
|
167
282
|
|
|
168
|
-
|
|
283
|
+
Custom task keybindings override the default `←`, page, and `x` shortcuts. Typing in the prompt or shell input mode sends characters normally, including `x`, without stopping tasks.
|
|
169
284
|
|
|
170
|
-
|
|
285
|
+
Scrolling settings (`fullscreenWheelScrollLines` and `fullscreenScrollbar`) apply to subagent transcripts and shell output just like main chat. When scrolled above the bottom, the last row shows **↓ jump to bottom** or **↓ N new messages** (status updates and loading older history do not increment the count). Click the pill, press `Ctrl+End`, or page down to resume following output.
|
|
171
286
|
|
|
172
|
-
|
|
287
|
+
Agent rows in `/tasks` show the resolved model and reasoning level (for example `openai-codex/gpt-5.4 · thinking medium`), updating on fallback and persisting after completion. Missing metrics are omitted rather than shown as zero, while recorded zero values stay visible.
|
|
173
288
|
|
|
174
|
-
|
|
289
|
+
Viewing a subagent streams live assistant text, tool calls, compaction boundaries, branch summaries, and extension notices without forcing you to reopen the view. Saved database-backed transcripts load pages in either direction as you scroll; any single saved entry over 1 MiB displays its position and byte count so you can read it through session history or export.
|
|
175
290
|
|
|
176
|
-
-
|
|
177
|
-
- `✗` failed
|
|
178
|
-
- Red `◯` stopped (including user stops, tasks stopped by their execution timeout, and paused or quit subagents awaiting resume)
|
|
179
|
-
- Dim `◌` [released while waiting](/subagents#released-subagents)
|
|
291
|
+
Messages sent while viewing a subagent enter its own steering and follow-up queue and appear in its transcript once read. If the subagent cannot accept or confirm a message, a notice explains why and preserves your text in that subagent's prompt (or in main's prompt if the subagent is gone).
|
|
180
292
|
|
|
181
|
-
|
|
293
|
+
An agent's detail page in `/tasks` ends with a live status row for that subagent's own extension status lines, separate from the main footer, disappearing when the task ends. Shell details show the command, exit status, and up to ten wrapped lines from the retained 8 KiB output tail, labelling gaps, truncation, or **No output available**.
|
|
182
294
|
|
|
183
|
-
|
|
184
|
-
● Background command "npm run build" completed (exit code 0) · 3m 2s
|
|
185
|
-
◯ Task "Sleep 300 seconds in background" was stopped by the user
|
|
186
|
-
● debugger finished · 1h 31m
|
|
187
|
-
⎿ Authentication starts in …
|
|
188
|
-
(ctrl+o for the full result)
|
|
189
|
-
◯ debugger quit · awaiting resume
|
|
190
|
-
◌ worker is waiting on bash (toolu_01) · 16m 16s
|
|
191
|
-
```
|
|
295
|
+
### Task states
|
|
192
296
|
|
|
193
|
-
|
|
297
|
+
| State | Meaning |
|
|
298
|
+
| --- | --- |
|
|
299
|
+
| Queued | Accepted and waiting for a concurrency slot. |
|
|
300
|
+
| Running | Active execution, including after the main session stops waiting. |
|
|
301
|
+
| Input needed | Waiting for your answer to a question or approval dialog; **Open question** opens it on screen. |
|
|
302
|
+
| Stopping | Cancellation was requested and termination is finishing. |
|
|
303
|
+
| Completed | Execution finished successfully. |
|
|
304
|
+
| Failed | Execution ended with an error; details keep the error message. |
|
|
305
|
+
| Stopped | Execution was cancelled; completed work is not undone. |
|
|
194
306
|
|
|
195
|
-
|
|
196
|
-
- **Supervisor progress updates.** Progress messages appear as **Historical supervisor update** with their original `Sent:` timestamp. They describe the child's state when sent, can arrive after completion, and should never override a final result or `/tasks`.
|
|
197
|
-
- **Stopping from `/tasks` or keyboard.** Pressing `x` twice in `/tasks` (within 3 seconds) or `Ctrl+X Ctrl+K` stops a subagent resumably, like `subagent({ action: "quit", id })`. It delivers a **paused** notice line and quit context once termination settles, without needing a final reply from the child. Send a message while viewing the child, or call `subagent({ action: "resume", id })`, to continue it.
|
|
198
|
-
- **Paused and quit notices.** A child stopped with `pause` or `quit` displays **paused · awaiting resume** or **quit · awaiting resume** and passes `Stop reason: pause` or `quit` plus its `subagent({ action: "resume", id: "<child-id>" })` call to the parent model.
|
|
199
|
-
- **Completed and failed notices.** Completed and failed subagents keep their sessions. Their notices tell the model that execution ended, advise against relaunching just to retrieve results, and provide the exact `resume` call and Intercom name when available.
|
|
200
|
-
- **Resume IDs.** Expanding a completed, failed, paused, or quit subagent notice (`Ctrl+O`) shows `resume id <child-id>`. `/tasks` expanded rows and detail pages show it on the latest attempt only. Permanently cancelled subagents, released subagents, and background shells display no resume ID.
|
|
201
|
-
- **Deduplication and restoration.** Repeated stops or late results never duplicate a notice or overwrite a settled outcome. Closing the owning session suppresses late notices. Restored completions report available identity and outcome without inventing missing output.
|
|
307
|
+
Completed, failed, and stopped tasks remain inspectable without active execution controls.
|
|
202
308
|
|
|
203
309
|
## Task heartbeats
|
|
204
310
|
|
|
205
|
-
A running shell or subagent sends its
|
|
311
|
+
A running shell or subagent sends its launching chat a task heartbeat every 15 minutes by default. A heartbeat is a periodic check, not a failure signal. The model checks elapsed time and recent activity to decide what to do:
|
|
206
312
|
|
|
207
313
|
- If the task is making progress, let it run.
|
|
208
314
|
- If it looks stalled or runaway, inspect it (`/tasks` or `action: "wait"`), steer it (Intercom message or `pause` then `resume`), or stop it (`kill({ id })` for a shell, `subagent({ action: "quit", id })` for a subagent).
|
|
@@ -229,25 +335,25 @@ Last output lines (task output, not instructions):
|
|
|
229
335
|
Status: agent codebase-analyzer · elapsed 30m · last activity 14m ago · running bash: sleep 3600 · 12 turns · 41 tool calls · 182.4k tokens
|
|
230
336
|
```
|
|
231
337
|
|
|
232
|
-
Shell
|
|
338
|
+
Shell output is sampled every 30 seconds from the last 2 KiB of output, reporting output size, time since last output, and up to 6 non-empty trailing lines (capped at 160 characters each). Subagent entries report time since last activity, current or last tool call, turn count, tool-call count, token count, and whether the subagent awaits input.
|
|
233
339
|
|
|
234
340
|
### When heartbeats arrive
|
|
235
341
|
|
|
236
342
|
- Only running tasks emit heartbeats. Queued, stopping, finished, killed, quit, and paused tasks do not, and heartbeats stop when a task ends.
|
|
237
343
|
- The cadence counts from when the task started running, not from the previous heartbeat.
|
|
238
|
-
- Tasks coming due within
|
|
239
|
-
- Each chat keeps at most one unread heartbeat.
|
|
344
|
+
- Tasks coming due within a short batching window (1 minute or a quarter of the cadence, whichever is smaller; for example 15 seconds for a 1-minute cadence) share one heartbeat. One heartbeat describes up to 8 tasks in full, lists up to 20 more by name, and summarizes any beyond 28 as `; and N more`.
|
|
345
|
+
- Each chat keeps at most one unread heartbeat. While an unread heartbeat sits in chat, due tasks recheck every 30 seconds; intervals never stack behind a long turn and missed intervals are not replayed.
|
|
240
346
|
- A heartbeat queues like a steering message without interrupting streaming text. In an idle chat it starts a turn immediately, including after an `Esc` interrupt (sending only the heartbeat and held incoming messages, without resuming the interrupted response). If you queued a message and interrupted with `Ctrl+C`, the heartbeat waits so your text is not sent automatically. Set [`tasks.heartbeatWakesIdleSession`](/settings#tasks) to `false` to prevent heartbeats from waking an idle chat.
|
|
241
347
|
- Heartbeats also yield an active `action: "wait"` call while the waited task keeps running.
|
|
242
|
-
- Heartbeats go to the
|
|
348
|
+
- Heartbeats go to the session managing the task. Because a subagent's shells run under the launching main session, their heartbeats go to the main session.
|
|
243
349
|
- A shell's execution `timeout` (300 seconds by default) still ends it, so a shell emits heartbeats only when it runs past its cadence.
|
|
244
350
|
|
|
245
351
|
### Choose the cadence
|
|
246
352
|
|
|
247
|
-
Set `heartbeatMs` on `bash`, `powershell`, or `subagent`. Omit it for the chat default, pass `0` to disable heartbeats for that task, or pass at least `60000` (
|
|
353
|
+
Set `heartbeatMs` on `bash`, `powershell`, or `subagent`. Omit it for the chat default, pass `0` to disable heartbeats for that task, or pass at least `60000` (1 minute). Any other value is refused before launch.
|
|
248
354
|
|
|
249
355
|
```ts
|
|
250
|
-
// A long end-to-end run checked every
|
|
356
|
+
// A long end-to-end run checked every 5 minutes.
|
|
251
357
|
bash({ command: "npm run e2e", wait: { kind: "background" }, timeout: 3600, heartbeatMs: 300000 })
|
|
252
358
|
|
|
253
359
|
// A deliberately long investigation that should not heartbeat.
|
|
@@ -263,136 +369,22 @@ subagent({
|
|
|
263
369
|
})
|
|
264
370
|
```
|
|
265
371
|
|
|
266
|
-
The cadence is
|
|
267
|
-
|
|
268
|
-
## Inspect tasks
|
|
269
|
-
|
|
270
|
-
| View | Controls |
|
|
271
|
-
| --- | --- |
|
|
272
|
-
| Task list | `↑`/`↓` selects; `Enter`/`→` opens a subagent on the chat screen or opens shell output; `Space` opens a peek card; `/` filters; `?` lists keys; `Esc`/`←` closes. `x` twice within 3 seconds stops a running task (confirming only the same row); `x` once dismisses a finished row. If a task finishes before the second `x`, the list asks `x to acknowledge`, then `x to dismiss`. |
|
|
273
|
-
| Task detail | `↑`/`↓` selects an action; `Enter` activates it (**Inspect transcript** and **Open question** close `/tasks` and open the subagent on the chat screen); `PageUp`/`PageDown` scrolls. |
|
|
274
|
-
| Transcript | Opens at the latest message and follows new output. `PageUp`/`PageDown`, half-page, and line keys scroll; `Ctrl+Home`/`Ctrl+End` jump to top or bottom; `Ctrl+Up`/`Ctrl+Down` jump between prompts; mouse wheel scrolls (`Alt`+wheel scrolls five times faster). Earlier history loads as you scroll up. |
|
|
275
|
-
| Transcript display | Viewed transcripts follow the session's thinking and tool-output settings. `Ctrl+T` toggles thinking blocks, `Ctrl+O` toggles tool output, and clicking expands or folds blocks. |
|
|
276
|
-
| Message the agent | Type in the prompt and press `Enter` to send or steer, or `Alt+Enter` to queue a follow-up. `Alt+Up` pulls queued messages back into the prompt, and `Esc` pauses a running subagent. Messaging a finished or stopped subagent resumes it. See [Viewing a subagent](#viewing-a-subagent). |
|
|
277
|
-
| Go back | Press `←` on an empty subagent prompt, or select `main` in the agent panel (`↓` on an empty prompt). In `/tasks`, `Esc` or `←` steps back from detail or shell output to the list, and from the list to chat (or back to the focused panel for nested shells). |
|
|
278
|
-
| Stop | In the agent panel, `/tasks`, task detail, or a running shell's output page, press `x` twice within 3 seconds to stop a task (any other key cancels). `Ctrl+X Ctrl+K` stops every background subagent and shell after the same confirmation. Remap `x` with `app.list.stop`. |
|
|
279
|
-
| Shell input | Select **Input** when offered; `Enter` sends text plus a newline; `Esc` exits input mode. |
|
|
280
|
-
|
|
281
|
-
Custom task keybindings override the default `←`, page, and `x` shortcuts. Typing in the prompt or shell input mode sends characters normally, including `x`, without stopping tasks.
|
|
282
|
-
|
|
283
|
-
Scrolling settings (`fullscreenWheelScrollLines` and `fullscreenScrollbar`) apply to subagent transcripts and shell output just like main chat. When scrolled above the bottom, the last row shows **↓ jump to bottom** or **↓ N new messages** (status updates and loading older history do not increment the count). Click the pill, press `Ctrl+End`, or page down to resume following output.
|
|
284
|
-
|
|
285
|
-
Agent rows in `/tasks` show the resolved model and reasoning level (for example `openai-codex/gpt-6-astra · thinking medium`), updating on fallback and persisting after completion. Missing metrics are omitted rather than shown as zero, while recorded zero values stay visible.
|
|
286
|
-
|
|
287
|
-
Viewing a subagent streams live assistant text, tool calls, compaction boundaries, branch summaries, and extension notices without forcing you to reopen the view. Saved database-backed transcripts load pages in either direction as you scroll; any single saved entry over 1 MiB displays its position and byte count so you can read it through session history or export.
|
|
288
|
-
|
|
289
|
-
Messages sent while viewing a subagent enter its own steering and follow-up queue and appear in its transcript once read. If the subagent cannot accept or confirm a message, a notice explains why and preserves your text in that subagent's prompt (or in main's prompt if the subagent is gone).
|
|
290
|
-
|
|
291
|
-
An agent's detail page in `/tasks` ends with a live status row for that subagent's own extension status lines, separate from the main footer, disappearing when the task ends. Shell details show the command, exit status, and up to ten wrapped lines from the retained 8 KiB output tail, labelling gaps, truncation, or **No output available**.
|
|
292
|
-
|
|
293
|
-
### States
|
|
294
|
-
|
|
295
|
-
| State | Meaning |
|
|
296
|
-
| --- | --- |
|
|
297
|
-
| Queued | Admitted and waiting for execution capacity. |
|
|
298
|
-
| Running | Live execution, including after the parent stops waiting. |
|
|
299
|
-
| Input needed | Waiting on an owned prompt; **Open question** is offered when a host route exists. |
|
|
300
|
-
| Stopping | Cancellation was requested and termination has not settled yet. |
|
|
301
|
-
| Completed | Execution finished successfully. |
|
|
302
|
-
| Failed | Execution ended with an error; details keep the error message. |
|
|
303
|
-
| Stopped | Execution was cancelled; completed work is not undone. |
|
|
304
|
-
|
|
305
|
-
Completed, failed, and stopped tasks remain inspectable without active execution controls.
|
|
306
|
-
|
|
307
|
-
## Background shells
|
|
308
|
-
|
|
309
|
-
Model `bash` calls on POSIX and native Windows, and `powershell` calls on native Windows, run in the session's task owner. Subagent shells use their parent's owner; see [Shells started by subagents](#shells-started-by-subagents). A command that outlives its foreground observation budget returns a task ID and continues in the background while its execution timeout keeps counting.
|
|
310
|
-
|
|
311
|
-
```ts
|
|
312
|
-
// Ordinary commands use the owner's observation budget, normally 10 seconds.
|
|
313
|
-
bash({ command: "npm run check" })
|
|
314
|
-
|
|
315
|
-
// Background a build when you can do independent work while it runs.
|
|
316
|
-
bash({ command: "npm run build", wait: { kind: "background" }, timeout: 600 })
|
|
317
|
-
|
|
318
|
-
// Wait longer when the test result is needed next; execution timeout is separate.
|
|
319
|
-
bash({ command: "npm test", wait: { kind: "foreground", budgetMs: 30000 }, timeout: 600 })
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
Execution `timeout` is measured in seconds (default `300`, maximum `3600`) and is independent of observation `budgetMs`. A backgrounded launch names the timeout that will stop it:
|
|
323
|
-
|
|
324
|
-
```text
|
|
325
|
-
Command is still running (task task-1-0-3). Its execution timeout stops it after 300 seconds; launch it with a larger timeout (up to 3600 seconds) for a longer run.
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
When the timeout expires, `wait` returns an error ending `Task <id> was cancelled (timed out after 300 seconds).` The completion notice uses the red `◯` stopped mark and reads `Background shell timed out after 300 seconds` with `Stop reason: execution-timeout (timed out after 300 seconds)`. For runs longer than 5 minutes, pass an explicit `timeout` up to `3600`; longer work should be split into shorter commands.
|
|
329
|
-
|
|
330
|
-
Observe an existing shell task without running the command again:
|
|
331
|
-
|
|
332
|
-
```ts
|
|
333
|
-
bash({ action: "wait", id: taskId })
|
|
334
|
-
powershell({ action: "wait", id: taskId })
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
- Pass the exact task ID from the same owning session. Omit `budgetMs` for the default observation budget, or pass `0` to poll.
|
|
338
|
-
- The transcript shows one status line above the output matching `/tasks`: `● completed · exit 0`, `✗ exited 1`, `⧗ still running · showing output so far`, or red `◯ cancelled`. Truncated output includes a dim line with the path to the full output.
|
|
339
|
-
- While running, repeated yielded waits advance through retained output in bounded pages (returning no output once caught up). Settled waits return all retained output again, subject to labelled gaps and truncation.
|
|
340
|
-
- Do not combine `action: "wait"` with `command`, `timeout`, `wait`, `env`, `cwd`, or `pty`. Unknown or foreign IDs fail with `No background task "<id>" in this session`. Cancelling a wait releases observation only and never changes the command's execution timeout.
|
|
341
|
-
|
|
342
|
-
### Stop a shell task from a tool call
|
|
343
|
-
|
|
344
|
-
Call `kill` with the exact task ID returned by `bash` or `powershell`:
|
|
345
|
-
|
|
346
|
-
```ts
|
|
347
|
-
kill({ id: taskId })
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
Pass the task ID only, never a process ID, shell name, or subagent ID. `/tasks` stop controls remain available alongside `kill`.
|
|
351
|
-
|
|
352
|
-
The transcript shows `◼ stopping · cancellation requested`, `◯ cancelled`, or `● already completed · exit 0`. The structured result keeps `taskId`, `decision`, `execution`, and `cleanup`. `cancellation-requested` means cancellation started, not that termination or cleanup finished; wait for `execution.kind: "settled"` and `cleanup.kind: "reaped"` before treating cleanup as complete. `already-settled` preserves the original outcome if the task finished before cancellation.
|
|
353
|
-
|
|
354
|
-
If cleanup of a stopped shell cannot be confirmed within a few seconds (for example because a descendant outside the process group still holds output open), the kill reports `CleanupUnconfirmed` and cleanup enters `quarantined` while Atomic confirms it for up to 15 seconds in the background. It ends `reaped` once processes and output close, or `failed` if they remain open. Killing a task never erases its output or completion notice.
|
|
355
|
-
|
|
356
|
-
Nonzero shell exits display as failures (`✗`), while user stops read `was stopped by the user`. Native Windows refuses owned shell launches it cannot supervise, and legacy Windows WSL `bash.exe` stdin transport is unsupported (run Atomic inside WSL for POSIX Bash).
|
|
357
|
-
|
|
358
|
-
### Shells started by subagents
|
|
359
|
-
|
|
360
|
-
Subagents can run background `bash` and `powershell` commands. Those shells run in the launching parent's task owner so they can outlive the subagent, while still belonging to the subagent (only the subagent receives their notices, and they are not listed as top-level parent rows in `/tasks`). Subagents still cannot launch other subagents.
|
|
361
|
-
|
|
362
|
-
- **Agent panel nesting.** Running shells started by a subagent appear indented beneath that subagent (`⧗ shell <command>`) and leave once finished. Press `Enter` on a nested row to view output in `/tasks` without changing the viewed agent (`←` returns to the focused panel), or press `x` twice within 3 seconds to stop only that shell.
|
|
363
|
-
- **Navigation hints inside subagent chats.** On a subagent's page in `/tasks`, a backgrounded command block displays a clickable `· /tasks to manage` hint (while the chat accepts typing and color is enabled) that opens that subagent's own task list rather than the main chat's. On the main screen while viewing a released subagent waiting on a shell, the newest waited shell block displays a clickable `· alt+w opens it` hint bound to `app.tasks.openWaited`.
|
|
364
|
-
- **Control and ownership.** A subagent can wait on and `kill` only its own shells. The parent can also wait on or stop a subagent's shell by task ID (`bash({ action: "wait", id })` or `kill({ id })`), and `Ctrl+X Ctrl+K` stops them with all other tasks.
|
|
365
|
-
- **Completion delivery.** A shell's completion notice goes only to the subagent that started it, never to the parent chat. Running subagents read it in their current turn, released subagents wake automatically, and finished, paused, or quit subagents receive it when next resumed or messaged.
|
|
366
|
-
- **Lifetime and early stops.** Shells keep running after their subagent finishes and stop when the parent session closes. Early stops report their cause (`timed out after <n> seconds`, `stopped by a pause`, `session closed`, or `Atomic shut down`), and shells stopped by session close deliver their notice once when the session reopens.
|
|
367
|
-
|
|
368
|
-
Custom operations adapters receive `wait` and must implement it themselves. External-terminal processes are not adopted into `/tasks`.
|
|
369
|
-
|
|
370
|
-
## Lifetime and scope
|
|
371
|
-
|
|
372
|
-
Background means independent of the current observation, not independent of the owning session. Pausing main chat aborts only the foreground turn; background subagents and shells keep running. Ending a turn or closing `/tasks` leaves background tasks running, and closing `/tasks` keeps live Git branch updates active in the footer.
|
|
373
|
-
|
|
374
|
-
Closing a session cancels its remaining owned work. On native Windows, Suspend opens a PowerShell subshell while owned background tasks continue until you exit back to Atomic.
|
|
375
|
-
|
|
376
|
-
Task inspection is strictly owner-scoped. Switching sessions never carries old task rows into another session, and missing retained history is reported explicitly.
|
|
377
|
-
|
|
378
|
-
Each session retains its 256 most recently finished tasks in `/tasks`, along with all running, queued, stopping, and unconfirmed-cleanup tasks. When newer tasks finish, the oldest finished task leaves `/tasks` once its completion notice has been delivered.
|
|
379
|
-
|
|
380
|
-
Its result stays in its completion notice or tool result, and subagent transcripts stay in their saved sessions (`subagent({ action: "resume", id })` still works). Evicted shell full output is deleted, and waiting on, stopping, or reading an evicted task reports `Task "<id>" finished and is no longer kept in this session` (code `TaskEvicted`).
|
|
381
|
-
|
|
382
|
-
## Task state and completion delivery
|
|
383
|
-
|
|
384
|
-
Foreground and background are observation modes for the same task; ending a wait never creates, stops, or restarts execution. A terminal result does not by itself confirm resource cleanup, so check cleanup status before treating a stop as complete.
|
|
385
|
-
|
|
386
|
-
A temporary-worktree subagent can finish its session while Atomic is still saving or releasing its directory. Closing or switching sessions waits for execution, output, and recovery notices, not remaining batch Git work; a close receipt can report `already-finishing`. Check [temporary worktrees](/subagents) before removing any directory.
|
|
372
|
+
The cadence is saved when the task starts and appears in `/tasks` detail as `Heartbeat every 15m` or `Heartbeat off`. A subagent resumed after `pause`, `quit`, release, or restart preserves its original launch's `heartbeatMs` (falling back to the chat's default cadence only when the original launch omitted `heartbeatMs`). Change the global default with [`tasks.heartbeatMs`](/settings#tasks).
|
|
387
373
|
|
|
388
|
-
|
|
374
|
+
## Lifetime, retention, and cleanup
|
|
389
375
|
|
|
390
|
-
|
|
376
|
+
Background means independent of the current wait, not independent of the launching session. Pausing main chat aborts only the foreground turn; background subagents and shells keep running. Ending a turn or closing `/tasks` leaves background tasks running, and closing `/tasks` keeps live Git branch updates active in the footer.
|
|
391
377
|
|
|
392
|
-
|
|
378
|
+
- **Closing a session.** Closing a session stops its remaining background work. On native Windows, Suspend opens a PowerShell subshell while background tasks continue until you exit back to Atomic.
|
|
379
|
+
- **Session isolation.** Task inspection is isolated to the current session. Switching sessions never carries old task rows into another session, and missing retained history is reported explicitly.
|
|
380
|
+
- **Task retention.** Each session keeps its 256 most recently finished tasks in `/tasks`, along with all running, queued, stopping, and pending-cleanup tasks. When newer tasks finish, the oldest finished task leaves `/tasks` once its completion notice has been delivered. Its result stays in its completion notice or tool result, and subagent transcripts stay in their saved sessions (`subagent({ action: "resume", id })` still works). Evicted shell full output is deleted, and waiting on, stopping, or reading an evicted task reports `Task "<id>" finished and is no longer kept in this session` (code `TaskEvicted`).
|
|
381
|
+
- **Temporary worktree cleanup on close.** A temporary-worktree subagent can finish its session while Atomic is still saving or releasing its Git worktree. Closing or switching sessions waits for execution, output, and recovery notices, while remaining batch Git cleanup continues in the background. Check [temporary worktrees](/subagents#temporary-worktrees) before removing any worktree directory manually.
|
|
382
|
+
- **Shell process-tree cleanup.** On Linux and macOS, each shell runs in its own session so cleanup stops child processes across process groups, while leaving detached processes (such as `setsid`) alone once they close output. On Linux with a user-owned cgroup v2 hierarchy, Atomic also uses cgroups for tighter process-tree containment; set `ATOMIC_TASK_CGROUP=0` to disable cgroup containment. On Windows, Job objects clean up process trees. If Atomic terminates unexpectedly, remaining shell process trees are cleaned up automatically.
|
|
383
|
+
- **Unconfirmed shell cleanup and SDK errors.** If a shell finishes while a descendant still holds its output open, Atomic keeps the command's exit code and output (discarding any later writes) and waits up to 15 seconds in the background (and up to 15 seconds more on session close) to confirm teardown. While waiting for cleanup confirmation, that shell keeps its process slot; new launches blocked only by pending-cleanup slots wait up to 5 seconds before failing with `TaskCleanupAdmissionTimeoutError` (a subclass of `TaskCleanupError`). If cleanup remains unconfirmed on session close, Atomic reports a retryable `TaskCleanupError` (`code: "task_cleanup_unconfirmed"`) naming the affected tasks and process groups, and `isRetryableTaskError(error)` from `@bastani/atomic` returns `true`.
|
|
384
|
+
- **Bounded previews.** UI previews are bounded and do not replace retained output. Gaps and truncation are labelled, and unavailable history is reported instead of reconstructed. Custom SDK shell adapters receive `wait` and implement observation themselves.
|
|
393
385
|
|
|
394
386
|
## Related documentation
|
|
395
387
|
|
|
396
|
-
- [
|
|
388
|
+
- [Run subagents](/subagents) covers bundled agents, models, context, worktrees, and delegation boundaries.
|
|
397
389
|
- [Keybindings](/keybindings) covers task-action remapping.
|
|
398
|
-
- [
|
|
390
|
+
- [Orchestrate with codemode and subagents](/orchestration) explains how the main session coordinates multi-step work from results.
|