@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/sessions.md
CHANGED
|
@@ -1,50 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Manage sessions"
|
|
3
|
-
sidebarTitle: "
|
|
4
|
-
description: "Resume, search, name, branch, fork, share, and
|
|
3
|
+
sidebarTitle: "Manage sessions"
|
|
4
|
+
description: "Resume, search, name, branch, fork, share, export, and recall conversation sessions in Atomic."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Atomic saves every conversation as an append-only tree in a local SQLite database (`~/.atomic/workflows/journal.sqlite` by default). You can resume past work, jump back to earlier turns, and branch without losing history.
|
|
7
|
+
Atomic saves every conversation as an append-only tree in a local SQLite database (`~/.atomic/workflows/journal.sqlite` by default). You can resume past work, jump back to earlier turns, and branch without losing history.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
<Columns cols={2}>
|
|
10
|
+
<Card title="Worktree snapshots" href="/worktree-snapshots">
|
|
11
|
+
Automatically save and restore Git checkout state alongside session history.
|
|
12
|
+
</Card>
|
|
13
|
+
<Card title="Resume on any machine" href="/guides/resume-on-any-machine">
|
|
14
|
+
Share PostgreSQL storage and rebuild dependencies with environment blueprints.
|
|
15
|
+
</Card>
|
|
16
|
+
<Card title="Compaction and branch summaries" href="/compaction">
|
|
17
|
+
Clear or compact long context windows with [memory compaction](/compaction/memory-compaction) or summarize branches with [branch summaries](/compaction/branch-summaries).
|
|
18
|
+
</Card>
|
|
19
|
+
<Card title="Storage and file format" href="/storage">
|
|
20
|
+
Choose local SQLite, JSONL, or PostgreSQL, or inspect the [session file format](/session-format) and [SDK storage](/sdk/storage).
|
|
21
|
+
</Card>
|
|
22
|
+
</Columns>
|
|
13
23
|
|
|
14
|
-
## Session commands
|
|
24
|
+
## Session commands {#session-commands}
|
|
15
25
|
|
|
16
|
-
Start, resume, fork, or import sessions from the command line:
|
|
26
|
+
Start, resume, fork, export, or import sessions from the command line:
|
|
17
27
|
|
|
18
28
|
```bash
|
|
19
|
-
atomic -c
|
|
20
|
-
atomic -r
|
|
21
|
-
atomic --no-session
|
|
22
|
-
atomic --name "my task"
|
|
23
|
-
atomic --session <id|prefix>
|
|
24
|
-
atomic --session-id <id>
|
|
25
|
-
atomic --fork <id|prefix>
|
|
26
|
-
atomic --import <file>
|
|
29
|
+
atomic -c # Continue the most recent session in this folder
|
|
30
|
+
atomic -r # Open the interactive session picker
|
|
31
|
+
atomic --no-session # Run without saving a resumable session
|
|
32
|
+
atomic --name "my task" # Set a display name at startup
|
|
33
|
+
atomic --session <id|prefix> # Open by exact ID or unique 8-hex UUID prefix
|
|
34
|
+
atomic --session-id <id> # Open this project's session with exact ID, or create it if missing
|
|
35
|
+
atomic --fork <id|prefix> # Fork by exact ID or unique 8-hex UUID prefix
|
|
36
|
+
atomic --import <file> # Import an exported JSONL session into storage
|
|
37
|
+
atomic --export <file> [output] # Convert an exported .jsonl file on disk to HTML
|
|
27
38
|
```
|
|
28
39
|
|
|
29
|
-
Inside an interactive session, use these slash commands:
|
|
40
|
+
Inside an interactive session, use these slash commands (see [Slash commands](/slash-commands) for the complete list):
|
|
30
41
|
|
|
31
42
|
| Command | Action |
|
|
32
43
|
| --- | --- |
|
|
33
44
|
| `/resume [id]` | Open the session picker, or resume directly by exact ID or unique 8-hex UUID prefix |
|
|
34
45
|
| `/new` | Start a fresh session |
|
|
35
|
-
| `/name
|
|
46
|
+
| `/name [name]` | Set the display name, or show the current name when run with no arguments (prints usage if unnamed) |
|
|
36
47
|
| `/session [snapshot]` | Show session ID, message counts, tokens, and cost; pass `snapshot` to inspect worktree snapshots and diff them against the current tree |
|
|
37
48
|
| `/tree` | Navigate and branch inside the session tree |
|
|
38
49
|
| `/fork` | Copy history up to a chosen user message into a new session |
|
|
39
50
|
| `/clone` | Duplicate the active branch into a new session |
|
|
40
|
-
| `/compact [instructions]` | Clear context, or compact with
|
|
41
|
-
| `/export [file]` | Export to HTML by default, or export the **active branch** to a
|
|
42
|
-
| `/import <file>` | Import and resume a session from a
|
|
43
|
-
| `/share` | Export the session as `session.jsonl` and upload it as a secret GitHub gist (`gh gist create --public=false`). Requires the GitHub CLI (`gh`) installed and logged in (`gh auth login`). Omits worktree snapshot blobs and
|
|
51
|
+
| `/compact [instructions]` | Clear context, or compact with a configured compactor model; see [Context and compaction](/compaction) |
|
|
52
|
+
| `/export [file]` | Export to HTML by default, or export the **active branch** to a `.jsonl` file (with inline worktree snapshots) when the path ends in `.jsonl` (case-insensitive). Wrap paths containing spaces in matching `'...'` or `"..."` quotes. Use `atomic storage export` for full multi-branch backups. |
|
|
53
|
+
| `/import <file>` | Import and resume a session from a JSONL export |
|
|
54
|
+
| `/share` | Export the session as `session.jsonl` and upload it as a secret GitHub gist (`gh gist create --public=false`). Requires the GitHub CLI (`gh`) installed and logged in (`gh auth login`). Omits worktree snapshot blobs and large tool-output blobs, and cancels if you switch sessions during upload. |
|
|
44
55
|
|
|
45
|
-
## Resuming and deleting sessions
|
|
56
|
+
## Resuming and deleting sessions {#resuming-and-deleting-sessions}
|
|
46
57
|
|
|
47
|
-
Run `/resume` or `atomic -r` to open the **Resume** picker
|
|
58
|
+
Run `/resume` or `atomic -r` to open the **Resume** picker, or pass an exact session ID or unique 8-hex UUID prefix to jump straight in.
|
|
48
59
|
|
|
49
60
|
Every session binds to its original working directory so tools, `@path` references, and project settings resolve there:
|
|
50
61
|
|
|
@@ -54,20 +65,20 @@ Every session binds to its original working directory so tools, `@path` referenc
|
|
|
54
65
|
| `--resume` (`-r`), `/resume`, `--session` | Session's recorded directory |
|
|
55
66
|
| `--fork`, or choosing to fork a cross-directory `--session` | Current directory (new session) |
|
|
56
67
|
|
|
57
|
-
- **Session IDs and prefix matching.** `--session` and `--fork` check for an exact, case-sensitive session ID match first. If none matches, an 8-character hexadecimal prefix (case-insensitive, such as `019f6a2e`) matches UUID-backed sessions only, never custom non-UUID IDs. Atomic checks the current project first, then all projects, and lists matching sessions on a collision. Any other hex-and-hyphen fragment (such as 6 or 12 characters, or `019f6a2e-1234`) is rejected as malformed
|
|
58
|
-
- **Custom IDs and flag conflicts.** `--session-id <id>`
|
|
59
|
-
- **Snapshots on resume.** When a session recorded [worktree snapshots](/worktree-snapshots), `atomic --session <id>` from another directory reopens it directly
|
|
60
|
-
- **Missing working directory.** When a session's directory no longer exists, interactive
|
|
61
|
-
- **Fast resume
|
|
68
|
+
- **Session IDs and prefix matching.** `--session` and `--fork` check for an exact, case-sensitive session ID match first. If none matches, an 8-character hexadecimal prefix (case-insensitive, such as `019f6a2e`) matches UUID-backed sessions only, never custom non-UUID IDs. Atomic checks the current project first, then all projects, and lists matching sessions on a collision. Any other hex-and-hyphen fragment (such as 6 or 12 characters, or `019f6a2e-1234`) is rejected as malformed.
|
|
69
|
+
- **Custom IDs and flag conflicts.** `--session-id <id>` opens an existing project-local session with that exact ID in the current directory, or creates a new one (printing a notice on stderr) if none exists. IDs use ASCII letters, digits, `.`, `_`, and `-`, starting and ending with a letter or digit. Combining `--fork` with `--session-id <id>` names the new forked session and fails if that ID already exists. `--fork` cannot be combined with `--session`, `--continue`, `--resume`, or `--no-session`; `--session-id` cannot be combined with `--session`, `--continue`, or `--resume`; `--import` cannot be combined with `--session`, `--fork`, `--session-id`, `--continue`, or `--resume` (combining `--import` with `--no-session` inspects the file without saving it). Conflicting flags exit with code `1`.
|
|
70
|
+
- **Snapshots on resume.** When a session recorded [worktree snapshots](/worktree-snapshots), `atomic --session <id>` from another directory reopens it directly—reusing a matching local checkout or restoring files into `~/.atomic/agent/worktree-snapshots/` with a one-line notice. Inspect snapshots with `/session snapshot` ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
|
|
71
|
+
- **Missing working directory.** When a session's recorded directory no longer exists, interactive `/resume` offers **Continue** (run in the current directory without overwriting the saved path), **Fork** (copy into the current directory as a new session), or **Cancel**. At CLI startup in interactive mode, choose **Fork** instead of **Continue** (or reopen through `/resume`). Non-interactive modes (`-p`, RPC) and programmatic session switches fail with a missing-directory error rather than prompting.
|
|
72
|
+
- **Fast resume.** Compacted sessions open from the latest compaction boundary instead of loading the entire history upfront. Commands that inspect earlier entries (`/tree`, `/fork`, `/clone`, `/export`, `/share`, and `/session`) page older history on demand. `/session` shows totals immediately and fills in per-model cost and cache stats once that scan finishes. Slow resumes or sessions with 100,000 or more entries print step timings before opening the TUI.
|
|
62
73
|
- **Draft preservation.** Text typed before a startup picker or prompt appears waits as a draft without confirming pickers or `Fork this session? [y/N]`.
|
|
63
|
-
- **Tool restoration.** Plain resume restores the session's recorded tool selection along with newly available extension tools.
|
|
74
|
+
- **Tool restoration.** Plain resume restores the session's recorded tool selection along with newly available extension tools. Explicitly disabled tools stay off, `--tools +name,-name` adjusts the restored set, and previously used tools that are no longer installed appear under **Missing** in `/tools`.
|
|
64
75
|
|
|
65
76
|
### Interrupted work on resume
|
|
66
77
|
|
|
67
78
|
When you reopen an interactive session (`--session`, `-c`, `-r`, or `/resume`) after an abrupt exit or session switch, the transcript renders first and recovery runs visibly:
|
|
68
79
|
|
|
69
80
|
- Running background subagents relaunch and reconnect to Intercom. Paused, quit, completed, and failed children stay as they were, and forked sessions never relaunch original children (see [Run control](/subagents#run-control)).
|
|
70
|
-
- Undelivered user or peer messages replay in a turn (`Replaying N interrupted deliveries`). Messages from gone peers post one notice without starting a turn. Messages that cannot deliver
|
|
81
|
+
- Undelivered user or peer messages replay in a turn (`Replaying N interrupted deliveries`). Messages from gone peers post one notice without starting a turn. Messages that cannot deliver yet wait until the next resume.
|
|
71
82
|
- Unseen background task results render as cards without starting a turn, followed by a recovery summary line.
|
|
72
83
|
- Non-interactive runs (`atomic -p`) leave interrupted work pending until the next interactive resume.
|
|
73
84
|
|
|
@@ -77,17 +88,11 @@ Each row in the **Resume** picker shows the session name or first message, age,
|
|
|
77
88
|
|
|
78
89
|
Type to filter sessions using three query modes:
|
|
79
90
|
|
|
80
|
-
- **Word tokens (default).** Space-separated words match with logical AND (case-insensitive). Each word checks for a literal substring match
|
|
81
|
-
- **Exact phrases.** Wrap
|
|
91
|
+
- **Word tokens (default).** Space-separated words match with logical AND (case-insensitive). Each word checks for a literal substring match across name, title, ID, detail, summary, message text, and folder, falling back to fuzzy matching across metadata fields only (never message bodies or IDs).
|
|
92
|
+
- **Exact phrases.** Wrap words in double quotes (`"auth token refresh"`) for case-insensitive phrase matching with normalized whitespace. An unclosed quote falls back to word tokens.
|
|
82
93
|
- **Regular expressions.** Prefix a query with `re:` (such as `re:error\s+50[23]`) for case-insensitive JavaScript regex matching. An invalid regex returns no matches.
|
|
83
94
|
|
|
84
|
-
Press `Ctrl+S` to cycle
|
|
85
|
-
|
|
86
|
-
- **Threaded (default).** Groups forked sessions under their parent session, ordered by most recent activity.
|
|
87
|
-
- **Recent.** Flat list ordered by most recent modification time.
|
|
88
|
-
- **Relevance.** Ranked by match quality (name matches first, then text matches, then fuzzy matches), tie-broken by modification time.
|
|
89
|
-
|
|
90
|
-
Bottom hints display active shortcuts (`space preview · enter resume · type to search · esc cancel`, plus `? keys` or `f1 keys` while searching):
|
|
95
|
+
Press `Ctrl+S` to cycle sort modes: **Threaded** (default; groups forks under their parent by recent activity), **Recent** (flat list by modification time), and **Relevance** (name matches, then text matches, then fuzzy matches).
|
|
91
96
|
|
|
92
97
|
| Key | Action |
|
|
93
98
|
| --- | --- |
|
|
@@ -96,46 +101,42 @@ Bottom hints display active shortcuts (`space preview · enter resume · type to
|
|
|
96
101
|
| Type / `Esc` | Filter list or clear search; a second `Esc` closes the picker |
|
|
97
102
|
| `Space` | Toggle preview when search is empty |
|
|
98
103
|
| `Tab` | Toggle current folder vs. all folders |
|
|
99
|
-
| `Ctrl+P` / `Ctrl+S` / `Ctrl+N` | Toggle paths, sort mode
|
|
100
|
-
| `Ctrl+R` | Rename session |
|
|
104
|
+
| `Ctrl+P` / `Ctrl+S` / `Ctrl+N` | Toggle paths, sort mode, or named-only filter |
|
|
105
|
+
| `Ctrl+R` | Rename session (submit empty to clear the display name) |
|
|
101
106
|
| `Ctrl+D`, then `Enter` | Delete session with confirmation (`trash` CLI for JSONL when available, record delete for database stores; the active session cannot be deleted) |
|
|
102
107
|
| `Ctrl+Backspace` | Delete selected session when the search box is empty |
|
|
103
108
|
| `Ctrl+C` | Close picker from any state |
|
|
104
109
|
|
|
105
110
|
### Session summaries
|
|
106
111
|
|
|
107
|
-
Once the agent goes idle, Atomic generates a one-line
|
|
108
|
-
|
|
109
|
-
Summary generation feeds up to 4,000 tokens of recent conversation, caps the stored line at 160 characters (truncated with `...`), counts toward session usage, cancels on new input or exit, and retires on a later branch summary. Disable summaries with `"sessionSummary": { "enabled": false }`.
|
|
112
|
+
Once the agent goes idle, Atomic generates a one-line summary using the session's active model. Summaries run for saved interactive and RPC sessions and skip `--no-session`, `-p`, JSON mode, internal sessions, and sessions with fewer than 4 entries on the active branch.
|
|
110
113
|
|
|
111
|
-
|
|
114
|
+
Summary generation feeds up to 4,000 tokens of recent conversation, caps the stored line at 160 characters (truncated with `…`), counts toward session usage, cancels on new input or exit, and retires on a later branch summary. Disable summaries with `"sessionSummary": { "enabled": false }`.
|
|
112
115
|
|
|
113
|
-
|
|
116
|
+
### Internal and subagent sessions
|
|
114
117
|
|
|
115
|
-
|
|
118
|
+
Sessions marked **internal** are hidden from `/resume`, `atomic -r`, `-c`, and `history://sessions`, while remaining openable by exact session ID. Every subagent's own session is internal—whether fresh or forked (`context: "fork"`).
|
|
116
119
|
|
|
117
|
-
A subagent's session always lives in the same session store as the session that launched it
|
|
120
|
+
A subagent's session always lives in the same session store as the session that launched it, regardless of the subagent's working directory or worktree:
|
|
118
121
|
|
|
119
|
-
- `history://sessions/<id>` reads a subagent's session from any session
|
|
120
|
-
- `/tasks` and `subagent({ action: "status" })` read
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
When an 8-character ID prefix passed to `--session` or `--fork` matches both a listed session and internal sessions (such as subagent sessions created around the same time), Atomic selects the listed session.
|
|
122
|
+
- `history://sessions/<id>` reads a subagent's session from any session sharing that store, including after resuming on another machine. Add `?project=<dir>` if the subagent ran in another directory.
|
|
123
|
+
- `/tasks` and `subagent({ action: "status" })` read transcripts from the launching session's store.
|
|
124
|
+
- When an 8-character ID prefix passed to `--session` or `--fork` matches both a regular session and internal sessions, Atomic selects the regular session.
|
|
124
125
|
|
|
125
126
|
## Naming sessions
|
|
126
127
|
|
|
127
|
-
Set a display name interactively with `/name <name
|
|
128
|
+
Set a display name interactively with `/name <name>`, inspect the current name with bare `/name`, or set one at startup with `--name` / `-n`:
|
|
128
129
|
|
|
129
130
|
```bash
|
|
130
131
|
atomic --name "Refactor auth module"
|
|
131
132
|
atomic --name "CI audit" -p "Review this build failure"
|
|
132
133
|
```
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
To clear a display name interactively, press `Ctrl+R` on the session in `/resume` and submit an empty name.
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
## Branching with `/tree` {#branching-with-tree}
|
|
137
138
|
|
|
138
|
-
|
|
139
|
+
Every session entry links to its parent, forming a tree. Run `/tree` to jump to any earlier turn and explore a different direction without losing the original path:
|
|
139
140
|
|
|
140
141
|
```text
|
|
141
142
|
├─ user: "Hello, can you help..."
|
|
@@ -147,9 +148,7 @@ Every session entry carries `id` and `parentId`. Run `/tree` to jump to any earl
|
|
|
147
148
|
│ └─ assistant: "For approach B..."
|
|
148
149
|
```
|
|
149
150
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Type anywhere in `/tree` to filter entries through the inline search bar.
|
|
151
|
+
Type anywhere in `/tree` to filter entries through the inline search bar:
|
|
153
152
|
|
|
154
153
|
| Key | Action |
|
|
155
154
|
| --- | --- |
|
|
@@ -157,15 +156,13 @@ Type anywhere in `/tree` to filter entries through the inline search bar.
|
|
|
157
156
|
| `←` / `→` | Page up or down |
|
|
158
157
|
| `Ctrl+←` / `Ctrl+→` or `Alt+←` / `Alt+→` | Fold, unfold, or jump between branches |
|
|
159
158
|
| `Shift+L` / `Shift+T` | Set or clear a bookmark label, or toggle label timestamps |
|
|
160
|
-
| `Ctrl+O` / `Shift+Ctrl+O` | Cycle filter
|
|
159
|
+
| `Ctrl+O` / `Shift+Ctrl+O` | Cycle filter (`default`, `no-tools`, `user-only`, `labeled-only`, `all`; default set by `treeFilterMode`) |
|
|
161
160
|
| `Ctrl+D` / `Ctrl+T` / `Ctrl+U` / `Ctrl+L` / `Ctrl+A` | Jump directly to `default`, `no-tools`, `user-only`, `labeled-only`, or `all` filter |
|
|
162
161
|
| `Enter` / `Esc` | Select entry or cancel |
|
|
163
162
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- **User or custom message.** Moves the active leaf to its parent and loads its text into the editor so you can edit and branch. Selecting the root user message resets to an empty conversation with that prompt.
|
|
163
|
+
- **User or extension message.** Moves the active leaf to its parent and loads its text into the editor so you can edit and branch. Selecting the root user message resets to an empty conversation with that prompt.
|
|
167
164
|
- **Assistant, tool, or compaction entry.** Moves the active leaf to that entry with an empty editor to continue from there.
|
|
168
|
-
- Navigation
|
|
165
|
+
- Navigation saves immediately, so quitting or resuming stays on the chosen branch. Pressing `Esc` during branch-summary generation cancels it and reopens `/tree`.
|
|
169
166
|
|
|
170
167
|
## Compare `/tree`, `/fork`, and `/clone` {#tree-fork-and-clone}
|
|
171
168
|
|
|
@@ -176,154 +173,53 @@ Type anywhere in `/tree` to filter entries through the inline search bar.
|
|
|
176
173
|
| Typical use | Explore alternatives in place | Branch from an earlier prompt | Duplicate current path before continuing |
|
|
177
174
|
| Summary | Optional branch summary | None | None |
|
|
178
175
|
|
|
179
|
-
`/fork` and `/clone` start a new session from the active path, including its worktree snapshots. `atomic --fork <id
|
|
180
|
-
|
|
181
|
-
A fork into another store, such as an SDK `forkTo()` that names a different store, carries only the current context, without retired turns or private task records. Reopening it shows `Parent history is in its original store or is no longer available.` To move every branch of a session to another store, use `atomic storage export` and `atomic storage import`.
|
|
176
|
+
`/fork` and `/clone` start a new session from the active path, including its worktree snapshots. `atomic --fork <id>` and choosing **Fork** for a missing directory copy every branch in the same store. Forking across different stores carries only the current context window; to move every branch between stores, use `atomic storage export` and `atomic storage import`.
|
|
182
177
|
|
|
183
178
|
### Shared-history forks {#forks-share-history}
|
|
184
179
|
|
|
185
|
-
In
|
|
180
|
+
In SQLite and PostgreSQL stores, a fork shares its prior history with the original session instead of copying every row, so forking a long session is as fast as forking a short one. The fork still behaves like an independent copy: later edits to or deletion of the original never affect the fork, and exports always write full copies. JSONL and in-memory stores always copy. See [Shared-history forks](/storage#shared-history-forks).
|
|
186
181
|
|
|
187
182
|
## Branch summaries
|
|
188
183
|
|
|
189
|
-
When `/tree` switches away from a branch, Atomic can optionally summarize the abandoned branch
|
|
184
|
+
When `/tree` switches away from a branch, Atomic can optionally summarize the abandoned branch (no summary, default summary, or custom focus instructions). Set `"branchSummary": { "skipPrompt": true }` to skip the prompt and default to no summary. See [Branch summaries](/compaction/branch-summaries).
|
|
190
185
|
|
|
191
|
-
## Recalling earlier work
|
|
186
|
+
## Recalling earlier work {#recalling-earlier-work}
|
|
192
187
|
|
|
193
|
-
|
|
188
|
+
From any session or subagent, the agent can read and search past project sessions using read-only `history://` URLs across SQLite, PostgreSQL, JSONL, memory, and custom stores:
|
|
194
189
|
|
|
195
190
|
| URL | What it returns |
|
|
196
191
|
| --- | --- |
|
|
197
|
-
| `history://` | Overview of
|
|
198
|
-
| `history://sessions` | Recent project
|
|
199
|
-
| `history://sessions/<id>` | Full transcript, or
|
|
200
|
-
| `history://sessions/<id>:N-M` | 1-based **entry** ranges
|
|
201
|
-
|
|
202
|
-
Concrete examples:
|
|
203
|
-
|
|
204
|
-
```ts
|
|
205
|
-
// List the newest 25 sessions for this project (or page further).
|
|
206
|
-
read({ path: "history://sessions" })
|
|
207
|
-
read({ path: "history://sessions?limit=50&offset=25" })
|
|
208
|
-
read({ path: "history://sessions?project=all" })
|
|
209
|
-
|
|
210
|
-
// Read an outline or a specific 1-based entry range of one session.
|
|
211
|
-
read({ path: "history://sessions/019f6a2e-..." })
|
|
212
|
-
read({ path: "history://sessions/019f6a2e-...:40-90" })
|
|
213
|
-
read({ path: "history://sessions/019f6a2e-...:40+25:raw" })
|
|
214
|
-
|
|
215
|
-
// Search across recent project sessions, or inside one specific session.
|
|
216
|
-
search({ pattern: "connection refused", paths: "history://sessions" })
|
|
217
|
-
search({ pattern: "retry.*backoff", paths: "history://sessions/019f6a2e-...", i: true })
|
|
218
|
-
```
|
|
192
|
+
| `history://` | Overview of history sources (when read), or searches recent project sessions (when searched) |
|
|
193
|
+
| `history://sessions` | Recent sessions for this project, newest first (`?limit=N` up to 200, default 25; `?offset=N`; add `?project=all` or `?project=<dir>` only when checking other projects) |
|
|
194
|
+
| `history://sessions/<id>` | Full transcript, or a structured outline with `:N-M` entry ranges for large sessions (over 2,000 entries, oversized bodies, or cold JSONL files) |
|
|
195
|
+
| `history://sessions/<id>:N-M` | 1-based **entry** ranges: `:N`, `:N-M`, `:N+C`, or comma-separated ranges like `:1-20,90-120` (append `:raw` to omit the header) |
|
|
219
196
|
|
|
220
|
-
- **
|
|
221
|
-
- **
|
|
222
|
-
- **
|
|
197
|
+
- **Project isolation.** Reading or searching a session ID from another project fails with a project-isolation error unless `?project=<dir>` or `?project=all` is passed explicitly.
|
|
198
|
+
- **What is indexed and omitted.** History search scans the newest 25 sessions per page, excludes the current session unless targeted by its own ID URL (`history://sessions/<current-id>`), and caps output at 10 matches per session. It omits non-conversation metadata—thinking blocks, system/model/thinking-level changes, usage records, labels, context edits, internal extension state, and worktree snapshots. After compaction, the boundary message gives the exact session URL and range to recover earlier details ([Memory compaction](/compaction/memory-compaction)).
|
|
199
|
+
- **Output caps and continuations.** Every `history://` call caps output at 40,000 bytes and scans at most 250,000 entries, stopping cleanly with a `continue with` URL when either limit is hit (multi-session list continuations expire after 60 seconds). Multi-line regex patterns match across up to 16,384 characters or 256 entries.
|
|
200
|
+
- **Offline SQLite search.** To run a read-only regex search against a local SQLite session file from the shell without taking writer locks, run `atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]` (see [CLI reference](/reference/cli#storage-and-intercom-commands)).
|
|
223
201
|
|
|
224
202
|
### Slow history searches {#slow-history-searches}
|
|
225
203
|
|
|
226
|
-
|
|
204
|
+
When a `history://` read or search takes longer than 10 seconds (for example against a large or remote PostgreSQL database), Atomic automatically continues it in the background and shows a live status line such as `Search(history-3) · continues in background`, delivering the result as a completion notice when done.
|
|
227
205
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
3. **Deliver the result as a completion notice.** When the background scan finishes, its result arrives in the chat as a completion notice.
|
|
206
|
+
- **No time limit.** Background history tasks run until they finish, hit the 40,000-byte output cap or 250,000-entry scan cap (returning a `continue with` URL), are stopped, or the session closes or reloads.
|
|
207
|
+
- **Separate concurrency pool.** A session runs up to **4** active history reads and searches at once (separate from the 64 background shell commands), and keeps the 16 most recently finished history results available for late waits.
|
|
231
208
|
|
|
232
|
-
|
|
209
|
+
For tool `wait` options, `kill({ id })`, and how background history searches compare to background shells, see [Background history searches](/background-tasks#background-history-searches) and [Background tasks reference](/background-tasks/reference).
|
|
233
210
|
|
|
234
|
-
|
|
211
|
+
## Session storage {#session-storage}
|
|
235
212
|
|
|
236
|
-
|
|
237
|
-
History search is still running (task history-3). It has no time limit: it runs until it finishes, kill stops it, or this session ends. The result arrives as a completion notice; if it is too long, it ends with a "continue with" URL as usual. Wait for it with search({ action: "wait", id: "history-3" }) or stop it with kill({ id: "history-3" }). Never repeat the call to get its result.
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
When the task finishes, a completion line appears in chat:
|
|
241
|
-
|
|
242
|
-
```text
|
|
243
|
-
● History search "/ERR_/ in history://sessions" completed · 12s
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
#### Controlling wait time, checking progress, and stopping
|
|
247
|
-
|
|
248
|
-
Both `read` and `search` accept the same `wait` parameter and the same `{ action: "wait", id, budgetMs? }` wait mode as `bash` and `powershell`:
|
|
213
|
+
Atomic saves sessions automatically in `~/.atomic/workflows/journal.sqlite` by default. See [Storage](/storage) to switch backends, share PostgreSQL across machines, or migrate sessions between stores.
|
|
249
214
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
| `wait: { kind: "foreground", budgetMs: 30000 }` | Waits up to `budgetMs` milliseconds (finite, non-negative; `0` checks immediately), then continues in the background if still running. |
|
|
255
|
-
| `{ action: "wait", id: "history-3" }` | Observes an existing history task for up to the default observation budget (10 seconds). Cannot be combined with `path`, `pattern`, `paths`, `wait`, or other call fields. |
|
|
256
|
-
| `{ action: "wait", id: "history-3", budgetMs: 5000 }` | Observes an existing history task for up to `budgetMs` milliseconds (`0` returns immediately with the result if finished, or the still-running status). |
|
|
257
|
-
| `kill({ id: "history-3" })` | Stops the background history scan immediately and sends no completion notice. |
|
|
258
|
-
|
|
259
|
-
Examples for both `search` and `read`:
|
|
260
|
-
|
|
261
|
-
```ts
|
|
262
|
-
// Start in the background right away.
|
|
263
|
-
search({ pattern: "ERR_", paths: "history://sessions", wait: { kind: "background" } })
|
|
264
|
-
read({ path: "history://sessions/019f6a2e-...:1-500", wait: { kind: "background" } })
|
|
265
|
-
|
|
266
|
-
// Wait up to 60 seconds inline before moving to the background.
|
|
267
|
-
search({ pattern: "ERR_", paths: "history://sessions", wait: { kind: "foreground", budgetMs: 60000 } })
|
|
268
|
-
read({ path: "history://sessions/019f6a2e-...", wait: { kind: "foreground", budgetMs: 60000 } })
|
|
269
|
-
|
|
270
|
-
// Wait up to 30 more seconds for a running task's result (or poll immediately with budgetMs: 0).
|
|
271
|
-
search({ action: "wait", id: "history-3", budgetMs: 30000 })
|
|
272
|
-
read({ action: "wait", id: "history-4", budgetMs: 0 })
|
|
273
|
-
|
|
274
|
-
// Stop a running history task.
|
|
275
|
-
kill({ id: "history-3" })
|
|
276
|
-
```
|
|
215
|
+
- **Sessions from older releases.** With the default SQLite store, legacy JSONL sessions in `~/.atomic/agent/sessions` still appear in `/resume` and `--continue`. Opening one imports a copy into SQLite and leaves the original file untouched.
|
|
216
|
+
- **Project settings.** A project's storage settings take effect once you [trust the project](/security). New sessions use the project store, while resumed sessions remain in the store they came from.
|
|
217
|
+
- **Importing a file.** `--import <file>` or `/import <file>` imports a JSONL export with its inline [worktree snapshots](/worktree-snapshots), upgrades older formats automatically, and refuses duplicate session IDs.
|
|
218
|
+
- **Temporary runs (`--no-session`).** Nothing is written to a resumable store. If Atomic releases an idle subagent from memory during a `--no-session` run, its history is kept in a temporary file deleted on exit.
|
|
277
219
|
|
|
278
|
-
|
|
220
|
+
### Choosing a store {#choosing-a-store}
|
|
279
221
|
|
|
280
|
-
|
|
281
|
-
- **Late waits still work.** Atomic keeps the 16 most recently finished history tasks in the session so a late `{ action: "wait", id }` call still returns the result (both `read` and `search` can wait on any `history-N` task from the same session). Older evicted or unknown IDs fail with `Unknown history task <id>`.
|
|
282
|
-
- **At most 4 active at once.** A session runs up to 4 active history reads and searches at once (counting both background tasks and calls currently being observed in the foreground). They run inside Atomic on the session's store and a shared regex worker, so more at once would only slow each other down. This limit is separate from the 64 shell commands a session can run. A fifth concurrent call is refused immediately with:
|
|
283
|
-
|
|
284
|
-
```text
|
|
285
|
-
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.
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
- **How they mirror — and differ from — background shells:**
|
|
289
|
-
|
|
290
|
-
| Capability | `bash` / `powershell` tasks | `read` / `search` `history://` tasks |
|
|
291
|
-
| --- | --- | --- |
|
|
292
|
-
| Default foreground wait | 10 seconds | 10 seconds |
|
|
293
|
-
| `wait` options | `{ kind: "background" }`, `{ kind: "foreground", budgetMs? }` | `{ kind: "background" }`, `{ kind: "foreground", budgetMs? }` |
|
|
294
|
-
| Observe existing task | `{ action: "wait", id, budgetMs? }` | `{ action: "wait", id, budgetMs? }` |
|
|
295
|
-
| Stop running task | `kill({ id })` | `kill({ id })` |
|
|
296
|
-
| Execution time limit | None unless `timeout` (seconds) is set | None (no `timeout` parameter; stops at 40,000-byte or 250,000-entry cap with a `continue with` URL) |
|
|
297
|
-
| Concurrency limit per session | 64 commands | 4 history reads/searches (separate pool) |
|
|
298
|
-
| Heartbeats and `/tasks` panel | Heartbeats every 15m; shown in `/tasks` | No heartbeats; not listed in `/tasks` |
|
|
299
|
-
| On session close or reload | Stopped; not restarted on resume | Stopped without notices; not restarted on resume |
|
|
300
|
-
|
|
301
|
-
### Searching a stored session in the background
|
|
302
|
-
|
|
303
|
-
Run a read-only CLI search against an existing, unprefixed local SQLite session file without creating indexes, updating indexes, or taking writer locks:
|
|
304
|
-
|
|
305
|
-
```bash
|
|
306
|
-
atomic storage search-session ./sessions.sqlite my-session 'connection refused'
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
The full command syntax is `atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]`. The command requires an existing local SQLite file (it refuses `:memory:`, URLs, and UNC paths). Session IDs must use ASCII `[A-Za-z0-9_-]` (periods `.` are not accepted here, unlike `--session-id`), and an optional numeric cursor such as `6` or `6.2` resumes an earlier scan.
|
|
310
|
-
|
|
311
|
-
This command writes no `-wal` or `-shm` files on cleanly closed databases and stops cleanly if the session's write revision changes mid-scan. Agents can also run it through `bash` with `wait: { kind: "background" }` and monitor it with `bash({ action: "wait", id })` or cancel it with `kill({ id })`. For JSONL, memory, remote stores, or multi-session listings, use `read` and `search` on `history://`.
|
|
312
|
-
|
|
313
|
-
## Session storage
|
|
314
|
-
|
|
315
|
-
Atomic saves sessions as you go, by default in a local SQLite file, `~/.atomic/workflows/journal.sqlite`. [Storage](/storage) covers every store, sharing sessions between machines, and moving sessions between stores.
|
|
316
|
-
|
|
317
|
-
- **Sessions from older releases.** With the default store, JSONL sessions from earlier releases in `~/.atomic/agent/sessions` still appear in `/resume` and `--continue`. Opening one imports a copy into SQLite and leaves the original file unchanged. If a sync tool left conflicting copies of a file, the newest message wins. An unopened file over 32 KiB shows an estimated summary until you open it. With any other store, only that store's sessions appear.
|
|
318
|
-
- **Project settings.** A project's storage settings apply once you [trust the project](/security). New conversations then use the project's store, while resumed conversations stay in the store they came from. To reopen a session in a store that is not your default, keep the flags Atomic prints, for example `atomic --session-store "/data/project A/sessions.sqlite" --session-prefix project_ --session <id>`.
|
|
319
|
-
- **Importing a file.** `--import <file>` or `/import <file>` imports a JSONL export as it is, including the [worktree snapshots](/worktree-snapshots) that `/export <file>.jsonl` wrote. It upgrades older formats, and fails with `SessionExistsError` if the store already has a session with that ID. A session imported with an empty ID reopens with `atomic --session ""` or from the picker.
|
|
320
|
-
- **Nothing saved (`--no-session`).** Nothing goes to a store you can resume from. If Atomic unloads an idle subagent from memory in this mode, it keeps the subagent's history in a private temporary file in your agent directory, and deletes it on exit. A later start on the same machine removes files left by a crash. See [Releasing idle sessions](/sdk#releasing-idle-sessions).
|
|
321
|
-
- **Forks share history.** See [Shared-history forks](#forks-share-history).
|
|
322
|
-
- **Session stats (`/session`).** Shows the session ID, message count, tokens, and cost. The counts update after each completed message.
|
|
323
|
-
|
|
324
|
-
### Choosing a store
|
|
325
|
-
|
|
326
|
-
Set `sessions.storage` to choose a store for sessions only, or top-level `storage` to choose one for sessions and Intercom together. For example, in `settings.json`:
|
|
222
|
+
Set `sessions.storage` for sessions only, or top-level `storage` for sessions and Intercom together, in `settings.json`:
|
|
327
223
|
|
|
328
224
|
```json
|
|
329
225
|
{
|
|
@@ -335,27 +231,16 @@ Set `sessions.storage` to choose a store for sessions only, or top-level `storag
|
|
|
335
231
|
|
|
336
232
|
| Value | Store |
|
|
337
233
|
| --- | --- |
|
|
338
|
-
| `{ "path": "sessions.sqlite" }` | A [local SQLite](/storage/sqlite) file
|
|
339
|
-
| `{ "dir": "sessions" }` | A [JSONL directory](/storage/jsonl)
|
|
340
|
-
| `{ "memory": true }` | Memory only
|
|
341
|
-
| `{}` | The default SQLite file.
|
|
342
|
-
| `{ "adapter": "...", "options": {}, "secrets": {} }` |
|
|
234
|
+
| `{ "path": "sessions.sqlite" }` | A [local SQLite](/storage/sqlite) file |
|
|
235
|
+
| `{ "dir": "sessions" }` | A [JSONL directory](/storage/jsonl) (valid in `sessions.storage` and `ATOMIC_SESSIONS_STORAGE` only) |
|
|
236
|
+
| `{ "memory": true }` | Memory only (lost on exit) |
|
|
237
|
+
| `{}` | The default SQLite file (`~/.atomic/storage.sqlite` in top-level `storage`) |
|
|
238
|
+
| `{ "adapter": "...", "options": {}, "secrets": {} }` | [PostgreSQL](/storage/postgres) or a [custom adapter](/storage/custom-adapters#selecting-an-adapter) |
|
|
343
239
|
|
|
344
|
-
A selection replaces any lower one as a whole object
|
|
240
|
+
A higher-precedence selection replaces any lower one as a whole object without merging fields (see [Which selection wins](/storage#which-selection-wins)). Relative paths in settings resolve against the [storage home](/storage#storage-home), whereas relative paths in `--session-dir`, `--session-store`, and `ATOMIC_CODING_AGENT_SESSION_DIR` resolve against the current directory.
|
|
345
241
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
-
|
|
349
|
-
- A non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` cannot be combined with `ATOMIC_SESSIONS_STORAGE`, `--storage`, or `--storage-file`. Startup fails with `StorageConfigError` and reason `conflicting-overrides`.
|
|
350
|
-
- `--session-prefix` works only with `--session-store`, for a local SQLite file. The prefix must match `[A-Za-z_][A-Za-z0-9_]*` and must not start with `sqlite_` in any letter case. For a shared database, set `prefix` in the `storage` setting, or pass `atomic storage join --prefix`. PostgreSQL prefixes must also be lowercase and at most 24 characters.
|
|
351
|
-
- Invalid storage flags stop the CLI with `Error: ...` and exit code `1`. A store that is invalid or cannot be opened always raises an error. Atomic never falls back to memory.
|
|
352
|
-
|
|
353
|
-
From the SDK, `sessionStore` accepts all five selection kinds (`{ kind: "sqlite", path, prefix? }`, `{ kind: "jsonl", dir }`, `{ kind: "memory" }`, `{ kind: "database", database, prefix? }`, and `{ kind: "adapter", module, options?, secrets?, prefix? }`) or a concrete `SessionStore` instance (`SqlSessionStore`, `JsonlSessionStore`, or `MemorySessionStore`). Passing an explicit `sessionManager` bypasses store selection:
|
|
354
|
-
|
|
355
|
-
```typescript
|
|
356
|
-
const { session } = await createAgentSession({
|
|
357
|
-
sessionStore: { kind: "sqlite", path: "/data/sessions.sqlite" },
|
|
358
|
-
});
|
|
359
|
-
```
|
|
242
|
+
- `--session-store` cannot be combined with `--session-dir` or `--no-session`, and `ATOMIC_CODING_AGENT_SESSION_DIR` cannot be combined with `ATOMIC_SESSIONS_STORAGE`, `--storage`, or `--storage-file`.
|
|
243
|
+
- `--session-prefix` applies only with `--session-store` on a local SQLite file (matching `[A-Za-z_][A-Za-z0-9_]*`, never starting with `sqlite_`). For PostgreSQL, use a lowercase prefix up to 24 characters via `storage.prefix` or `atomic storage join --prefix`.
|
|
244
|
+
- Invalid storage configuration or unreachable stores always fail with an error rather than silently falling back to memory.
|
|
360
245
|
|
|
361
|
-
|
|
246
|
+
For programmatic store selection, `SessionStore` implementations, and store-closing rules in Node.js and TypeScript, see [SDK session storage](/sdk/storage). For JSONL schemas, entry types, and `SessionManager` methods, see [Session file format](/session-format).
|