@bastani/atomic 0.10.14 → 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 +17 -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 +1 -1
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +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
package/docs/background-tasks.md
CHANGED
|
@@ -1,46 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Manage background tasks"
|
|
3
|
-
sidebarTitle: "
|
|
4
|
-
description: "Monitor, steer, and stop background subagents
|
|
3
|
+
sidebarTitle: "Manage background tasks"
|
|
4
|
+
description: "Monitor, steer, and stop background subagents, shell commands, and history searches while continuing your conversation."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Background subagents
|
|
7
|
+
Background subagents, shell commands, and history searches keep running after their tool call returns. You can keep chatting in your main session, inspect live output, steer subagents, or stop individual tasks without losing your place.
|
|
8
|
+
|
|
9
|
+
| What you want | Use this |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| See running subagents and switch views | Focus the [agent panel](#the-agent-panel) (`↓` on an empty prompt) |
|
|
12
|
+
| Inspect all subagents, shells, and full output | Run [`/tasks`](#open-the-task-inspector) (or `/tasks <id>`) |
|
|
13
|
+
| Wait for a task's result from a tool call | Pass `{ action: "wait", id, budgetMs? }` to `subagent`, `bash`, `powershell`, `read`, or `search` |
|
|
14
|
+
| Stop one shell or history task | Call `kill({ id })`, or press `x` twice in `/tasks` |
|
|
15
|
+
| Pause, quit, or resume a subagent | Call `subagent({ action: "pause" \| "quit" \| "resume", id })`, or press `x` twice in `/tasks` or the agent panel |
|
|
16
|
+
| Stop all background subagents and shells | Press `Ctrl+X` then `Ctrl+K` (twice within 3 seconds) |
|
|
17
|
+
|
|
18
|
+
For the full tool wait matrix, slash-command routing inside subagent views, heartbeat sampling rules, cgroup cleanup controls, and SDK error classes, see the [Background tasks reference](/background-tasks/reference).
|
|
8
19
|
|
|
9
20
|
## Background subagents
|
|
10
21
|
|
|
11
|
-
Every subagent runs in the background.
|
|
22
|
+
Every subagent runs in the background. Describe bounded work in plain language and keep working in your main chat while the subagent runs:
|
|
12
23
|
|
|
13
24
|
```text
|
|
14
25
|
Have a codebase-analyzer trace the authentication flow in the background.
|
|
15
26
|
Keep working with me here while it runs.
|
|
16
27
|
```
|
|
17
28
|
|
|
18
|
-
|
|
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](/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.
|
|
29
|
+
Each launch returns immediately with **Launched in background** and each subagent's task ID. Parallel launches get independent IDs, and tasks beyond the concurrency limit wait in the queue. Run `/agents` to browse available specialists.
|
|
40
30
|
|
|
41
31
|
### Waiting is not restarting
|
|
42
32
|
|
|
43
|
-
When your next step depends on a subagent's result, wait on
|
|
33
|
+
When your next step depends on a subagent's result, wait on its task ID instead of launching a second subagent:
|
|
44
34
|
|
|
45
35
|
```ts
|
|
46
36
|
subagent({ agent: "codebase-analyzer", task: "Trace the authentication flow." })
|
|
@@ -48,20 +38,11 @@ subagent({ action: "wait", id: taskId, budgetMs: 120000 })
|
|
|
48
38
|
subagent({ action: "status", id: taskId })
|
|
49
39
|
```
|
|
50
40
|
|
|
51
|
-
If the wait budget expires
|
|
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).
|
|
41
|
+
If the wait budget expires, you press `Esc`, or a user message or [Intercom](/intercom) message yields the wait, the subagent keeps running under the same task ID. Wait again or let its completion notice arrive. To hold, stop, or continue a subagent, use `pause`, `quit`, and `resume` ([Run control](/subagents#run-control)).
|
|
54
42
|
|
|
55
43
|
### Completion messages
|
|
56
44
|
|
|
57
|
-
When a background task
|
|
58
|
-
|
|
59
|
-
- Green `●` completed
|
|
60
|
-
- `✗` failed
|
|
61
|
-
- Red `◯` stopped (user stops, shells stopped by their `timeout`, and paused or quit subagents awaiting resume)
|
|
62
|
-
- Dim `◌` [released while waiting](/subagents#released-subagents)
|
|
63
|
-
|
|
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:
|
|
45
|
+
When a background task finishes or stops, Atomic adds one notice line to the launching chat without waiting for a model reply. Press `Ctrl+O` to expand a shell's retained output lines or a subagent's full result:
|
|
65
46
|
|
|
66
47
|
```text
|
|
67
48
|
● Background command "npm run build" completed (exit code 0) · 3m 2s
|
|
@@ -73,434 +54,146 @@ Each notice names the task or agent, its outcome, and how long it ran. A collaps
|
|
|
73
54
|
◌ worker is waiting on bash (toolu_01) · 16m 16s
|
|
74
55
|
```
|
|
75
56
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- **
|
|
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.
|
|
57
|
+
- **Delivery.** Notices go only to the session that launched the task. Multiple tasks that finish together arrive in one batch and start one turn in an idle chat. After an interrupt, notices wait for your next message.
|
|
58
|
+
- **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 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 stay resumable by messaging the subagent or calling `resume`.
|
|
59
|
+
- **Resume IDs.** Expanding a completed, failed, paused, or quit subagent notice (`Ctrl+O`) shows `resume id <child-id>`. Permanently cancelled subagents, released subagents, and shells have no resume ID.
|
|
85
60
|
|
|
86
61
|
## Background shells
|
|
87
62
|
|
|
88
|
-
When
|
|
89
|
-
|
|
90
|
-
### What changed in this release
|
|
91
|
-
|
|
92
|
-
- **Before:** a command stopped after 5 minutes (300 seconds) unless the model asked for longer, and it could ask for 1 hour (3600 seconds) at most. A longer job had to be split into shorter commands.
|
|
93
|
-
- **Now:** a command has no time limit. It runs until it finishes, someone stops it, or the session closes. A deadline is still available when you want one, and it can be as long as you like.
|
|
94
|
-
- **New:** a session runs at most 64 commands at once, so a runaway loop cannot start commands without end.
|
|
95
|
-
|
|
96
|
-
### What happens when you run a long command
|
|
63
|
+
When Atomic runs a [`bash`](/tools#bash) or [`powershell`](/tools#powershell) command, it watches the command for up to 10 seconds by default. If the command is still running when that observation window ends, Atomic returns a task ID (such as `task-1-0-3`) and leaves the command running in the background until it exits, you stop it, it hits a `timeout` or the 5 GiB disk output cap, or the session closes.
|
|
97
64
|
|
|
98
65
|
```ts
|
|
99
|
-
//
|
|
66
|
+
// Watch for up to 10 seconds, then continue in the background if still running
|
|
100
67
|
bash({ command: "npm test" })
|
|
101
68
|
|
|
102
|
-
//
|
|
69
|
+
// Start in the background immediately
|
|
103
70
|
bash({ command: "npm run build", wait: { kind: "background" } })
|
|
104
71
|
|
|
105
|
-
// Watch for up to 30 seconds
|
|
72
|
+
// Watch for up to 30 seconds before backgrounding
|
|
106
73
|
bash({ command: "npm test", wait: { kind: "foreground", budgetMs: 30000 } })
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
How long Atomic watches (`wait`) only decides when the call returns. It never stops the command.
|
|
110
|
-
|
|
111
|
-
**What you see.** The tool line in the chat turns into:
|
|
112
|
-
|
|
113
|
-
```text
|
|
114
|
-
⧗ Bash(npm run build) · background
|
|
115
|
-
⎿ Running in background · /tasks to manage
|
|
116
|
-
```
|
|
117
74
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
Command is still running (task task-1-0-3). It has no time limit: it runs until it exits, kill stops it, or this session ends.
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
When the command finishes, a completion message with its exit code and the end of its output appears in the chat, and the model reads it on its next turn.
|
|
125
|
-
|
|
126
|
-
### Check on it, wait for it, stop it
|
|
127
|
-
|
|
128
|
-
```ts
|
|
129
|
-
// Check on it: wait at most 5 seconds and show the output so far.
|
|
75
|
+
// Check progress or wait on a running shell
|
|
130
76
|
bash({ action: "wait", id: "task-1-0-3", budgetMs: 5000 })
|
|
131
77
|
|
|
132
|
-
//
|
|
133
|
-
bash({ action: "wait", id: "task-1-0-3" })
|
|
134
|
-
|
|
135
|
-
// Stop it.
|
|
78
|
+
// Stop a running shell
|
|
136
79
|
kill({ id: "task-1-0-3" })
|
|
137
80
|
```
|
|
138
81
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
If a command must not run longer than a known time, give it a `timeout` in seconds. Any positive number works, with no upper limit. Leaving `timeout` out is what gives a command no time limit. `0`, a negative number, or anything that is not a number is refused before the command starts, with a message saying to leave `timeout` out for no limit.
|
|
144
|
-
|
|
145
|
-
```ts
|
|
146
|
-
// Stop the end-to-end tests if they are still running after 2 hours.
|
|
147
|
-
bash({ command: "npm run e2e", wait: { kind: "background" }, timeout: 7200 })
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
The model is told the deadline when the command goes to the background:
|
|
151
|
-
|
|
152
|
-
```text
|
|
153
|
-
Command is still running (task task-1-0-4). Its timeout stops it after 7200 seconds.
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
When the deadline passes, Atomic stops the command. Its completion message reads `Background shell timed out after 7200 seconds`, and a wait on it ends with `Task task-1-0-4 was cancelled (timed out after 7200 seconds).`
|
|
82
|
+
- **Optional deadline (`timeout`).** Commands have no time limit unless you pass a positive `timeout` in seconds (no upper limit). When the deadline passes, Atomic stops the command and reports a timeout failure.
|
|
83
|
+
- **Cancelling `wait` vs. cancelling a launch.** Pressing `Esc` during `action: "wait"` ends only the wait and leaves the command running. Pressing `Esc` during the initial foreground wait of a brand-new `bash` or `powershell` call stops the command.
|
|
84
|
+
- **Stopping with `kill`.** Pass only the shell's task ID (not a PID or subagent ID). `kill` starts teardown and reports whether cleanup finished; wait for settlement before assuming files or ports are free. See [Stopping tasks and CancelReceipt](/background-tasks/reference#stop-a-shell-task-from-a-tool-call).
|
|
157
85
|
|
|
158
86
|
### Long-running servers and watchers
|
|
159
87
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
```ts
|
|
163
|
-
bash({ command: "npm run dev", wait: { kind: "background" } })
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
- **It keeps running.** Nothing stops it on a timer. It runs until you stop it with `kill`, it exits on its own (for example, it crashes), or the session ends.
|
|
167
|
-
- **Check its output later** with a short wait, which shows what it has printed so far and leaves it running:
|
|
168
|
-
|
|
169
|
-
```ts
|
|
170
|
-
bash({ action: "wait", id: "task-1-0-5", budgetMs: 1000 })
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
- **Stop it** with `kill({ id: "task-1-0-5" })`, or from `/tasks`.
|
|
174
|
-
- **It counts toward the limit** of 64 commands running at once, for as long as it runs.
|
|
175
|
-
- **Heartbeats.** Every 15 minutes by default, Atomic reminds the model that it is still running; see [Task heartbeats](#task-heartbeats). Turn them off for a server with `heartbeatMs: 0`.
|
|
176
|
-
- **When the session ends**, Atomic stops it together with everything it started. When you resume the session later, the server does **not** start again: the chat shows `Background shell stopped (session closed)` for it, and you or the model run the command again if you still need it. If Atomic itself crashes, the server and its child processes are stopped as well, and a resumed session says the command no longer runs because Atomic restarted.
|
|
88
|
+
Start dev servers, file watchers, or tunnels with `wait: { kind: "background" }`. They run without a time limit until stopped with `kill` or `/tasks`, they exit on their own, or the session ends. Pass `heartbeatMs: 0` if you do not want periodic heartbeat check-ins. When the session closes or Atomic exits, background servers stop with their child processes and do not restart automatically on resume.
|
|
177
89
|
|
|
178
90
|
### How many commands run at once
|
|
179
91
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
```text
|
|
183
|
-
64 commands are already running in this session, the most it runs at once. Stop one you no longer need with kill or /tasks, or wait for one to finish, then run this command again.
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Nothing already running is stopped to make room.
|
|
187
|
-
|
|
188
|
-
### More about waiting
|
|
189
|
-
|
|
190
|
-
- Pass the exact task ID from the same session. An unknown ID fails with `No background task "<id>" in this session`.
|
|
191
|
-
- A wait on a finished command shows one status line above the output, the same as `/tasks`: `● completed · exit 0`, `✗ exited 1`, or a red `◯ cancelled`. Long output ends with a dim line naming the file that holds all of it.
|
|
192
|
-
- While a command runs, each new wait shows the output printed since the last one. A wait on a finished command shows all the output again.
|
|
193
|
-
- A wait takes only `action`, `id`, and `budgetMs`. Cancelling a wait ends only the wait: the command keeps running, with the same deadline, if it has one.
|
|
194
|
-
|
|
195
|
-
### Stop a shell task from a tool call
|
|
196
|
-
|
|
197
|
-
Call `kill` with the exact task ID returned by `bash` or `powershell`:
|
|
198
|
-
|
|
199
|
-
```ts
|
|
200
|
-
kill({ id: taskId })
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Pass the task ID only, never a process ID, shell name, or subagent ID. `/tasks` stop controls remain available alongside `kill`. `kill` also stops a slow search of past sessions by its ID, such as `kill({ id: "history-3" })`. See [Slow history searches](/sessions#slow-history-searches).
|
|
204
|
-
|
|
205
|
-
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.
|
|
206
|
-
|
|
207
|
-
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.
|
|
208
|
-
|
|
209
|
-
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).
|
|
92
|
+
A session runs at most **64** shell commands concurrently, counting shells started by its subagents. Commands currently stopping do not count toward the cap. At the limit, new commands are refused until an existing command finishes or is stopped.
|
|
210
93
|
|
|
211
94
|
### Shells started by subagents
|
|
212
95
|
|
|
213
|
-
Subagents can run background `bash` and `powershell` commands.
|
|
214
|
-
|
|
215
|
-
- **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.
|
|
216
|
-
- **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`.
|
|
217
|
-
- **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.
|
|
218
|
-
- **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.
|
|
219
|
-
- **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.
|
|
96
|
+
Subagents can run background `bash` and `powershell` commands. Your launching main session supervises their lifecycle so they can outlive the subagent until the main session closes, while their completion notices go only to the subagent that started them.
|
|
220
97
|
|
|
221
|
-
|
|
98
|
+
- Running subagent shells nest directly beneath their subagent in the agent panel (`⧗ shell <command>`). Press `Enter` on a nested shell to inspect its output in `/tasks` (`←` returns to the panel), or press `x` twice to stop only that shell.
|
|
99
|
+
- A subagent can wait on and `kill` only its own shells; your main session can wait on or stop them by task ID or stop everything together with `Ctrl+X Ctrl+K`.
|
|
222
100
|
|
|
223
101
|
## Background history searches
|
|
224
102
|
|
|
225
|
-
A `read` or `search`
|
|
226
|
-
|
|
227
|
-
```ts
|
|
228
|
-
// Start a history search or read immediately in the background.
|
|
229
|
-
search({ pattern: "connection refused", paths: "history://sessions", wait: { kind: "background" } })
|
|
230
|
-
read({ path: "history://sessions/019f6a2e-...:1-200", wait: { kind: "background" } })
|
|
231
|
-
|
|
232
|
-
// Wait up to 30 seconds before continuing in the background.
|
|
233
|
-
search({ pattern: "connection refused", paths: "history://sessions", wait: { kind: "foreground", budgetMs: 30000 } })
|
|
234
|
-
|
|
235
|
-
// Observe a running history task (omit budgetMs for the default 10s wait, or pass 0 to poll immediately).
|
|
236
|
-
search({ action: "wait", id: "history-3", budgetMs: 5000 })
|
|
237
|
-
read({ action: "wait", id: "history-4" })
|
|
238
|
-
|
|
239
|
-
// Stop a running history task (sends no completion notice).
|
|
240
|
-
kill({ id: "history-3" })
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
- **Mutually exclusive wait mode.** Just like `bash` and `powershell`, `{ action: "wait", id, budgetMs? }` cannot be combined with `path`, `pattern`, `paths`, `wait`, or other call fields. Either `read` or `search` can wait on any `history-N` task from the same session.
|
|
244
|
-
- **Completion notices and late waits.** If a task finishes while no wait is observing it, its result arrives as a completion notice in chat. If a wait is observing it when it finishes, the wait returns the result directly with no duplicate notice. Atomic keeps the 16 most recently finished history tasks so a late `{ action: "wait", id }` call still returns the result.
|
|
245
|
-
- **Concurrency limit (4 per session).** A session runs at most 4 active history searches and reads at once (including calls currently being observed in the foreground), separately from its 64 shell commands: they run inside Atomic on the session store and a shared regex worker, so more at once would only slow each other down. At the limit, a new call fails with:
|
|
246
|
-
|
|
247
|
-
```text
|
|
248
|
-
4 history searches and reads are already running in this session, the most it runs at once. Stop one you no longer need with kill, or wait for one to finish, then run this one again.
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
- **Differences from background shells.** History tasks take no `timeout` and emit no heartbeats, do not appear in `/tasks` or the agent panel, stop when the session closes or reloads, and are not restarted when a session is resumed. For non-`history://` paths, `read` and `search` always run inline. See [Slow history searches](/sessions#slow-history-searches) for URL syntax, entry selectors, continuations, and a full comparison table.
|
|
252
|
-
|
|
253
|
-
## Choose how long to wait
|
|
254
|
-
|
|
255
|
-
The agent chooses foreground-first or background observation for each shell call and each `history://` `read` or `search` 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.
|
|
256
|
-
|
|
257
|
-
For ordinary commands and history queries, omit `wait` rather than routinely passing a 1-second budget. Short budgets background fast calls 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.
|
|
258
|
-
|
|
259
|
-
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.
|
|
260
|
-
|
|
261
|
-
| Call | Observation behavior |
|
|
262
|
-
| --- | --- |
|
|
263
|
-
| `bash`, `powershell`, or `history://` `read`/`search` without `wait` | Waits for the session's command observation budget (default 10 seconds), then yields automatically with a task ID (`task-...` or `history-...`) if still running. |
|
|
264
|
-
| `bash`, `powershell`, or `history://` `read`/`search` with `wait: { kind: "background" }` | Returns a task ID immediately without waiting for completion (`budgetMs` is not allowed with `kind: "background"`). |
|
|
265
|
-
| `bash`, `powershell`, or `history://` `read`/`search` with `wait: { kind: "foreground" }` | Waits for the session's command observation budget (default 10 seconds), then continues in the background if still running. |
|
|
266
|
-
| `bash`, `powershell`, or `history://` `read`/`search` with `wait: { kind: "foreground", budgetMs: 1000 }` | Waits up to 1 second (`budgetMs` must be finite and non-negative), then yields automatically if still running. |
|
|
267
|
-
| `{ action: "wait", id, budgetMs? }` on `bash`, `powershell`, `read`, or `search` | Observes an existing background task for `budgetMs` milliseconds (default 10 seconds when omitted; `0` checks immediately without cancelling the task). |
|
|
268
|
-
| `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"`. |
|
|
269
|
-
| `subagent({ action: "wait", id })` | Waits for the session's agent wait budget (default 30 seconds), or for `budgetMs`. `Esc` ends the wait immediately. |
|
|
270
|
-
|
|
271
|
-
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.
|
|
272
|
-
|
|
273
|
-
`budgetMs` accepts finite non-negative milliseconds, where `0` returns immediately without cancelling the task. On launches (`bash`, `powershell`, and `history://` `read`/`search`), 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 (see [Supervised command SDK](/sdk/reference#supervised-command-sdk)).
|
|
103
|
+
A `read` or `search` over `history://` follows the same 10-second default watch window and continues in the background as `history-N` with no time limit. Each session allows up to **4** concurrent `history://` searches or reads (separate from the 64 shell cap). Stop one with `kill({ id: "history-3" })` (`Ctrl+X Ctrl+K` stops subagents and shells only, not history tasks). History tasks do not appear in `/tasks` or the agent panel and emit no heartbeats. See [Slow history searches](/sessions#slow-history-searches).
|
|
274
104
|
|
|
275
105
|
## The agent panel
|
|
276
106
|
|
|
277
|
-
Below the prompt, the agent panel lists the session's active background subagents
|
|
107
|
+
Below the prompt, the agent panel lists `main` followed by the session's active background subagents (and any running shells nested beneath them). The currently viewed chat has a filled `●` and bold label:
|
|
278
108
|
|
|
279
109
|
```text
|
|
280
110
|
● main
|
|
281
111
|
◯ worker openai/gpt-5.4 high fix shipping batches 41m · ↓ 96.1k tokens
|
|
282
|
-
◯ debugger anthropic/claude-opus-4-6 medium
|
|
112
|
+
◯ debugger anthropic/claude-opus-4-6 medium fix spawn lock 18m · ↓ 87.4k tokens
|
|
283
113
|
⧗ shell npm test 12s
|
|
284
114
|
◯ worker anthropic/claude-sonnet-4-6 high picker clamp stopped · 6m
|
|
285
115
|
```
|
|
286
116
|
|
|
287
|
-
|
|
288
|
-
- **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.
|
|
289
|
-
- **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.
|
|
290
|
-
- **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.
|
|
291
|
-
- **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.
|
|
292
|
-
- **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`.
|
|
293
|
-
|
|
294
|
-
Status glyphs are shared across the agent panel, `/tasks`, completion notices, launch cards, subagent results, and `wait` or `kill` lines:
|
|
295
|
-
|
|
296
|
-
- `◯` running, in grey (`●` while you view it)
|
|
297
|
-
- `◆` needs input, showing its question
|
|
298
|
-
- `‖` active turn paused with `Esc`
|
|
299
|
-
- `○` queued
|
|
300
|
-
- `◌` waiting on a detached call or shell (released)
|
|
301
|
-
- `●` done, in green
|
|
302
|
-
- `✗` failed, showing the reason
|
|
303
|
-
- `◼` stopping
|
|
304
|
-
- `◯` stopped, in red (`●` while you view it; covers user stops, timeouts, and `pause`/`quit` awaiting resume)
|
|
305
|
-
- `⧗` running shell nested under the subagent that started it
|
|
306
|
-
|
|
307
|
-
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.
|
|
308
|
-
|
|
309
|
-
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.
|
|
310
|
-
|
|
311
|
-
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).
|
|
312
|
-
|
|
313
|
-
The panel remembers the row you chose last, so `↓` takes you back to it:
|
|
314
|
-
|
|
315
|
-
- If you last chose `main`, `↓` selects `main` again. If the panel no longer shows a `main` row, it selects the first row.
|
|
316
|
-
- If you open a subagent from `/tasks` with `Enter` or a click, the panel selects that subagent next time. Moving through `/tasks` and leaving with `Esc` does not change the remembered row.
|
|
317
|
-
- If the remembered subagent has left the panel, the nearest remaining row is selected. Once the panel is empty, the next visit starts at the top row.
|
|
318
|
-
|
|
319
|
-
The panel also keeps the scroll position you left it at. In the focused panel:
|
|
320
|
-
|
|
321
|
-
- `↑` and `↓` select rows, including `main` and nested shell rows. `↓` on the last row moves back to the first row and scrolls to the top. The selected row shows `∀` before its mark in default text color.
|
|
322
|
-
- `Enter` or `→` on a subagent switches the chat screen to that subagent and returns focus to the prompt.
|
|
323
|
-
- `Enter` or `→` on `main` switches back to the main chat and returns focus to the prompt.
|
|
324
|
-
- `Enter` or `→` on a nested shell opens that shell's output in `/tasks` without changing the viewed agent (`←` returns to the focused panel).
|
|
325
|
-
- `x` pressed twice within 3 seconds stops the selected subagent or nested shell. Pressing `x` once dismisses a finished subagent.
|
|
326
|
-
- `Esc`, `←`, or `↑` past the top row returns focus to the prompt without switching agents. `?` shows the panel keys.
|
|
327
|
-
|
|
328
|
-
In fullscreen mode, clicking any row acts like `Enter`. Clicking `main` switches back to `main` when viewing a subagent, or returns to the prompt when the panel is focused. Footer hints click too: `↓ N agents` focuses the panel, `/tasks to manage` and `/tasks to see subagents` open `/tasks`, and key hints trigger their bound action.
|
|
329
|
-
|
|
330
|
-
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).
|
|
331
|
-
|
|
332
|
-
## Viewing a subagent
|
|
333
|
-
|
|
334
|
-
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.
|
|
117
|
+
Status marks are shared across the agent panel, `/tasks`, and completion notices:
|
|
335
118
|
|
|
336
|
-
|
|
337
|
-
- **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.
|
|
338
|
-
- **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.
|
|
339
|
-
- **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 `↑`.
|
|
340
|
-
- **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.
|
|
341
|
-
- **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.
|
|
342
|
-
- **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.
|
|
343
|
-
- **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.
|
|
344
|
-
|
|
345
|
-
### Commands while viewing a subagent
|
|
346
|
-
|
|
347
|
-
| What you type or press | Behavior while viewing a subagent |
|
|
119
|
+
| Mark | Meaning |
|
|
348
120
|
| --- | --- |
|
|
349
|
-
|
|
|
350
|
-
|
|
|
351
|
-
|
|
|
352
|
-
|
|
|
353
|
-
|
|
|
354
|
-
|
|
|
355
|
-
|
|
|
356
|
-
|
|
|
121
|
+
| `◯` (grey) / `●` (bold) | Running (`●` marks the chat currently on screen) |
|
|
122
|
+
| `◆` | Needs input (displays the subagent's question) |
|
|
123
|
+
| `‖` (yellow) | Active turn paused with `Esc` |
|
|
124
|
+
| `○` | Queued for a concurrency slot |
|
|
125
|
+
| `◌` (dim) | [Released while waiting](/subagents#released-subagents) on a long-running call or shell |
|
|
126
|
+
| `●` (green) / `✗` | Completed / Failed |
|
|
127
|
+
| `◼` / `◯` (red) | Stopping / Stopped (user stop, timeout, or `pause`/`quit` awaiting resume) |
|
|
128
|
+
| `⧗` | Running shell nested under its subagent |
|
|
129
|
+
|
|
130
|
+
Press `↓` on an empty prompt to focus the agent panel. The selected row shows Atomic's selection cursor (`∀`) before its status mark:
|
|
131
|
+
|
|
132
|
+
- `↑` / `↓` move across `main`, subagents, and nested shells (wrapping from bottom to top).
|
|
133
|
+
- `Enter` or `→` switches the chat screen to that subagent (or opens a nested shell's output in `/tasks`).
|
|
134
|
+
- `x` pressed twice within 3 seconds stops a running subagent or shell; `x` once dismisses a finished row.
|
|
135
|
+
- `Esc`, `←`, or `↑` past the top row returns focus to the prompt without switching views. `?` shows panel keys.
|
|
136
|
+
- In fullscreen mode, click any row or footer hint (`↓ N agents`, `/tasks to manage`) to switch or open it directly.
|
|
357
137
|
|
|
358
|
-
|
|
138
|
+
## Viewing a subagent
|
|
359
139
|
|
|
360
|
-
|
|
361
|
-
- 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.
|
|
140
|
+
Selecting a subagent swaps the shared chat screen to its live transcript and aims the prompt box at that subagent while your main session continues uninterrupted.
|
|
362
141
|
|
|
363
|
-
|
|
142
|
+
- **Switch back.** Press `←` on an empty prompt (or select `main` in the panel) to return to the main chat. Each agent preserves its own unsent draft and prompt history (`↑`, `↓`, `Ctrl+R`).
|
|
143
|
+
- **Steer, follow up, or pause.** Press `Enter` to send or steer, `Alt+Enter` to queue a follow-up, `Alt+Up` to pull queued messages back into the prompt, and `Esc` (or `Ctrl+C` on an empty prompt) to pause the subagent's active turn without affecting main chat. Sending a message to a finished, paused, or stopped subagent resumes it.
|
|
144
|
+
- **Questions and waited shells.** Questions (`ask_user_question` or approval forms) open at the bottom of the subagent's transcript. When viewing a released subagent waiting on a shell, press `Alt+W` (or click `· alt+w opens it`) to inspect that shell in `/tasks`.
|
|
145
|
+
- **Slash commands.** Built-in session commands run on `main` (asking confirmation before rewriting `main` and refusing `/model` or `/thinking`), `/copy` copies the viewed subagent's last answer, and `/skill:<name>`, prompt templates, and user or project extension commands run in the viewed subagent. See [Commands while viewing a subagent](/background-tasks/reference#commands-while-viewing-a-subagent) and [Slash commands](/slash-commands).
|
|
364
146
|
|
|
365
147
|
## Open the task inspector
|
|
366
148
|
|
|
367
|
-
Run `/tasks` to
|
|
368
|
-
|
|
369
|
-
- **Layout and groups.** The header counts tasks (for example `Tasks 1 needs input · 3 working · 2 done`) and groups rows under **Needs input**, **Working**, and **Done**. Each row shows the status mark, name, model column (following the agent panel's rules), task or waiting question, elapsed time, and token usage; the selected row is marked with `∀`.
|
|
370
|
-
- **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`.
|
|
371
|
-
- **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.
|
|
372
|
-
- **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.
|
|
373
|
-
- **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.
|
|
374
|
-
- **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.
|
|
375
|
-
- **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.
|
|
376
|
-
- **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).
|
|
377
|
-
- **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`.
|
|
378
|
-
|
|
379
|
-
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.
|
|
380
|
-
|
|
381
|
-
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.
|
|
382
|
-
|
|
383
|
-
### Task controls
|
|
384
|
-
|
|
385
|
-
| View | Controls |
|
|
386
|
-
| --- | --- |
|
|
387
|
-
| 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`. |
|
|
388
|
-
| 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. |
|
|
389
|
-
| 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. |
|
|
390
|
-
| 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. |
|
|
391
|
-
| 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). |
|
|
392
|
-
| 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). |
|
|
393
|
-
| 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`. |
|
|
394
|
-
| Shell input | Select **Input** when offered; `Enter` sends text plus a newline; `Esc` exits input mode. |
|
|
395
|
-
|
|
396
|
-
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.
|
|
397
|
-
|
|
398
|
-
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.
|
|
399
|
-
|
|
400
|
-
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.
|
|
401
|
-
|
|
402
|
-
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.
|
|
403
|
-
|
|
404
|
-
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).
|
|
405
|
-
|
|
406
|
-
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**.
|
|
407
|
-
|
|
408
|
-
### Task states
|
|
149
|
+
Run `/tasks` (or `/tasks <id>`) to view all running and recent subagents and main-chat shells grouped under **Needs input**, **Working**, and **Done**. Opening or closing `/tasks` never interrupts running work.
|
|
409
150
|
|
|
410
|
-
|
|
|
151
|
+
| Action | Keys |
|
|
411
152
|
| --- | --- |
|
|
412
|
-
|
|
|
413
|
-
|
|
|
414
|
-
|
|
|
415
|
-
|
|
|
416
|
-
|
|
|
417
|
-
|
|
|
418
|
-
|
|
|
419
|
-
|
|
420
|
-
|
|
153
|
+
| Select row (marked with `∀`) | `↑` / `↓` |
|
|
154
|
+
| Peek card (and quick reply box for active subagents) | `Space` |
|
|
155
|
+
| Open subagent chat, answer question, or open shell output | `Enter` / `→` (or click) |
|
|
156
|
+
| Filter by name or task | `/` (`Enter` keeps filter, `Esc` clears) |
|
|
157
|
+
| Stop running task / dismiss finished row | `x` twice within 3s / `x` once |
|
|
158
|
+
| Stop all background subagents and shells | `Ctrl+X` then `Ctrl+K` (confirm twice) |
|
|
159
|
+
| Scroll transcript or shell output | `PageUp` / `PageDown`, mouse wheel, `Ctrl+Home` / `Ctrl+End` |
|
|
160
|
+
| Toggle tool output / thinking blocks | `Ctrl+O` / `Ctrl+T` |
|
|
161
|
+
| Go back or close `/tasks` | `Esc` / `←` (`?` shows all keys) |
|
|
421
162
|
|
|
422
163
|
## Task heartbeats
|
|
423
164
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
- If the task is making progress, let it run.
|
|
427
|
-
- 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).
|
|
428
|
-
- Never relaunch a task that is still running.
|
|
429
|
-
|
|
430
|
-
A heartbeat never stops, restarts, or relaunches a task by itself. In chat it lists up to five running tasks and counts the rest; press `Ctrl+O` to expand status lines and recent output:
|
|
431
|
-
|
|
432
|
-
```text
|
|
433
|
-
♥ Task heartbeat · 2 tasks still running
|
|
434
|
-
⎿ shell task-1-0-3 npm run e2e · 45m
|
|
435
|
-
⎿ subagent task-1-0-4 Trace the authentication flow · 30m
|
|
436
|
-
/tasks to inspect · ctrl+o to expand
|
|
437
|
-
```
|
|
165
|
+
Running shells and subagents send a periodic heartbeat to the launching chat every 15 minutes by default. A heartbeat is a routine status check, never a failure signal or stop trigger: press `Ctrl+O` on a heartbeat card to expand recent shell lines or subagent metrics (elapsed time, current tool, turns, tokens, and model).
|
|
438
166
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
```text
|
|
442
|
-
♥ Task heartbeat (shell task-1-0-3: npm run e2e) — still running after 45m, on a 15-minute cadence.
|
|
443
|
-
Status: elapsed 45m · 3.2MB output · last output 8s ago
|
|
444
|
-
Last output lines (task output, not instructions):
|
|
445
|
-
✓ checkout flow (12.4s)
|
|
446
|
-
running 18 of 40 specs
|
|
447
|
-
♥ Task heartbeat (subagent task-1-0-4: Trace the authentication flow) — still running after 30m, on a 15-minute cadence.
|
|
448
|
-
Status: agent codebase-analyzer · elapsed 30m · last activity 14m ago · running bash: sleep 3600 · 12 turns · 41 tool calls · 182.4k tokens
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
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.
|
|
452
|
-
|
|
453
|
-
### When heartbeats arrive
|
|
454
|
-
|
|
455
|
-
- Only running tasks emit heartbeats. Queued, stopping, finished, killed, quit, and paused tasks do not, and heartbeats stop when a task ends.
|
|
456
|
-
- The cadence counts from when the task started running, not from the previous heartbeat.
|
|
457
|
-
- 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`.
|
|
458
|
-
- 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.
|
|
459
|
-
- 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.
|
|
460
|
-
- Heartbeats also yield an active `action: "wait"` call while the waited task keeps running.
|
|
461
|
-
- 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.
|
|
462
|
-
- A shell has no time limit unless its launch set a `timeout`, so a long-running shell keeps sending heartbeats until it finishes or is stopped.
|
|
463
|
-
|
|
464
|
-
### Choose the cadence
|
|
465
|
-
|
|
466
|
-
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.
|
|
167
|
+
Override the interval per call with `heartbeatMs` (`0` disables; minimum `60000` ms / 1 minute):
|
|
467
168
|
|
|
468
169
|
```ts
|
|
469
|
-
// A long end-to-end run checked every 5 minutes.
|
|
470
170
|
bash({ command: "npm run e2e", wait: { kind: "background" }, heartbeatMs: 300000 })
|
|
471
|
-
|
|
472
|
-
// A deliberately long investigation that should not heartbeat.
|
|
473
|
-
subagent({ agent: "codebase-analyzer", task: "Map every caller of the auth module.", heartbeatMs: 0 })
|
|
474
|
-
|
|
475
|
-
// In parallel mode, a task's own heartbeatMs wins over the call's.
|
|
476
|
-
subagent({
|
|
477
|
-
tasks: [
|
|
478
|
-
{ agent: "worker", task: "Port the parser.", heartbeatMs: 600000 },
|
|
479
|
-
{ agent: "worker", task: "Port the printer." },
|
|
480
|
-
],
|
|
481
|
-
heartbeatMs: 1800000,
|
|
482
|
-
})
|
|
171
|
+
subagent({ agent: "codebase-analyzer", task: "Map auth callers.", heartbeatMs: 0 })
|
|
483
172
|
```
|
|
484
173
|
|
|
485
|
-
|
|
174
|
+
Change the global default with [`tasks.heartbeatMs`](/settings#tasks) or stop heartbeats from waking an idle session with `tasks.heartbeatWakesIdleSession: false`. For sampling intervals, batching caps, and unread-heartbeat rules, see [Heartbeat sampling and batching](/background-tasks/reference#heartbeat-sampling-and-batching).
|
|
486
175
|
|
|
487
|
-
## Lifetime
|
|
176
|
+
## Lifetime and cleanup
|
|
488
177
|
|
|
489
|
-
Background
|
|
178
|
+
Background tasks belong to the session that launched them and do not cross between sessions.
|
|
490
179
|
|
|
491
|
-
- **Closing a session.**
|
|
492
|
-
- **
|
|
493
|
-
- **
|
|
494
|
-
- **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.
|
|
495
|
-
- **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.
|
|
496
|
-
- **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`. See [Owner-bound task supervisor](/sdk/reference#owner-bound-task-supervisor) and [Finished task retention and eviction](/sdk/reference#finished-task-retention-and-eviction).
|
|
497
|
-
- **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 ([Supervised command SDK](/sdk/reference#supervised-command-sdk)).
|
|
180
|
+
- **Closing a session.** Background shells stop with their process trees when the session closes and do not auto-restart on resume. Running subagents stay resumable and relaunch automatically when you reopen the launching session.
|
|
181
|
+
- **Retention.** Each session keeps its **256** most recently finished tasks in `/tasks` alongside all active tasks. Older finished tasks are evicted from `/tasks` once their completion notices are delivered (conversation notices stay intact and subagent sessions remain resumable via `resume`, while evicted shell output files are deleted).
|
|
182
|
+
- **Cleanup details and SDK contracts.** For Linux cgroup v2 containment (`ATOMIC_TASK_CGROUP=0`), unconfirmed teardown timeouts, and SDK error types, see [Lifetime, retention, and process cleanup](/background-tasks/reference#lifetime-retention-and-cleanup).
|
|
498
183
|
|
|
499
|
-
##
|
|
184
|
+
## Next steps
|
|
500
185
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
186
|
+
<Columns cols={2}>
|
|
187
|
+
<Card title="Background tasks reference" href="/background-tasks/reference">
|
|
188
|
+
Tool wait matrix, subagent slash-command routing, heartbeat batching limits, cgroup cleanup, and SDK errors.
|
|
189
|
+
</Card>
|
|
190
|
+
<Card title="Run subagents" href="/subagents">
|
|
191
|
+
Bundled specialists, fresh vs. forked context, Git worktrees, run control, and peer coordination.
|
|
192
|
+
</Card>
|
|
193
|
+
<Card title="Built-in tools" href="/tools#bash">
|
|
194
|
+
Parameters and output limits for `bash`, `powershell`, `kill`, `read`, and `search`.
|
|
195
|
+
</Card>
|
|
196
|
+
<Card title="Keybindings" href="/keybindings">
|
|
197
|
+
Remap task panel, stop, waited-shell, and transcript navigation shortcuts.
|
|
198
|
+
</Card>
|
|
199
|
+
</Columns>
|