@bastani/atomic 0.9.72-alpha.1 → 0.9.73-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 CHANGED
@@ -2,6 +2,205 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.73-alpha.1] - 2026-11-08
6
+
7
+ Intercom connects in every session of a multi-directory process.
8
+
9
+ - **Intercom per agent directory.** A process that starts a second session with a different `ATOMIC_CODING_AGENT_DIR` now connects that session to its own directory's broker, so messaging works in both sessions instead of never connecting ([#4561](https://github.com/bastani-inc/atomic/issues/4561), [#4562](https://github.com/bastani-inc/atomic/pull/4562)).
10
+
11
+ ### Fixed
12
+
13
+ - Fixed Intercom never connecting when one process starts a second session with a different agent directory (`ATOMIC_CODING_AGENT_DIR`): the session now starts and connects to the broker for its own directory instead of finding the first directory's broker and then querying a directory with none ([#4561](https://github.com/bastani-inc/atomic/issues/4561))
14
+
15
+ ## [0.9.72] - 2026-11-08
16
+
17
+ Waiting agents let go of their sessions, work resumes on any machine, and teams share storage with one command.
18
+
19
+ - **Agents that wait hold nothing.** Workflow stages, background subagents and SDK sessions waiting on a long tool call, a question or a shell `wait` release their session and memory and reopen from storage when their input arrives, so thousands can wait at once; oversized tool output is stored with the session and read through `tool-output://` ([#4309](https://github.com/bastani-inc/atomic/issues/4309), [#4326](https://github.com/bastani-inc/atomic/issues/4326), [#4373](https://github.com/bastani-inc/atomic/issues/4373), [#4374](https://github.com/bastani-inc/atomic/issues/4374), [#4379](https://github.com/bastani-inc/atomic/issues/4379), [#4395](https://github.com/bastani-inc/atomic/issues/4395), [#4403](https://github.com/bastani-inc/atomic/issues/4403), [#4502](https://github.com/bastani-inc/atomic/issues/4502)).
20
+ - **Resume on any machine.** Worktree snapshots record the repository content each session and run worked against, so `--resume`, `/resume` and workflow resume continue in a restored worktree on any machine that shares your storage, run your setup hook there, and clean up unused snapshot content in the background ([#4245](https://github.com/bastani-inc/atomic/issues/4245), [#4329](https://github.com/bastani-inc/atomic/issues/4329), [#4355](https://github.com/bastani-inc/atomic/issues/4355)).
21
+ - **Team and CI setup.** `atomic team join` and `ATOMIC_PROFILE=ci` put workflow runs and Intercom on a shared database in one step, runs live in a sharded journal store, and newer Atomic sessions replace an older Intercom broker instead of failing ([#4320](https://github.com/bastani-inc/atomic/issues/4320), [#4325](https://github.com/bastani-inc/atomic/issues/4325), [#4538](https://github.com/bastani-inc/atomic/issues/4538)).
22
+ - **Background compaction.** Sessions, stages and subagents compact older context in the background from 75% of the window while turns continue ([#4330](https://github.com/bastani-inc/atomic/issues/4330)).
23
+ - **Pi's file tools.** `edit` and `write` are upstream pi's exact-text tools, `read` and `search` return plain text, and `read` streams large files instead of loading them whole ([#4328](https://github.com/bastani-inc/atomic/issues/4328), [#4353](https://github.com/bastani-inc/atomic/issues/4353)).
24
+ - **One decision model.** `decisionModel` replaces `routerModel` and answers `decide()`, `model: "auto"` and `structured_output`, and lets a workflow stage advance on its own after you steer it ([#4358](https://github.com/bastani-inc/atomic/issues/4358), [#4526](https://github.com/bastani-inc/atomic/issues/4526)).
25
+ - **Providers and git.** Atomic downloads a portable git when none is installed, Copilot failures retry or fall back by their typed code, GPT Image 2.6 is available, and thinking `off` runs models that cannot turn thinking off at their lowest level ([#4322](https://github.com/bastani-inc/atomic/issues/4322), [#4324](https://github.com/bastani-inc/atomic/issues/4324), [#4332](https://github.com/bastani-inc/atomic/issues/4332), [#4545](https://github.com/bastani-inc/atomic/issues/4545), [#4552](https://github.com/bastani-inc/atomic/issues/4552), [#4556](https://github.com/bastani-inc/atomic/issues/4556)).
26
+ - **Run time travel and event streams.** `/workflow fork` retries a run from any stage in a new run, and `session.subscribe` follows CI checks, reviews, logs and webhooks without every event entering the context ([#4321](https://github.com/bastani-inc/atomic/issues/4321), [#4311](https://github.com/bastani-inc/atomic/issues/4311)).
27
+ - **Task chats and debug mode.** Type into a `/tasks` transcript to message that agent, stage chats and transcripts scroll like the main chat, and one debug switch turns on every debug log ([#4521](https://github.com/bastani-inc/atomic/issues/4521), [#4360](https://github.com/bastani-inc/atomic/issues/4360)).
28
+ - **Storage under load.** SQLite writers hand the lock straight to the next waiter, libSQL writes survive expired streams and brief outages, and tasks keep only their 256 most recently finished records ([#4316](https://github.com/bastani-inc/atomic/issues/4316), [#4383](https://github.com/bastani-inc/atomic/issues/4383), [#4385](https://github.com/bastani-inc/atomic/issues/4385), [#4387](https://github.com/bastani-inc/atomic/issues/4387)).
29
+
30
+ **Breaking change:** Call `edit` with `edits: [{ oldText, newText }]` and give custom `WriteOperations` only `writeFile(path, content)` and `mkdir(dir)`; rename `routerModel` and `getRouterModel()` to `decisionModel` and `getDecisionModel()`; await `exportToJsonl()`; use `isDebugEnabled("model-routing")`; give `admission.userLimits` an explicit journal file; compare `SessionStore.list` cancellations to `signal.reason`; and set `compat.requiresToolsWithToolHistory: true` for proxies that need `tools` with tool history. The bash interceptor, grep's `readFile` and the hashline conflict exports are removed.
31
+
32
+ ### Breaking Changes
33
+
34
+ - `SessionStore.list` now rejects cancellation with the original `AbortSignal.reason` across JSONL, SQL and in-memory stores. Callers supplying a custom reason should compare the caught value to `signal.reason` rather than expecting a new `AbortError`; `controller.abort()` without a custom reason still produces the standard `AbortError` ([#4319](https://github.com/bastani-inc/atomic/issues/4319))
35
+ - `isModelRoutingDebugEnabled` and `MODEL_ROUTING_DEBUG_ENV` are no longer exported from `@bastani/atomic`. Use `isDebugEnabled("model-routing")`, which is also on in debug mode ([#4360](https://github.com/bastani-inc/atomic/issues/4360))
36
+ - Removed `readFile` from `GrepOperations`. The grep tool takes context lines from ripgrep and no longer reads matched files itself; `GrepOperations` only covers the directory check. To search a remote system, override grep's `execute()` (upstream [#11705](https://github.com/earendil-works/pi/pull/11705))
37
+ - `edit` is upstream pi's exact-text tool: it takes `path` and `edits: [{ oldText, newText }]` instead of a hashline `input` script with `[PATH#TAG]` sections, line ranges and block anchors. It no longer needs a snapshot tag from an earlier `read`, so a file changed by `bash` (`sed -i`, `python -c`, heredocs) or another program is edited by its current text ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
38
+ - `write` is upstream pi's tool for file paths: it no longer requires a prior read before overwriting, does not strip copied hashline output, does not refuse files with generated-file markers, and does not make files that start with `#!` executable. Archive, SQLite, `conflict://` and `local://` targets keep working in the built-in tool ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
39
+ - `WriteOperations` has pi's shape again: `writeFile(path, content)` and `mkdir(dir)`. Remove `readFile` and the `exclusive` option from custom implementations; the `WriteFileOptions` type is gone ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
40
+ - Removed SDK exports: `FileMutationConflict`, `FILE_MUTATION_CONFLICT_CODE` and their detail, reason, evidence and requester types, and the `hashlineStore` and `resolveMutationRequester` tool options ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
41
+ - Removed the bash interceptor: the `bashInterceptor.enabled` setting, its **Bash Interceptor** `/settings` item, and the `interceptor`, `interceptorEnabled`, `interceptorRules` and `availableTools` options of `createBashToolDefinition`. Model `bash` calls always run, and extensions no longer receive them as `user_bash` events; interactive `!` commands still do. An existing `bashInterceptor` entry in `settings.json` is ignored ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
42
+ - `admission.userLimits` now needs an explicit journal file. The default journal store keeps each root on its own shard, so a run with `userLimits` on it fails before it starts with `WorkflowAdmissionConfigError` (`user-limits-need-one-journal`); a `userDatabase` that is not the run's journal file fails with `user-database-mismatch` instead of a plain error. Set `workflows.journal.path` (or `RunOpts.journal`) and `userDatabase` to the same SQLite file, or remove `userLimits`.
43
+ - The `routerModel` setting is now `decisionModel`, and **Router model** in `/settings` is now **Decision model**. Legacy settings migrate automatically. The extension context's `getRouterModel()` is now `getDecisionModel()`, and in a host without decision model settings it throws `DecisionModelUnavailableError` (reason `host-unsupported`) ([#4358](https://github.com/bastani-inc/atomic/issues/4358))
44
+ - `AgentSession.exportToJsonl()` returns `Promise<string>`, because exports now read worktree snapshot content from storage ([#4245](https://github.com/bastani-inc/atomic/issues/4245))
45
+ - OpenAI-compatible models no longer send `"tools": []` when all tools are disabled in a session that has used tools; the field is omitted. This fixes 400 errors (`tools must not be an empty array`) from vLLM 0.20+, also behind LiteLLM. If your proxy requires `tools` once the history has tool calls, such as older LiteLLM versions in front of Anthropic, set `compat.requiresToolsWithToolHistory: true` for that model in `models.json` (upstream [#11891](https://github.com/earendil-works/pi/pull/11891))
46
+
47
+ ### Added
48
+
49
+ - Background compaction: once context passes `compaction.backgroundThresholdPercent` of the window (75% by default), sessions, workflow stages and subagents compact older context in the background while turns continue, and apply the result at the next turn boundary. Blocking compaction remains only for the `reserveTokens` threshold or an overflow with no ready result. On by default; turn it off with **Background compaction** in `/settings` or `compaction.background: false`. The SDK exposes `session.compaction`, `onCompactionReady()` and `awaitBackgroundCompaction()`, RPC `get_state` and workflow stage status report the same state, failures, including a failed apply, are typed `BackgroundCompactionError`s that retry with backoff without interrupting the turn and keep their class across RPC, and the expected prompt-cache miss is reported when a result is applied ([#4330](https://github.com/bastani-inc/atomic/issues/4330))
50
+ - `createAgentSession({ workspace })` binds a session to a repository, branch and worktree from the new `workspace({ repo, base, branch, worktree, sandbox, label })`. Remote repositories are cloned once per host into a shared store and worktrees are added from it, missing branches are created from `base`, and the binding is recorded in the session and restored when it is reopened. A `"read-only"` workspace removes and refuses `write`, `edit` and `todo`. `workspaceChangeSet()`, `publishPullRequest()` and `restoreWorkspace()` are exported, and failures are typed `WorkspaceError` subclasses with stable codes, in one family with the worktree snapshot errors. A worktree whose checkout was interrupted is added again on the next bind; workspaces run the git that git provisioning resolves and need git 2.33 or later ([#3109](https://github.com/bastani-inc/atomic/issues/3109))
51
+ - `getWriterQueueStats(database)` from `@bastani/atomic/storage` reports how a node-sqlite handle used the database's write lock over the last 10 seconds: `lockHeldRatio`, `waiters` (writers in any process waiting now), `p50WaitMs`, `p95WaitMs`, and `commitsPerSecond` ([#4316](https://github.com/bastani-inc/atomic/issues/4316))
52
+ - `getWriterQueueDegradation(database)` from `@bastani/atomic/storage` returns the `StorageWriterQueueDegradedError`s a node-sqlite handle recorded, once per reason in the order they first happened, so a host can read what the writers' queue gave up on even where process warnings are suppressed ([#4316](https://github.com/bastani-inc/atomic/issues/4316))
53
+ - `openNodeSqliteDatabase(path, { groupCommitHoldMs })` sets how long one group commit runs queued transactions before other processes' writers get the lock (default `DEFAULT_GROUP_COMMIT_HOLD_MS`, 100 ms). An invalid value throws `StorageConfigError` before anything is opened ([#4316](https://github.com/bastani-inc/atomic/issues/4316))
54
+ - Storage errors from the writers' queue are typed: `StorageWriteLockTimeoutError` (code `write-lock-timeout`, still a `StorageUnavailableError`) with `timeoutMs`, `elapsedMs`, `phase`, and the holding process when known; `StorageWriterQueueUnusableError` (code `writer-queue-unusable`, also a `StorageUnavailableError`) with the `errno`; `StorageUnsupportedOperationError`; and `StorageWriterQueueDegradedError`, recorded once per reason on the handle when writers fall back to polling, cannot notify the next writer, or cannot remove an abandoned queue entry, and emitted as a process warning, which Atomic's own processes suppress. `StorageConfigError` has `code` `invalid-config` and an optional `hint`. Guards (`isStorageWriteLockTimeoutError` and others, and `isStorageError` for any storage error), `isRetryableStorageError`, and `serializeStorageError`/`rehydrateStorageError`, which carry every storage error between processes as the same class with its causes, are exported ([#4316](https://github.com/bastani-inc/atomic/issues/4316))
55
+ - `SessionStartTimeoutError`, `SessionStartConfigError` and their `SessionStartError` family are exported with their guards, `findSessionStartError`, `isRetryableSessionStartError`, `serializeSessionStartError`, `rehydrateSessionStartError` and `parseSessionStartTimeoutMs`. A subagent that does not start in time reports one, whose `phase` (`admission`, `setup`, `dispatch` or `event-loop`) and timing fields say what blocked it; see [Session start errors](docs/sdk/reference.md#session-start-errors) ([#4319](https://github.com/bastani-inc/atomic/issues/4319))
56
+ - Atomic provides git the way it provides `fd` and `rg`: when no git 2.30.0 or newer is on `PATH`, it downloads a pinned portable git from desktop/dugite-native (macOS x64/arm64, Linux glibc x64/arm64/armv7, Windows x64/arm64/x86), verifies its SHA-256, and installs it under `~/.atomic/agent/bin/git/`. Workflow worktrees, git packages, and the footer branch use it, and the `bash` tool puts it on `PATH` when no git is installed at all. `/tools` and `session.getToolStatus()` show which git runs and its version, or why none is available. On Alpine and other unsupported systems, offline, or after a checksum mismatch Atomic installs nothing and reports a typed `GitUnavailableError` whose hint ends with the command that installs git on your system (`apt-get install git`, `dnf install git`, `apk add git`, `xcode-select --install`, `winget install --id Git.Git -e --source winget`, and so on). A new Atomic release that pins a different git build replaces the installed copy at the next start that can download it; if it cannot, the older copy keeps working, `/tools` shows the reason, and the download is not retried by every git command ([#4322](https://github.com/bastani-inc/atomic/issues/4322))
57
+ - `resolveGit()`, `resolveGitSync()`, and `getGitStatus()` give SDK hosts the same git resolution, with the portable environment to run it in. Failures are typed: `GitProvisionError`, `GitUnavailableError` (codes `unsupported-platform`, `offline`, `not-installed`, `checksum-mismatch`, `download-failed`, `install-failed`), `GitProvisionTimeoutError`, and `GitProvisionConfigError`, with guards, `hint`, and `rehydrateGitProvisionError()` for errors that cross a process boundary ([#4322](https://github.com/bastani-inc/atomic/issues/4322))
58
+ - GPT Image 2.6 (`gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`) is available under `openai-images` with your OpenAI API key. Codemode's `models.generateImages()` and `ctx.modelRegistry.generateImages()` take its options: animated GIF and SVG output, `complexity`, `outputFormat`, `outputCompression`, `moderation` and `safetyIdentifier`, and an image block with `role: "markup"` or `role: "mask"` for markup-guided and masked edits. Codemode accepts only these request options as its third argument; credentials, headers and `fetch` are rejected ([#4332](https://github.com/bastani-inc/atomic/issues/4332)).
59
+ - Image generation failures carry a typed `error` next to `errorMessage`, for example `invalid-option` for a request that cannot succeed and `moderation-blocked` for a blocked prompt, so scripts and extensions can branch on `code` and `retryable` ([#4332](https://github.com/bastani-inc/atomic/issues/4332)).
60
+ - Providers registered with image models can declare `capabilities` to enable the optional GPT Image request features.
61
+ - Codemode saves SVG images from `models.generateImages()` to `.svg` files and names their paths in the result, because `image()` cannot show SVG. Generated SVGs no longer trigger the note asking the script to show them with `image()` ([#4332](https://github.com/bastani-inc/atomic/issues/4332)).
62
+ - GitHub Copilot failures are typed, so retries and model fallback follow the failure's code instead of the wording of Copilot's message, in the main chat, subagents and workflow stages alike: an unavailable model, used-up quota or sign-in failure moves to the next fallback model without retrying; a rate limit, outage, cut-off stream, empty turn or unrecognized response is retried on the same model first; a content-filter refusal follows `retry.fallbackOnContentFilter`; and a prompt over the model's prompt-token limit compacts. The error classes, their codes and guards are exported from `@bastani/atomic`; see [Providers](docs/providers.md#errors) ([#4324](https://github.com/bastani-inc/atomic/issues/4324))
63
+ - The providers guide documents which API, thinking levels, reasoning replay, tool-call behaviour, usage, images and limits each Copilot model family has ([#4324](https://github.com/bastani-inc/atomic/issues/4324))
64
+ - `TaskCleanupError`, `isTaskCleanupError`, `isRetryableTaskError` and `rehydrateTaskCleanupError` are exported from `@bastani/atomic`. Closing a session or workflow stage, or pausing a stage, rejects with this typed, retryable error (code `task_cleanup_unconfirmed`) when a task's process cleanup failed; it carries the `phase`, every task and resource left unconfirmed, and a `hint`. Sessions emit a `task_cleanup_quarantined` event when a task's result settles before its cleanup is confirmed ([#4338](https://github.com/bastani-inc/atomic/issues/4338)).
65
+ - `TaskCleanupAdmissionTimeoutError` and `isTaskCleanupAdmissionTimeoutError` are exported from `@bastani/atomic`. An admission that waits while commands owned by the same session or stage hold permits from that admission provider for unconfirmed cleanup now rejects after five continuous seconds instead of blocking the turn or a stage pause indefinitely. The error extends `TaskCleanupError`, keeps code `task_cleanup_unconfirmed`, and names the holding tasks with `phase: "command-admission"`, `timeoutMs`, `elapsedMs` and a retry hint. The earlier commands keep their results and permits until cleanup is confirmed. Other execution-scoped admission providers remain independent ([#4338](https://github.com/bastani-inc/atomic/issues/4338)).
66
+ - Debug mode turns on every debug output at once: the `debug` setting (**Debug mode** in `/settings`), `--debug`, or `ATOMIC_DEBUG=1`. While it is on, the footer shows a `debug` badge and each area writes one JSON line per event, with credentials redacted, to the debug log that `/debug` shows. Toggling it in `/settings` applies to new work without a restart, and pool workers, pool coordinators and the Intercom broker started afterwards inherit it. `ATOMIC_WORKFLOW_DEBUG`, `ATOMIC_MODEL_ROUTING_DEBUG` and `ATOMIC_DEBUG_POOLED_WATCH` still turn on their own area as before. Debug mode also writes each SQLite writers' queue degradation to the log, once per reason. Extensions can use `isDebugEnabled(area)` and `reportDebug(area, event, fields)`, and the RPC `set_debug` command turns it on or off for an engine. `setDebugSetting()` and `set_debug` refuse anything but `true` or `false` with the exported `DebugConfigError` (code `invalid-setting`), which crosses the RPC boundary as `errorCode: "debug_error"` and rejects `RpcClient.setDebug()` as the same class; `serializeDebugError` and `rehydrateDebugError` do the same for other processes ([#4360](https://github.com/bastani-inc/atomic/issues/4360))
67
+ - Added the Qwen Token Plan (Individual, China) provider, `qwen-token-plan-individual-cn`: the Individual subscription catalog on the China endpoint, with `QWEN_TOKEN_PLAN_CN_API_KEY` and `qwen3.8-max` as its default model (upstream [#7989](https://github.com/earendil-works/pi/pull/7989))
68
+ - `LlamaServerError`, `LlamaServerUnreachableError` and `LlamaServerRequestError`, with `isLlamaServerError()`, `isLlamaServerUnreachableError()`, `isLlamaServerRequestError()`, `isRetryableLlamaServerError()`, `findLlamaServerError()` and `rehydrateLlamaServerError()`, and the `SerializedTypedError` shape their `toJSON()` produces, are exported from `@bastani/atomic`
69
+ - `ShellToolError` and `ShellTimeoutError` (code `shell-timeout`, with `timeoutMs`, `elapsedMs`, `phase` and `shellExit`), with `isShellToolError()`, `isShellTimeoutError()` and `rehydrateShellToolError()`, are exported from `@bastani/atomic`. The local shell backend of `createLocalBashOperations()` throws `ShellTimeoutError`, whose message stays `timeout:<seconds>`
70
+ - `StartupBenchmarkError` and `StartupBenchmarkConfigError` (code `unsupported-mode`, with `source`, `field` and `appMode`), with `isStartupBenchmarkError()`, `isStartupBenchmarkConfigError()` and `rehydrateStartupBenchmarkError()`, are exported from `@bastani/atomic`
71
+ - `edit` and `write` failures are typed: `EditInputError`, `EditMatchError` and `EditTargetError` (family `EditToolError`) and `WriteSelectorError`, each with a stable `code`, structured `fields` and a `hint`, plus guards, `serializeFileToolError` and rehydration helpers. A cancelled `edit` or `write` throws `FileToolAbortedError` with the signal's reason as `cause` ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
72
+ - `atomic team join <url> [--token-file <path>] [--prefix <prefix>]` sets up the team layout in one command: workflow runs and Intercom on the team database, sessions pinned to the local store, the Intercom broker restarted, and the storage report printed. `atomic team status` shows the profile in effect (`individual`, `team`, `ci` or `custom`), and `atomic team leave` removes only the `storage` value `team join` recorded (a changed URL or prefix stays), keeping sessions local when another global, legacy global or trusted project storage selection remains. A `storage` written by an earlier build has no record: run `atomic team join` once more. Concurrent setup commands coordinate settings and token-file updates ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
73
+ - `ATOMIC_PROFILE=ci` with `ATOMIC_TEAM_URL` and `ATOMIC_TEAM_TOKEN` or `ATOMIC_TEAM_TOKEN_FILE` (and optional `ATOMIC_TEAM_PREFIX`) puts sessions, workflow runs and Intercom on the team database without a settings file. Incomplete or invalid variables, and a missing libSQL adapter, fail at startup with a typed error naming what to set or install ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
74
+ - SDK: `joinTeam()`, `leaveTeam()`, `getTeamProfile()` and `teamProfileSelection()` from `@bastani/atomic/storage`, the `createAgentSession({ storage })` option, in-memory `{ value }` secrets that serialize as `[redacted]`, the typed `TeamProfileError` and `TeamProfileConfigError` with their guards and `serializeTeamError()`/`rehydrateTeamError()` for passing them between processes, and `ProjectGroupError` with `isProjectGroupError()` from `@bastani/atomic` ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
75
+ - A new [Team and CI setup](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/guides/team-setup.md) guide with a GitHub Actions and gh-aw snippet ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
76
+ - `atomic storage adopt <path>...` registers existing workflow journal files in the journal store in place, without copying them, so their runs are found by ID and resume where they are; it also adopts the journal files those runs were written to. `atomic storage consolidate` moves finished runs from adopted files into the store's own shards. The SDK exports the same operations and the catalog from `@bastani/atomic/storage`: `adoptJournals`, `consolidateJournalStore`, `JournalCatalog` and `defaultJournalStoreDirectory`, with the typed errors `JournalCatalogError`, `JournalShardUnavailableError` and `JournalAdoptError` and their codes and guards ([#4325](https://github.com/bastani-inc/atomic/issues/4325))
77
+ - `decide({ state, questions, deadline })` asks the configured decision model typed Choice, yes/no and Score questions in one request. A classifier answers with each answer's probabilities and confidence; when it fails, the current chat model answers without probabilities, unless `requireProbabilities` is set. Failures reject with the exported `DecisionError` family (`DecisionConfigError`, `DecisionRequestError`, `DecisionModelUnavailableError`, `DecisionTimeoutError`, `DecisionOutputError`, `DecisionProviderError`), with stable codes, hints, guards, and `serializeDecisionError` / `rehydrateDecisionError` for errors that cross a process boundary ([#4358](https://github.com/bastani-inc/atomic/issues/4358))
78
+ - `/settings` → **Auto-advance after steer** turns `workflows.autoAdvanceAfterSteer` on or off ([#4358](https://github.com/bastani-inc/atomic/issues/4358))
79
+ - `intercom.showUnknownTargetWarnings` setting (default `false`) adds a note to queued workflow Intercom sends whose target is outside the run's known and predicted stages; by default such sends just report `Message queued for <target>` ([#4359](https://github.com/bastani-inc/atomic/issues/4359))
80
+ - Sessions and workflow runs record worktree snapshots and resume on another machine, or after a worktree was deleted or reset, with the repository content they were made against. A turn that calls `bash`, `edit`, `write`, `powershell` or an extension tool with `writesFiles: true` records a `worktree_snapshot` entry: the Git tree of the working copy, a binary patch chain, a bundle of unpushed commits, omissions and an environment hash, with patches and bundles stored once per content hash in the same SQLite or database storage. Resuming restores a drifted or missing checkout automatically into a fresh worktree under `~/.atomic/agent/worktree-snapshots/` and prints one line naming it; it never writes into your checkout, and it fails with a typed `WorkspaceDriftError` when the snapshot cannot be restored. `.gitignore`, global excludes, `.atomic/snapshot-ignore` and a built-in secret deny list are respected: no deny-listed bytes are captured unless they are already in a commit reachable from a remote-tracking ref. New `snapshots.*` settings, a `snapshots` option on `createAgentSession`, `/session snapshot`, JSONL exports that carry snapshot content, and SDK exports `captureWorktreeSnapshot`, `restoreWorktreeSnapshot`, `verifyWorktree`, `WorkspaceBinding` and the `WorkspaceError` family. Restore refuses snapshot records with values Atomic never writes (`invalid-snapshot`), fetches only over https, http, ssh, git or local paths and never waits for a password or host-key prompt, verifies each worktree under a staging directory before moving it into place, and removes what an interrupted restore left behind; `collectSnapshotGarbage` keeps blobs younger than a grace window so it can run while captures are in flight. See [Worktree snapshots](docs/worktree-snapshots.md) ([#4245](https://github.com/bastani-inc/atomic/issues/4245))
81
+ - Worktree snapshot content that no session or resumable workflow run needs is deleted automatically in the background when a session closes or a root workflow run finishes. Collection uses an incremental reference index rather than scanning session or run histories, runs at most once per `snapshots.collectIntervalSeconds` per database, and protects content stored or reused within `snapshots.graceSeconds`. An older database is indexed in background batches before anything is deleted. Collection timers do not keep an otherwise idle process alive. Closing the last session or journal on a database aborts collection at the next batch boundary and releases the database before the awaited close resolves, without waiting for the remaining collection. New settings `snapshots.autoCollect`, `snapshots.collectIntervalSeconds` and `snapshots.graceSeconds`; `collectSnapshotGarbage(blobs, { graceSeconds, signal })` now finds retained snapshots itself, `scheduleSnapshotCollection` starts automatic collection, and a failed collection is a retryable `WorkspaceCollectionError` (`collection-failed`) found with `isRetryableWorkspaceError`. See [Retention and collection](docs/worktree-snapshots.md#retention-and-collection) ([#4355](https://github.com/bastani-inc/atomic/issues/4355))
82
+ - Workflow run time travel: `forkRun` and `listForkPoints` in `@bastani/atomic/workflows`, the `workflow` tool's `fork` action and `/workflow fork <run> [--from <stage>]` retry a run from a stage in a new run, with optional replacement inputs, while the source run stays unchanged. Stage options gain `forkFromEntryId` to start a stage at an exact entry of an earlier session. Failures are typed `ForkError`s with codes and hints ([#4321](https://github.com/bastani-inc/atomic/issues/4321))
83
+ - `RunJournal.createRunWithEvents` in `@bastani/atomic/storage`, an optional member that creates a run with its first events in one transaction ([#4321](https://github.com/bastani-inc/atomic/issues/4321))
84
+ - `atomic auth login <provider>` signs in to a provider from the shell without starting a session, for example `atomic auth login openai`. It signs in with an account in the browser and exits; `--api-key` saves an API key instead, and `--no-browser` uses device code or copy-code sign-in. `atomic auth logout <provider>` removes the stored credentials, like `/logout`. Both take a provider ID or display name; a name that matches more than one provider is rejected with the matching IDs instead of picking one. For MCP servers that use provider credentials, `atomic mcp login` and `atomic mcp logout` now point to these commands (upstream 9b9cb30a)
85
+ - `ctx.ui.custom()` overlays now honor the `blocked` option, also in the default isolated mode: Atomic reports blocked program status (OSC 7501) from when the overlay is shown until it calls `done()` or its `signal` aborts, also while it is hidden with `setHidden()`. Closing one overlay keeps other open questions blocked, and `/reload` or a session switch clears the status of overlays it drops (upstream [#11816](https://github.com/earendil-works/pi/issues/11816))
86
+ - `TaskEvictedError` (code `task_evicted`, `retryable: false`, with `taskId`, `retainedFinishedTasks` and `hint`) is exported from `@bastani/atomic` with `isTaskEvictedError`, `findTaskEvictedError` (which searches an error's `cause` chain), `rehydrateTaskEvictedError` and `FINISHED_TASK_RETENTION`. Task supervisor doors refuse a finished task their owner no longer keeps with the code `TaskEvicted` instead of `UnknownTask`, and `watchOwnerTasks` reports each eviction as a `task-evicted` event ([#4385](https://github.com/bastani-inc/atomic/issues/4385))
87
+ - A tool can declare `detachable: true` when its work does not need the session once started. With a policy set through `AgentSession.setToolDetachment({ afterMs })` (at most `MAX_TOOL_DETACHMENT_AFTER_MS`, 2,147,483,647 ms), a call that runs longer than `afterMs` goes on outside the session and the run ends on it, so the host can dispose of the session; `takeDetachedToolCalls()`, `hasPendingDetachedTurn()`, `resumeDetachedTurn(results)` and `redispatchDetachedToolCalls()` hand the result back to a reopened session, which continues the same turn without a new user message. Results can be handed back together or one at a time: each is recorded right after its call as it arrives, and the turn continues once, when every detachable call of it has a result. A detached result goes through the same `tool_result` handlers, image normalization and oversized-output spill as an inline one, and the detached work keeps no reference to the session. Refused operations throw the typed `ToolDetachmentError`; a workflow stage released while it waits refuses a task launch with its retryable code `stage-parked`, which serializes with `toJSON()` / `deserializeToolDetachmentError()` and is found in a cause chain with `findToolDetachmentError()` ([#4309](https://github.com/bastani-inc/atomic/issues/4309))
88
+ - Workflow stages that only wait give up their session and admission slot and reopen from the session store when their input arrives; see the workflows changelog ([#4309](https://github.com/bastani-inc/atomic/issues/4309))
89
+ - A workflow run started with `evictWhenWaiting` leaves memory while its stages only wait on detached tool calls, keeping one small index entry per waiting stage, and is rebuilt by replay when a result arrives; see the workflows changelog ([#4373](https://github.com/bastani-inc/atomic/issues/4373))
90
+ - `AgentSession.clearQueue()` retains queued images in an optional `images` field aligned with its steering and follow-up text arrays. Workflow stages preserve those images when releasing and reopening their sessions, including messages held during compaction ([#4309](https://github.com/bastani-inc/atomic/issues/4309))
91
+ - SDK hosts can keep many conversations without a live session for each: `session.release()` keeps only the stored history, `AgentSessionRuntime.rehydrate(sessionId)` brings a session back from storage, and `createAgentSession({ releaseWhenIdle: { afterMs } })` releases an idle session automatically. A released session holds no timer, listener, connection or extension instance; rehydrated sessions share the runtime's services. A session with background tasks still queued or running is not released, so its tasks keep running: `release()` refuses with a retryable `session-busy` (`activity: "background-tasks"`) and `releaseWhenIdle` checks again later. Failures are typed `AgentRehydrateError` / `AgentReleaseConfigError` with stable codes, a session missing from local-only storage names `atomic team join`, a session whose history lives in a private in-memory store is refused at once instead of being lost on release, an `afterMs` above 2147483647 is refused before anything is created, and a close that fails rejects as `release-failed` with the failure as its cause; when the runtime closes while a session rehydrates, its `SessionClosed` error carries that close failure as `cleanupCause`. Sessions kept in memory write each new entry at the cost of that entry instead of the whole session ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
92
+ - `AgentWakeDispatcher` and `agentWakeDispatcher()`: one process-wide owner of waiting agents that wakes each one in arrival order, one batch at a time, with timed wakes on a single shared timer that also handles delays longer than one timer can hold. `onUnobservedFailure(listener)` reports wakes that failed with nobody waiting on them, and `whenIdle(wakeKey?)` resolves once a key, or the whole dispatcher, has nothing queued or running ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
93
+ - `AgentSessionBusyError` and `isAgentSessionBusyError`: `prompt()` during a running turn without `streamingBehavior` now throws this typed error (`code: "agent_session_busy"`, with a `hint`) ([#4327](https://github.com/bastani-inc/atomic/issues/4327))
94
+ - A tool's `detachable` may be a function of the call's arguments, so a tool can let only its waiting calls outlive a run: only those calls detach under a host's release policy and are started again after a restart. A shell `wait` without a budget is such a call: in a session that may be released it waits until its task finishes, so a background subagent waiting on its own shell is released while the task runs ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
95
+ - A detachable tool can require a durable handoff before it releases the session with `detachmentRequiresReady: true`; `toolCallNeedsDetachmentHandoff(signal)` and `markToolCallReadyForDetachment(signal)` let it save and signal that handoff before detachment ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
96
+ - `session.subscribe(source, handler, options?)` subscribes an SDK session to an event stream. Each event is handled by `handler(event, child)`: `child.task()` runs a short-lived child session seeded with the event, and `child.report()` delivers a short `event_report` message into the session only when the event matters. Processed event ids are recorded in the session transcript, so a reopened session does not handle them again ([#4311](https://github.com/bastani-inc/atomic/issues/4311))
97
+ - Event sources for `session.subscribe` and the workflow `ctx.subscribe`/`ctx.events`: `githubChecks`, `githubReviews`, `logTail`, `webhook` and `interval`, plus the `EventSource` interface for your own, and `publishEvent(subscriptionId, event)` to bridge a host's own webhooks. Failures are typed: `SubscriptionError` and its subclasses carry a stable `code`, fields and a `hint` ([#4311](https://github.com/bastani-inc/atomic/issues/4311))
98
+ - `redactUrlCredentials(text)` is exported from `@bastani/atomic`: it removes the user info, which can hold a token, from every URL in a text ([#4378](https://github.com/bastani-inc/atomic/issues/4378))
99
+ - `restoreWorktree` and `restoreWorktreeSnapshot` take `git: { path, env }`, the Git executable one restore runs instead of the one worktree snapshot operations resolve ([#4416](https://github.com/bastani-inc/atomic/issues/4416))
100
+ - `StorageTransientError` (a `StorageUnavailableError`, `retryable: true`) with codes `stream-expired`, `transaction-timeout`, `connection-refused` and `connection-lost`, an `outcome` of `"not-applied"` or `"unknown"`, `attempts` and a `hint`, plus `isStorageTransientError()` and `STORAGE_TRANSIENT_ERROR_CODES`, exported from `@bastani/atomic/storage` and carried across processes by `serializeStorageError`/`rehydrateStorageError` ([#4383](https://github.com/bastani-inc/atomic/issues/4383))
101
+ - `createSqliteDatabase` drivers can recognize their transient failures with an optional `transientFailure(failure)`; the call then fails with `StorageTransientError`. The libSQL adapter recognizes an expired stream, a transaction the server timed out, a refused connection and a broken connection by their codes. A statement or batch that such a failure ended before it wrote anything runs again, up to `STORAGE_TRANSIENT_RETRY_ATTEMPTS` (5) times with a doubling backoff from 250 ms, and so does a transaction that passes the new `retryTransientFailures: true` option; a call whose outcome is unknown never runs again ([#4383](https://github.com/bastani-inc/atomic/issues/4383))
102
+ - `ModelRuntime.whenRegistrationRefreshesSettled()` resolves once no catalog refresh started in the background by `registerProvider()`, `registerNativeProvider()` or `unregisterProvider()` is still running, including one a registration starts while it waits. When one provider's credential check fails during a refresh, the refresh now stops its remaining checks instead of leaving them running after it ends ([#4480](https://github.com/bastani-inc/atomic/issues/4480))
103
+ - Session stores can keep blobs apart from a session's entries: `SessionStore.putBlob(sessionId, data)` stores bytes under their SHA-256 and `getBlob(sessionId, hash)` reads them back. The SQLite and libSQL stores keep them in `session_blobs` and `session_blob_chunks` tables, a header and rows of at most 1 MiB, so a remote libSQL server's row size limit never applies, and the in-memory store keeps them in memory; blobs are deleted with their session, are never touched by worktree snapshot collection, and travel with a session when it is branched, forked, moved to another store, or copied by a workflow fork. The oversized result of an agent released while it waited (a workflow stage or a background subagent) is stored this way and read with `read` or `search` on `tool-output://<sha256>`. `exportToJsonl` carries these outputs inline, one at a time into a file moved into place when complete, owner-only for a new file and with the mode of the file it replaces (`toolOutputContent: false` leaves them out, as `/share` does) and importing or forking the file restores them after checking each hash. A copy, fork or export whose source no longer holds a blob it references carries on without it and reports it once as a process warning. Failures are a typed `SessionBlobError` with codes `blobs-unsupported`, `blob-missing`, `blob-corrupt` and `blob-incomplete`, recognized by `isSessionBlobError` ([#4379](https://github.com/bastani-inc/atomic/issues/4379))
104
+ - In a workflow stage's session, `ask_user_question` is detachable as well, so a stage releases its session while the model waits on the user's answer, as it does during a shell `wait` without a budget. A detached call's error result carries a thrown error's `code` as data in `details.error`, with its `hint`, `retryable`, JSON-safe `fields` and cause chain; an error whose own `toJSON()` throws is reported from its properties instead, marked `serialization: "fallback"`, and the call's `result` still never rejects. A shell wait whose task is gone after a restart reports its `TaskToolError` there. `TaskToolError` now carries `hint`, `retryable` (only `StaleGeneration` is retryable) and `fields.taskId`, and `TaskToolError`, `isTaskToolError`, `rehydrateTaskToolError` and their types are exported ([#4374](https://github.com/bastani-inc/atomic/issues/4374))
105
+ - `SessionSpillError` (codes `spill-dir-refused`, `spill-write-failed`, `spill-read-failed`, `spill-missing`, `spill-corrupt`, `spill-cleanup-failed`), `isSessionSpillError()` and `SESSION_SPILL_ERROR_CODES` are exported from `@bastani/atomic/storage`. A released session whose file cannot be read, or holds something other than what was written, rejects its load with one (`spill-read-failed` is retryable when the failure passes), never as a session that does not exist; a listing leaves such a session out and reports it once, and fails only on a retryable read. A file that cannot be written keeps that history in memory and is reported once as a process warning. Session stores may implement the optional `releaseSession(sessionId)` hook to move a released session's history out of memory ([#4502](https://github.com/bastani-inc/atomic/issues/4502))
106
+ - `IntercomBrokerSuccessorTimeoutError` (code `broker-successor-timeout`, `retryable: true`, with `phase`, `timeoutMs`, `elapsedMs`, `attempts` and `hint`) and its family base `IntercomBrokerError` are exported from `@bastani/atomic` with `isIntercomBrokerError`, `isIntercomBrokerSuccessorTimeoutError`, `isRetryableIntercomBrokerError`, `serializeIntercomBrokerError` and `rehydrateIntercomBrokerError`. Intercom raises the timeout when a registration lost to a retiring broker finds no replacement within 10 seconds ([#4496](https://github.com/bastani-inc/atomic/issues/4496))
107
+ - Type in a `/tasks` agent transcript and press Enter to message that agent through its Intercom target, as an Intercom message from your session would. The agent records the message, so it appears in the transcript once delivered; a refused or unconfirmed message stays in the prompt with the reason, and comes back there when you reopen the transcript if you had already left it. `TaskViewSource.sendTaskMessage()` does the same for SDK hosts, and its failures are typed: `TaskMessageError` (codes `task-unavailable`, `messages-unsupported`, `delivery-refused`, and `delivery-unconfirmed` when the channel failed without an answer) and `TaskMessageTimeoutError` (`delivery-unconfirmed`), with guards, `isRetryableTaskMessageError()`, `findTaskMessageError()` and `rehydrateTaskMessageError()`. Only `delivery-refused` is retryable ([#4521](https://github.com/bastani-inc/atomic/issues/4521))
108
+ - Attached workflow stage chats and `/tasks` transcripts scroll like the main transcript: the mouse wheel follows `fullscreenWheelScrollLines` with velocity acceleration in `"auto"`, Alt+wheel scrolls five times as far, `fullscreenScrollbar` shows a scrollbar, Ctrl+Up/Ctrl+Down jump between prompts, and the `tui.altScreen.halfPageUp`/`halfPageDown` bindings page by half a view. `ScrollableComponentViewport` takes these as constructor options, `ChatSessionHost` accepts `commands.send` and `onNearTop` and has `prependMessages()` and `replaceMessages()`, and `ChatRenderSettings` may carry `fullscreenScrollbar` and `fullscreenWheelScrollLines` ([#4521](https://github.com/bastani-inc/atomic/issues/4521))
109
+ - Sessions resume on any machine that shares your storage. `atomic --session`, `--resume`, `/resume` and SDK `createAgentSession({ sessionManager })` continue a session whose checkouts are missing or changed here, and `runtime.rehydrate()` one whose checkouts are missing here or are other clones that differ from its snapshots, keeping each checkout it worked in on this machine as it is: in a matching checkout of the same repository, or in fresh worktrees restored from its snapshots, asking only when you start `atomic` in a checkout of the repository that differs and has local changes. Every recorded checkout is restored, also for a session that worked outside all of them. Absolute paths from the earlier machine resolve in the restored worktrees for that session's tool calls, and for those of a released background subagent woken on another machine, and a trusted repository's `.atomic/setup` or `resume.setupCommand` from your global settings installs dependencies once per restored worktree and lockfile state. See [Resume on any machine](docs/guides/resume-on-any-machine.md) ([#4329](https://github.com/bastani-inc/atomic/issues/4329))
110
+ - Resumes check their setup in one pass before restoring anything and fail typed, naming every missing piece and its fix: `ResumePreconditionError` (adapter not installed, missing or unreadable token, Git that can be neither started nor provisioned, with the `GitUnavailableError` as its `cause`, or no setup hook that could run), `ResumeNotFoundError` (a machine that keeps sessions in local-only storage is told to run `atomic storage join <url> --token-file <path>`, after `atomic team leave` on a machine joined with `atomic team join`, which keeps sessions on each machine; `rehydrate()`'s `session-not-found` hint says the same), `ResumeSetupHookError`, and the retryable `ResumeCatalogUnavailableError` and `ResumeCatalogTimeoutError`: the CLI resume, `/resume` and `rehydrate()` stop after 15 seconds when shared storage does not answer, instead of waiting for the network to give up. The family is exported from `@bastani/atomic` with its guards, `serializeResumeError` and `rehydrateResumeError`, and crosses workflow worker boundaries as itself ([#4329](https://github.com/bastani-inc/atomic/issues/4329))
111
+ - `atomic intercom upgrade` replaces an Intercom broker that an older Atomic started, when that is safe: it stops one with no session connected, so the next session starts the new broker, and leaves one with sessions connected to the next session of the new version, which hands it over. The installers and `atomic update` run it after a successful install, only when the installed version has the command and without passing it any input; a failure there only warns. `atomic intercom status` shows the broker's protocol range. The `IntercomBrokerError` family adds `IntercomBrokerProtocolError` (`broker-protocol-unsupported`), `IntercomBrokerUpgradeError` (`broker-upgrade-failed`) and `IntercomBrokerStopTimeoutError` (`broker-stop-timeout`), exported with `isIntercomBrokerProtocolError()`, `isIntercomBrokerUpgradeError()` and `isIntercomBrokerStopTimeoutError()` ([#4538](https://github.com/bastani-inc/atomic/issues/4538))
112
+
113
+ ### Changed
114
+
115
+ - A node-sqlite writers' queue directory (`<file>-writers`) that exists but cannot be read now fails transactions with `StorageWriterQueueUnusableError`, a `StorageUnavailableError` naming the cause, instead of letting them skip the queue unnoticed. A writer that cannot read the queue when it lets go of the lock still commits and reports a `StorageWriterQueueDegradedError` warning ([#4316](https://github.com/bastani-inc/atomic/issues/4316))
116
+ - `/debug` appends its snapshot to the debug log instead of replacing the file, so debug mode output written before it is kept. Each `/debug` adds another snapshot with conversation text, and Atomic never trims the file, so delete it before reproducing a problem you want to share ([#4360](https://github.com/bastani-inc/atomic/issues/4360))
117
+ - Credential redaction in debug output, and in the error messages of `atomic auth` credential printing and Morph compaction, also replaces GitHub tokens (`ghp_…`, `gho_…`, `github_pat_…` and the like) and private key blocks with `[redacted]` ([#4360](https://github.com/bastani-inc/atomic/issues/4360))
118
+ - The default model for the `anthropic` and `anthropic-api` providers is now Claude Opus 5.5 (`claude-opus-5-5`) instead of Claude Opus 4.8 (upstream b425754a)
119
+ - Default models moved to newer models at the same or a lower price: `amazon-bedrock` Claude Opus 5.5, `azure` GPT-6.1 Sol, `google` and `google-vertex` Gemini 4 Argon, `vercel-ai-gateway` GLM 5.3, `minimax` and `minimax-cn` MiniMax-M3, `qwen-token-plan` and `qwen-token-plan-cn` Qwen3.8 Max, `opencode-go` Kimi K3.1 Pro, and Kimi K2.7 Code instead of Kimi K2.6 for `moonshotai`, `moonshotai-cn`, `huggingface`, `opencode`, `openrouter`, `cloudflare-workers-ai` and `cloudflare-ai-gateway` (upstream d84123b3)
120
+ - Mermaid diagrams render with lovely-mermaid 0.3.3 instead of grok-mermaid: pie charts and other new diagram types render, `classDef` styles from the diagram apply over the theme colors, and `click` links become terminal hyperlinks on the node label when the terminal supports them (upstream [#8158](https://github.com/earendil-works/pi/pull/8158))
121
+ - `read` and `search` return plain text without `[path#TAG]` headers or `LINE:` prefixes. `read` shows file content as is, and a line-range selection that is not the whole file labels each run of lines, for example `[Lines 9-14 of 40]`, with the continuation hint pointing after the last line shown; `:raw` returns the exact requested lines without labels. `search` rows are `path:LINE: text` for matches and `path-LINE- text` for context, with paths relative to the working directory. Line ranges, `:raw`, conflict views, archives, SQLite, URLs and internal resources such as `history://` work as before ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
122
+ - The interactive `edit` row previews its diff as soon as the call's arguments are complete, as upstream pi does ([#4328](https://github.com/bastani-inc/atomic/issues/4328))
123
+ - `atomic storage join` reuses the private token file the current selection references when it already holds the same token, so joining again leaves settings unchanged, its connection check gives up after 15 seconds with a retryable `connection-timeout` instead of waiting for the operating system, and its errors are typed (`TeamProfileConfigError`, `TeamProfileError`) ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
124
+ - Workflow runs are kept by default in one logical journal store, `~/.atomic/workflows/journal/`: a catalog plus SQLite shard files that Atomic creates and grows by itself. Each root run and its children live on one shard, so concurrent campaigns and their local workers no longer wait for one file's write lock, and you no longer need a separate journal per campaign or pool. Status, resume, attach, fork, `history://` and the resume picker find any run through the catalog. The previous default file, `~/.atomic/workflows/journal.sqlite`, is adopted in place on first use and keeps holding sessions. A run ID that this machine's local storage does not hold now reports `run-not-found` with the command that joins shared storage ([#4325](https://github.com/bastani-inc/atomic/issues/4325))
125
+ - `decisionModel` is the model every decision uses. `model: "auto"` selection for workflow stages and subagents asks its questions through `decide()`, and the `structured_output` tool without its own `model` starts on `decisionModel` (a classifier answers when the result schema is a finite Choice), then its fallbacks and the current chat model. It resolves `decisionModel` as `decide()` does, classifier first: an unregistered or invalid value rejects with `DecisionModelUnavailableError` or `DecisionConfigError` instead of being skipped, and a call that no candidate answers rejects with `DecisionOutputError` or `DecisionProviderError`. With `decisionModel` unset, the tool still uses the current chat model ([#4358](https://github.com/bastani-inc/atomic/issues/4358))
126
+ - A structured decision that overruns its deadline rejects with `DecisionTimeoutError` (`Decision timed out: no answer within its <n>ms deadline …`), and an `AutoRoutingInferenceError` keeps the `DecisionError` that caused it as its `cause` ([#4358](https://github.com/bastani-inc/atomic/issues/4358))
127
+ - The OpenAI Codex provider is shown as "OpenAI Codex" again instead of "OpenAI Codex (legacy)" in `/login`, the model selector and `atomic auth login` (upstream [`36142c1c`](https://github.com/earendil-works/pi/commit/36142c1c7eab1d756e977b5f39149a634cc472ac))
128
+ - Each session and workflow stage keeps its 256 most recently finished tasks in `/tasks` instead of every task it ever ran. A long session that launches thousands of background subagents or shells no longer keeps a record of each one until it closes. Running, queued and stopping tasks, shells whose cleanup is still being confirmed or failed, and finished tasks whose completion notice is still being delivered are always kept, so every notice keeps its task's title, excerpt and output, and a foreground shell still gets no second notice. A `wait`, `kill` or output read of an older finished task reports `Task "<id>" finished and is no longer kept in this session`; its result stays in the conversation, a subagent's transcript stays in its own saved session, and a shell's full output is deleted with its record ([#4385](https://github.com/bastani-inc/atomic/issues/4385))
129
+ - Oversized tool output is saved to a file named by the SHA-256 of its content, so identical outputs share one file, and the result names the digest after the path. A result that reaches an agent released while it waited (a workflow stage or a background subagent), in a session kept in SQLite or libSQL, is stored in the session store with its session and named `tool-output://<sha256>`, so every host that shares the store can read it; see the Added entry for session blobs ([#4309](https://github.com/bastani-inc/atomic/issues/4309), [#4379](https://github.com/bastani-inc/atomic/issues/4379))
130
+ - `redispatchDetachedToolCalls()` reports each call it starts again with a `tool_execution_start` event, delivered to session listeners before it returns, and the call's work can use the session's `ctx` until its first `await`. A workflow stage resumed after a restart asks an interrupted `ask_user_question` again this way, after its session opens, instead of during session recovery ([#4374](https://github.com/bastani-inc/atomic/issues/4374))
131
+ - A released session or subagent keeps less in memory while it waits. The in-memory session store merges a session's appends into a few buffers instead of keeping one per append, so a session of n bytes is held in at most log2(n) + 1 buffers. A detachable tool call that outlives its session no longer keeps a place in that session's tool scheduler, and a released subagent keeps only what delivers its call's result, not the call and its abort controller ([#4403](https://github.com/bastani-inc/atomic/issues/4403))
132
+ - A session released over an in-memory session store (a memory selection: `--no-session`, `ATOMIC_STORAGE=memory`, `{ "memory": true }`, or an SDK `{ kind: "memory" }` store) no longer keeps its history in process memory: `release()` moves it to a file under the agent directory, in `released-history/<host-identity>/<pid>-<start>/`, and keeps only its header; rehydrating reads the file once. Permissions are owner-only 0700 directories and 0600 files on POSIX; Windows inherits the agent directory's ACL. Re-release requests a copy-on-write clone and stages the append before renaming the complete file into place; without reflink support, each re-release still copies the whole previous history. An incremental checksum detects accidental same-length corruption too. Files are removed with their session, when the store's last handle closes, and on process exit, including `process.exit()` from Atomic's signal handlers. Opening an in-memory store or running the session startup sweep on main registers worker-owned directories for cleanup on main-thread exit, including after `worker.terminate()`; importing the SDK alone does not install cleanup. Worker-only stores rely on explicit close, normal worker exit or the next sweep. Killed processes leave plaintext history until a matching startup sweep proves their owner gone by pid and start time. Sweeps are limited to the same hostname, platform/kernel, boot and Linux PID namespace; unknown identities, other namespaces/boots and older host-only layouts are preserved. Missing directories are recreated on later writes, but deleted history cannot be recovered. `--no-session` means no resumable session, not disk-free history ([#4502](https://github.com/bastani-inc/atomic/issues/4502))
133
+ - A `/tasks` agent transcript is now a chat on the same view as an attached workflow stage chat. It opens at the latest message and follows new output; PageUp/PageDown page it, Ctrl+Home/Ctrl+End jump to the first retained message (loading earlier history as needed) and the latest message, and earlier retained history loads as you scroll toward the top instead of when PageUp reaches it. Up/Down, Home/End and `x` are prompt keys there; stop a task with `x` from its detail page, which is now the only page where `x` stops a task. Escape goes back, and so does Left while the prompt is empty. Thinking blocks follow Ctrl+T and tool output follows Ctrl+O, as in the chat ([#4521](https://github.com/bastani-inc/atomic/issues/4521))
134
+ - The **↓ Jump to latest message** row of an attached workflow chat now replaces the last visible row rather than the first, so the first message stays reachable while you are scrolled up ([#4521](https://github.com/bastani-inc/atomic/issues/4521))
135
+ - `ChatSessionHost.handleTaskInput()` returns `false` only for the thinking key an open task inspector leaves to its host; it used to return `true` for every key while an inspector was open. `ScrollableComponentViewport` and `ScrollableChatTranscriptComponent` scroll by `"auto"` wheel steps, one row for an isolated notch and more for a fast spin, instead of a fixed four rows unless given `wheelScrollLines`, and they drop cursor movement, erasing and other CSI control sequences except colors and styles, and control characters other than escape and bell, from the rows they paint ([#4521](https://github.com/bastani-inc/atomic/issues/4521))
136
+ - `atomic intercom restart` reports a broker that is still running 10 seconds after its shutdown request with `IntercomBrokerStopTimeoutError` (`broker-stop-timeout`, retryable) instead of a plain error ([#4538](https://github.com/bastani-inc/atomic/issues/4538))
137
+
138
+ ### Fixed
139
+
140
+ - A workflow stage resumed while a detachable call such as `ask_user_question` waits no longer starts a turn ahead of that call for a delivery its recovery replays, which answered the call as interrupted; the delivery joins the turn the call resumes ([#4391](https://github.com/bastani-inc/atomic/issues/4391))
141
+ - Writers to one SQLite database in different processes no longer leave the write lock idle while others wait. Each waiting writer used to find out that the lock was free by polling, sleeping up to 100 ms between checks, so on a journal shared by pool coordinators, the parent, and workers the lock sat idle most of the time. The writer that releases the lock now wakes the next one in line at once, and transactions requested while a batch waits for the lock join that batch's commit instead of queuing for the lock again. Order stays first come, first served, and writers killed or stopped while holding or waiting for the lock still never block the others ([#4316](https://github.com/bastani-inc/atomic/issues/4316))
142
+ - A workflow root whose children run on local workers no longer keeps every child's checkpoints in the parent process. Each pooled stage session records a checkpoint in the root's journal, and a long-running root held 250,000 to 400,000 of them in memory, which grew the parent's memory and slowed each checkpoint lookup of the root. The parent now keeps the root's own checkpoints and reads a child's from the journal when it needs them: when a resumed root replays or checks that child, when the child's nested runs settle, and when a post-mortem chat or `/workflow status` inspects the root. Resuming a pooled root replays its completed children as before ([#4318](https://github.com/bastani-inc/atomic/issues/4318))
143
+ - Subagents start promptly in a process whose main thread is busy, such as one hosting busy pooled workflow roots. A JSONL session read its header one byte per file read on every write, so a child took about 750 event-loop turns to reach its provider; it now reads the header in one read, writes a new session's model and thinking level together, and opens its session while its resources load, so a child reaches its provider in under 100 turns ([#4319](https://github.com/bastani-inc/atomic/issues/4319))
144
+ - Concurrent sessions on Windows no longer sporadically fail with `StorageUnavailableError` while another process releases their JSONL directory lock. Temporary `EPERM` acquisition failures now retry within a bounded budget; persistent failures retain their cause, and cancellation preserves the caller's reason ([#4319](https://github.com/bastani-inc/atomic/issues/4319))
145
+ - The `ask_user_question` dialog stays responsive while workflows, pooled children and subagents update the screen. Keystrokes are handled ahead of background widget and transcript repaints, and the dialog redraws only when its own state or the terminal size changes ([#4333](https://github.com/bastani-inc/atomic/issues/4333))
146
+ - GitHub Copilot Gemini models keep their reasoning across tool-loop turns, and their reasoning tokens now count toward output tokens and cost. A GitHub Copilot turn that ends with no text and no tool call, as Gemini sometimes returns, is retried as a failure instead of ending the turn. Discovered GitHub Copilot models send strict tool schemas only when the account's list says they support them, and resize images to the per-image size the list gives ([#4324](https://github.com/bastani-inc/atomic/issues/4324))
147
+ - A bash call whose command leaves a process holding its output open, or (on Linux) whose process group is slow to exit on a busy machine, no longer fails with `CleanupFailed: Process-group exit or reader drain was not confirmed`. The tool returns the command's output and exit code, and the task's cleanup shows as `quarantined` while it is confirmed in the background until the session or stage closes; its process permit stays held until then. On macOS, a process group the system still refuses to probe after the drain window fails as before ([#4338](https://github.com/bastani-inc/atomic/issues/4338)).
148
+ - Aborting while a tool runs no longer ends the turn with an error when the next request's credential setup sees the aborted signal; the turn ends as aborted (upstream [#8635](https://github.com/earendil-works/pi/pull/8635))
149
+ - The grep tool's ripgrep search (literal patterns, custom operations, or when native search is unavailable) no longer reads every matched file into memory when `context`, `contextBefore` or `contextAfter` is set, which ran out of memory on large files. Context lines come from ripgrep, so overlapping context prints once, UTF-16 and non-UTF-8 files show correctly, and the match limit notice no longer appears when exactly `limit` matches exist. A fractional `limit` or a huge context value is clamped to a whole number (upstream [#11705](https://github.com/earendil-works/pi/pull/11705))
150
+ - The ls tool with `limit: 0` no longer lists nothing and reports `(empty directory)`; limits below 1 now mean 1 and fractional limits are rounded down (upstream [#11747](https://github.com/earendil-works/pi/pull/11747))
151
+ - On Windows and WSL, `ctrl+v` pastes again: `app.clipboard.pasteImage` defaults to both `alt+v` and `ctrl+v` there, instead of only `alt+v` (upstream [#11780](https://github.com/earendil-works/pi/pull/11780))
152
+ - Dart (`.dart`), Nix (`.nix`), Groovy (`.groovy`) and Gradle (`.gradle`) files are syntax-highlighted in read and write views (upstream [#11790](https://github.com/earendil-works/pi/pull/11790))
153
+ - `atomic config` uses your `keybindings.json`, so remapped list navigation keys work in its selector (upstream [#11788](https://github.com/earendil-works/pi/pull/11788))
154
+ - Truncated grep match lines, codemode output, compaction summaries of tool results, and MCP stderr tails and server summaries no longer cut an emoji or other non-BMP character in half, which left an invalid lone surrogate in the text (upstream [#11757](https://github.com/earendil-works/pi/pull/11757))
155
+ - Extension selectors with more than 10 options show a window of 10 around the selection with a `(selected/total)` indicator, instead of rendering every option and pushing the selection off screen (upstream [#11072](https://github.com/earendil-works/pi/pull/11072))
156
+ - The session tree's "Type to search" line shows a cursor while the tree has focus, like the resume picker's search; the cursor moves to the label input while you edit a label (upstream [#9157](https://github.com/earendil-works/pi/pull/9157))
157
+ - A collapsed paste (`[paste #1 +12 lines]`) in the editor keeps its content when an extension replaces the editor, when an inline extension UI closes, and when queued messages are restored above the draft; before, the draft came back as the bare marker (upstream [#10146](https://github.com/earendil-works/pi/pull/10146))
158
+ - The `/model` selector keeps the model you moved to when its background catalog refresh lands, instead of jumping back to the current model or the top search result; if that model is gone, it falls back as before. The llama.cpp Hugging Face search likewise keeps the result you browsed to when a search finishes (upstream [#11810](https://github.com/earendil-works/pi/pull/11810))
159
+ - Extensions installed through a symlink, such as a pnpm package whose dependencies exist only next to the real file in the store, now load: the entry is imported by its real path, so its imports resolve from there (upstream [#8112](https://github.com/earendil-works/pi/pull/8112))
160
+ - The plan-mode example extension tracks progress more reliably: it reads `[DONE:n]` markers from thinking blocks too, accepts variants such as `[DONE: 1]`, `Done: 2` and "Step 3 is complete", marks every step done when the final message says all steps are complete, keeps whole step text (the widget shortens it for display), keeps steps that start with a backtick, uses only the last `Plan:` section, and delivers the completion card with the next prompt instead of starting another turn (upstream [#7950](https://github.com/earendil-works/pi/pull/7950))
161
+ - Images in steering and follow-up messages, including a prompt sent while the agent is working, are now resized like images in idle prompts instead of being sent and saved at full size (upstream [#11782](https://github.com/earendil-works/pi/pull/11782))
162
+ - An image-only steering or follow-up message leaves the queue once it is delivered, so the pending count and queued-message display no longer keep a stale entry (upstream [#8612](https://github.com/earendil-works/pi/pull/8612))
163
+ - A user `!` command whose earlier output was dropped from the in-memory buffer now reports its output as truncated, with the path of the saved full log, even when the kept tail fits the output limits (upstream [#10165](https://github.com/earendil-works/pi/pull/10165))
164
+ - A symlinked `auth.json` shares one lock with the file it points to, so two Atomic processes that reach the same credentials through different paths no longer refresh the same OAuth token at the same time. Writes replace the real file instead of the symlink, which a write used to turn into a separate regular file (upstream [#11787](https://github.com/earendil-works/pi/pull/11787))
165
+ - Tree navigation can no longer start while a prompt is still running its input hooks, which let navigation rebuild the context under the prompt and drop it. A `session_tree` handler can prompt or navigate again: the selected context is installed before the event, so such a prompt no longer waits for the navigation that is waiting for the handler (upstream [#9155](https://github.com/earendil-works/pi/pull/9155))
166
+ - `atomic mcp list` no longer reports MCP servers with `"auth": { "provider": "<provider>" }`, such as Radius, as needing sign-in while the provider is signed in: it sends the provider's `/login` token and refreshes it when it expired. For these servers the sign-in hint names `/login <provider>`, and `atomic mcp login` and `atomic mcp logout` point to the provider's login and logout instead of failing with "does not use OAuth". A provider token that cannot be read is logged to `mcp.log` (upstream 4d72d05b)
167
+ - When the llama.cpp server cannot be reached, `/login llama.cpp`, `/llama` and the model catalog refresh name the server and the network-level cause, for example `Could not reach llama.cpp server at http://127.0.0.1:8099: connect ECONNREFUSED 127.0.0.1:8099`, instead of only `fetch failed`. The error is a `LlamaServerUnreachableError` (code `server-unreachable`) with the server URL, the cause, and a hint. A request the runtime refuses to send, such as a server URL with a user name and password or a port Node's `fetch` blocks, is a non-retryable `LlamaServerRequestError` (code `request-rejected`) instead, and user names and passwords never appear in the message, fields or serialized cause. In `/llama`, a model action that fails because the server cannot be reached no longer adds an error notification on top of the connection prompt, and a failed Hugging Face request now shows its own error instead of being dropped (upstream [#11779](https://github.com/earendil-works/pi/pull/11779))
168
+ - When a bash command times out after the shell itself exited, because a background process it started kept writing to its output, the error also reports the shell's exit code and when it exited, instead of only `Command timed out after N seconds` (upstream [#11813](https://github.com/earendil-works/pi/pull/11813))
169
+ - Malformed llama.cpp server URLs and URL-like error details no longer stall credential redaction on long inputs. User names and passwords are still removed before errors are displayed or relayed.
170
+ - The grep tool preserves skipped matches as leading context when `offset` pages past them and avoids repeatedly scanning large leading-context windows. The plan-mode example only clears a completed plan after an affirmative final visible reply, not a negated summary or a claim made only in hidden thinking.
171
+ - Settings files are written to a temporary file and renamed into place, keeping their mode and symbolic links, so another Atomic process never reads a half-written `settings.json`, and a killed or out-of-space write leaves the previous file intact. A settings file that cannot be replaced, such as a single file mounted into a container, is still written in place ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
172
+ - An invalid `--storage`, `ATOMIC_STORAGE` or `ATOMIC_PROFILE` selection, or a missing libSQL adapter for the CI profile, now stops startup with one `Error:` line and exit code 1 instead of a stack trace ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
173
+ - llama.cpp chat models remain available for automatic task analysis and structured-output fallbacks when a classifier shares the same model ID ([#4358](https://github.com/bastani-inc/atomic/issues/4358)).
174
+ - On Windows, writers to one SQLite database in different processes keep taking the write lock in turn after the system clock is set, for example by a virtual machine's time synchronization. A running process's own clock could stay seconds off the system clock for up to a minute afterwards, so writers took waiting writers for gone and went ahead of them, or removed their places in line. Writers now judge the queue on the database's clock, which every process shares. A writer waiting for its turn also no longer pauses its process while it reads the queue or writes, refreshes or removes its place in line ([#4387](https://github.com/bastani-inc/atomic/issues/4387))
175
+ - `Ctrl+P` switches to the only model in scope, or the only available model, when the active model is a different one, instead of showing "Only one model in scope". Cycling forward from a model outside the scope now selects the first scoped model instead of skipping it (upstream [#11806](https://github.com/earendil-works/pi/issues/11806))
176
+ - `/reload` and session switches no longer leave extension overlays on screen when more than one `ctx.ui.custom({ overlay: true })` was open: only the topmost overlay was removed, and the others kept focus and input although the extension that opened them was gone. All extension overlays, including hidden ones, are now removed and disposed, newest first; Atomic's own overlays stay open (upstream [#11853](https://github.com/earendil-works/pi/issues/11853))
177
+ - MCP sign-in from `/mcp` or `atomic mcp login` no longer hangs for minutes after a successful browser sign-in, with Ctrl+C doing nothing: Atomic waited for the browser to drop an unused connection to the OAuth callback port before connecting. The callback server now closes remaining connections when it shuts down (upstream [#11311](https://github.com/earendil-works/pi/issues/11311))
178
+ - The resume picker keeps session names readable when a project or session file path is long. In the **All** view, and with paths shown, a path that would crowd out the name is shortened from the start behind `…`, so its last folders and the message count and age stay visible ([#4406](https://github.com/bastani-inc/atomic/issues/4406))
179
+ - `tool_search` and codemode's `searchTools()` find a tool by the property names and descriptions behind a local `$ref`, as in MCP input schemas that put their models in `$defs`; before, a search for a word that appeared only there found nothing. Referenced definitions are read once, so recursive schemas do not loop, and definitions nothing references stay out of the search text (upstream [#11803](https://github.com/earendil-works/pi/issues/11803))
180
+ - The codemode `resolves to` summary of a tool lists the field names behind a local `$ref`, for example `structuredContent?: { results }` instead of `structuredContent?` for MCP output schemas that put their models in `$defs` (upstream [#11803](https://github.com/earendil-works/pi/issues/11803))
181
+ - When `fd` or `ripgrep` cannot be downloaded, the `find`, `grep` and `search` tools now fail with the reason instead of only saying the tool "could not be downloaded": the URL of the request that failed and what went wrong, for example `Could not download ripgrep: resolving the latest release at https://github.com/BurntSushi/ripgrep/releases/latest did not finish within 10000ms`. The startup warning shows the same text. SDK callers get a typed `ManagedToolDownloadError` (code `download-failed`, with `url`, `phase`, `httpStatus` and the underlying error as `cause`) or `ManagedToolTimeoutError` (code `download-timeout`), exported from `@bastani/atomic` with their guards and `isRetryableManagedToolError()` ([#4389](https://github.com/bastani-inc/atomic/issues/4389))
182
+ - `atomic storage consolidate` recovers stale consolidation fences and runs stranded by a crash during cleanup instead of leaving the catalog on a shard missing committed events. Recovery also preserves the selected copy when another consolidation finishes a move in the meantime, and keeps events a concurrent resume writes to the new shard even after that resume releases its lease. A stranded run whose selected copy lacks events the old file holds, for example because resumes wrote to both copies during an interrupted move, is reported as `conflict` and the command exits `1`; both copies are kept ([#4402](https://github.com/bastani-inc/atomic/issues/4402))
183
+ - An SDK host that creates and disposes many sessions no longer keeps the launch details (routing choice, requested model and heartbeat cadence) of the subagents and shells those sessions ran. These details were held process-wide, so each disposed session that had run tasks left up to 256 of each behind, and the total grew with every session. They now belong to the session's own tasks: they go when a task is dropped from the session's 256 most recently finished tasks, when a launch fails, and when the session closes ([#4451](https://github.com/bastani-inc/atomic/issues/4451))
184
+ - A disposed workflow stage session is no longer kept reachable by the stage that opened it: the stage's message admission, the reason it closed its generation and its task host used to hold the first session for as long as the stage lived ([#4309](https://github.com/bastani-inc/atomic/issues/4309))
185
+ - When a tool call's message could not be saved, the call's blocked result is no longer saved either, so a session never holds a tool result without its call ([#4309](https://github.com/bastani-inc/atomic/issues/4309))
186
+ - `read` no longer loads a whole file to show some of its lines, which took several times the file's size in memory and failed on files over 2 GB. It streams plain-text files and keeps only the lines it shows, with the same output as before. Custom `ReadOperations` can stream too by providing the new optional `createReadStream`. A cancelled `read` stops reading and throws `FileToolAbortedError` with the signal's reason as `cause` ([#4353](https://github.com/bastani-inc/atomic/issues/4353))
187
+ - A response cut off by the length limit is continued even when the session store takes longer than 100 ms to record that the cut-off attempt is left out of the model's context. The continuation used to start before that write finished, fail with "Cannot continue from message role: assistant", and end the turn on the partial answer ([#4476](https://github.com/bastani-inc/atomic/issues/4476))
188
+ - Session stores on a libSQL server no longer fail a write when the process stalled mid-transaction (stopped by a signal, starved of CPU) long enough for the server to expire its stream, or when the server timed out or refused it briefly: the write runs again and is saved once ([#4383](https://github.com/bastani-inc/atomic/issues/4383))
189
+ - The Windows installer no longer reports a failed install when Windows briefly keeps the just-verified `atomic.exe` in its temporary download directory locked. It now retries removing that directory for up to 9 seconds instead of about 1 second before it gives up ([#4483](https://github.com/bastani-inc/atomic/issues/4483))
190
+ - Atomic no longer aborts after repeated image reads, reported on macOS arm64 with Node 24.16. Each image resize runs in a worker thread, and the next resize used to start a new worker while the previous one was still shutting down. Image resizes now wait for their worker to stop, which adds about 15 ms per image (upstream [#10695](https://github.com/earendil-works/pi/issues/10695))
191
+ - Prompt template arguments keep apostrophes and no longer merge words: an apostrophe inside a word, as in `doesn't`, no longer opens a quote; a quote with no closing match is kept as text; and `\"` inside `"..."` (or `\'` inside `'...'`) gives a literal quote (upstream [#11861](https://github.com/earendil-works/pi/issues/11861))
192
+ - The grep tool's `glob` is relative to `path` when the search runs through ripgrep (`literal: true`, or custom `operations`), as it already was for the native search: with `path: "repo"`, `glob: "migrations/main/*.js"` returned `No matches found` even though `repo/migrations/main/a.js` exists, because ripgrep matched the glob from the folder Atomic was started in. This also holds when `path` is a symlink. A leading `./` (`./src/*.ts`) is ignored instead of matching nothing, on both search paths, and so is one after a negating `!` on the ripgrep path (`!./dist/**`) (upstream [#11807](https://github.com/earendil-works/pi/issues/11807), [#10998](https://github.com/earendil-works/pi/issues/10998))
193
+ - `ctrl+o` expands and collapses the output of `!` and `!!` commands run while the agent is working. New `!`/`!!` output starts in the current expand state, it no longer disappears when a steering or follow-up message is queued, and it moves into the chat when the agent finishes instead of on the next submitted message. Output still waiting there is no longer carried into the next session after `/new`, `/resume` or `/fork` (upstream [#11875](https://github.com/earendil-works/pi/issues/11875))
194
+ - Resuming a session no longer restores an old thinking level after `/tree` navigated to before a thinking level change. The live thinking level is now recorded on the new branch with the next prompt when the branch implies another one (upstream [#11451](https://github.com/earendil-works/pi/issues/11451))
195
+ - `edit` keeps the line endings of the lines it does not touch. It used to take the first line ending in the file and write the whole file back with it, so in a file mixing LF and CRLF, or with a lone CR inside a line, untouched lines changed. Line breaks in the new text take the ending of the line they replace, and a file that uses only lone CR line endings gets CR instead of being converted to LF (upstream [#8544](https://github.com/earendil-works/pi/issues/8544))
196
+ - `edit` computes its diff and patch before it writes the file, and only around the replaced text, so a small edit of a large file no longer runs out of memory or takes seconds after the file was already written. `details.diff`, `details.patch` and `firstChangedLine` keep their format; in runs of repeated lines a change can be aligned differently, and the patch still applies (upstream [#11751](https://github.com/earendil-works/pi/pull/11751))
197
+ - A `/tasks` transcript shows compaction boundaries, branch summaries and extension notices, also after it is reopened, and shows the compaction status while the agent compacts ([#4521](https://github.com/bastani-inc/atomic/issues/4521))
198
+ - Ctrl+T in an attached workflow stage chat or a `/tasks` transcript changes their thinking display in the default isolated CLI; it used to change only the main chat behind them. A `/tasks` transcript there now opens with the chat's tool-output setting, and Ctrl+O in it changes the transcript's. The task pages opened from the main chat leave only Ctrl+T to it and keep every other key, so keys such as Ctrl+Home on the list or detail page no longer scroll the chat behind them ([#4521](https://github.com/bastani-inc/atomic/issues/4521))
199
+ - An old `routerModel` setting is now migrated to `decisionModel` instead of stopping startup ([#4526](https://github.com/bastani-inc/atomic/issues/4526))
200
+ - Extensions importing legacy `@mariozechner/pi-coding-agent` resolve against Atomic again. Interactive startup skips a broken extension with a warning naming its path and cause; print and standalone RPC modes exit with a named error. Unexpected engine exits restore the terminal before reporting their diagnostic, keeping the reason visible after exit ([#4524](https://github.com/bastani-inc/atomic/issues/4524))
201
+ - Verbatim compaction no longer sends earlier assistant thinking to the compaction model. Some providers refused thinking-heavy sessions with a policy refusal and Atomic fell back to a lossy summary; the compacted transcript and the recent tail appended to the compaction boundary now leave thinking out, as summary compaction already did, while tool results in the recent tail keep their full text. Messages after the boundary and the session file keep their thinking. Compactions from earlier versions still load, and compacting such a session again drops the thinking sections from its earlier compacted text. `serializeConversationForCompaction()` no longer emits `[Assistant thinking]:` sections ([#4544](https://github.com/bastani-inc/atomic/issues/4544))
202
+ - Thinking `off` no longer leaves a model that cannot turn thinking off at its provider's default effort, which is often high. Compaction, branch summaries, fast model routes and other requests with thinking `off` run such a model, for example Claude Opus 5.5 (including its fast mode) or a `github-copilot` Claude or GPT model, at its lowest supported level, and record a `thinking_off_fallback` diagnostic on the reply. `github-copilot` models that can turn reasoning off, such as GPT-6 Luna, and Azure GPT-5.1 and later deployments, which now offer `off`, are now sent that setting. Requests that reach a provider without a reasoning level, such as SDK calls that omit it, now run a model that cannot turn thinking off at its lowest supported level on Amazon Bedrock, OpenAI-compatible Chat Completions (such as OpenRouter) and Mistral, on Azure GPT-5 Pro and o-series deployments, and on Gemini 2.5 Pro, with a `thinking_off_fallback` diagnostic on the reply. These requests used to run at the provider's default effort or send a disabled setting the model does not support. Gemini 2.5 Pro and Azure o-series deployments no longer offer `off`, so a session at `off` uses their lowest offered level. Sessions, subagents and compaction at thinking `off` on Azure GPT-5 Pro, GPT-5.2 Pro, GPT-5.4 Pro, GPT-5.3 Codex Spark and o-series deployments run at the lowest effort the model accepts instead of sending `minimal`, which these models reject, and the thinking level selector offers only the levels they accept. `gemini-pro-latest` is sent a thinking level it supports at every level, including `off`, instead of dynamic thinking ([#4545](https://github.com/bastani-inc/atomic/issues/4545), [#4552](https://github.com/bastani-inc/atomic/issues/4552), [#4556](https://github.com/bastani-inc/atomic/issues/4556))
203
+
5
204
  ## [0.9.72-alpha.1] - 2026-11-08
6
205
 
7
206
  Waiting agents let go of their sessions, work resumes on any machine, and teams share storage with one command.
@@ -4,6 +4,67 @@ All notable changes to the `pi-intercom` extension will be documented in this fi
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.73-alpha.1] - 2026-11-08
8
+
9
+ Intercom connects in every session of a multi-directory process.
10
+
11
+ - **Intercom per agent directory.** A process that starts a second session with a different `ATOMIC_CODING_AGENT_DIR` now connects that session to its own directory's broker, so messaging works in both sessions instead of never connecting ([#4561](https://github.com/bastani-inc/atomic/issues/4561), [#4562](https://github.com/bastani-inc/atomic/pull/4562)).
12
+
13
+ ### Fixed
14
+
15
+ - Fixed Intercom never connecting when one process starts a second session with a different agent directory (`ATOMIC_CODING_AGENT_DIR`): the session now starts and connects to the broker for its own directory instead of finding the first directory's broker and then querying a directory with none ([#4561](https://github.com/bastani-inc/atomic/issues/4561))
16
+
17
+ ## [0.9.72] - 2026-11-08
18
+
19
+ Released subagents stay reachable, and newer sessions replace older brokers.
20
+
21
+ - **Messages reach released subagents.** Sends and asks to a background subagent that released its session are held and delivered once, in order, when it wakes, on this machine or another one that shares the database ([#4326](https://github.com/bastani-inc/atomic/issues/4326), [#4488](https://github.com/bastani-inc/atomic/issues/4488)).
22
+ - **Broker upgrades.** A newer Atomic replaces an older running broker instead of failing, and requests that need a newer broker fail early with a typed error ([#4496](https://github.com/bastani-inc/atomic/issues/4496), [#4538](https://github.com/bastani-inc/atomic/issues/4538)).
23
+ - **Project groups and quieter sends.** With multi-node routing on, sessions join a group for their repository, and queued workflow sends report a `prediction` instead of a warning ([#4320](https://github.com/bastani-inc/atomic/issues/4320), [#4359](https://github.com/bastani-inc/atomic/issues/4359)).
24
+
25
+ **Breaking change:** Read `prediction === "unknown"` from a queued workflow send's result where you read `notInKnownSet`.
26
+
27
+ ### Breaking Changes
28
+
29
+ - A queued workflow send reports how its target relates to the run's stages as `prediction` (`known`, `predicted` or `unknown`) in the send result and the tool's `details`, replacing `notInKnownSet`. Read `prediction === "unknown"` where you read `notInKnownSet` ([#4359](https://github.com/bastani-inc/atomic/issues/4359))
30
+
31
+ ### Added
32
+
33
+ - While multi-node routing is on, a session with no explicit group joins a project group, `project:<owner>/<repo>` from its `origin` remote (the repository or directory name otherwise), instead of `default`, so sessions of different repositories sharing one database cannot see or message each other. Explicit groups still win, joining `default` explicitly warns that every teammate's sessions can address it (a session without a UI, such as a print run or a workflow stage, writes the warning to stderr once per process), and a missing or failing Git inside a repository fails fast with `ProjectGroupError` ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
34
+ - The broker follows `ATOMIC_PROFILE=ci` like `ATOMIC_STORAGE` ([#4320](https://github.com/bastani-inc/atomic/issues/4320))
35
+ - `intercom list` labels future rows the decision model predicted as `predicted <probability>`, `confirmed` or `unused` ([#4359](https://github.com/bastani-inc/atomic/issues/4359))
36
+ - A released subagent stays addressable without a connection: the broker holds sends and asks to it, asks its owner to wake it, and delivers them once each, in the order they were sent, when it is back ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
37
+ - A released subagent's owner can reserve any number of children by name in one call (`reserveReleasedChildren`, in frames of up to 500) instead of one round trip per child, park a child so sends are held without asking the owner to wake it, and confirm a wake (`acknowledgeReleasedChildWake`) so the sends waiting for it are held for up to 120 seconds instead of 20. A frame with an invalid child is refused whole with a typed error that names the child ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
38
+ - A send or ask held for a released subagent on another machine now wakes it on its owner's machine, and the sender's delivery failure carries a `reasonCode` of `recipient_not_restored` (the hold ended while the subagent was being restored or woken) or `recipient_parked` (the subagent is parked and is not woken for a send) alongside the existing text ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
39
+ - `broker_status` reports how many reservations the broker holds, how many sends are waiting on them, and how many released-asker reply routes were dropped at capacity since the broker started ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
40
+ - A released subagent's hold belongs to the session that launched it: the session that reserved it first, or that authorized it as its supervisor, and it keeps the hold after reconnecting with the same Intercom session id. Another session's reserve, drop or wake acknowledgement for that child is refused whole with a `not_owner` `ReleasedChildReservationError` and changes nothing, also across machines with multi-node routing. A child reserved in a `workflow:` group that the session is not a member of is refused with `group_not_allowed`. The released-child errors (`IntercomReleasedChildError`, `ReleasedChildReservationError`, `UnknownReleasedChildError`) carry a `code` from a closed set, can be serialized and rehydrated across processes, and are documented in the Intercom reference ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
41
+ - Sends held for a released subagent go only to the child its owner relaunches, which registers with the supervisor capability that owner issued for it. A session that only shares the child's name and group, or that holds a capability another session issued, receives none of them and does not end the hold. Atomic's `resume` and automatic wakes already register the child this way. An SDK host that relaunches a released child itself must request the child's capability from the owning session's Intercom extension (the `subagent:supervisor-authorization` event) and register the child with it ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
42
+ - A background subagent waiting on an `ask`, or on `contact_supervisor` with `need_decision` or `interview_request`, is released while it waits when its broker uses local routing. Its question stays open: the reply reaches the session that launched it, and the subagent wakes with that reply as the result of its call. Each question takes exactly one reply; a later reply is refused, and the reply is not also queued as an ordinary message. ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
43
+ - With multi-node routing on, a background subagent waiting on an `ask` or `contact_supervisor` question is released too. A question it asked of a session on another node is kept in the shared database, so a reply through any broker reaches the session that launched it and wakes the subagent once, in the order the replier sent its replies, also after a broker restart in between. A later reply to the same question is refused with a typed `ReleasedReplyAnsweredError` (`released_reply_answered`), or `ReleasedReplyInFlightError` (`released_reply_in_flight`, retryable) while another reply is still being handed over; the send result carries the error as `error` and its code as `reasonCode`. A reply that could not be handed over never keeps the question from the next one. An ask that another node's session sent to a subagent that is then released also stays open, and the subagent answers it once it wakes, on any node. Brokers that share one database must run this version: an older broker cannot hand such a reply over ([#4386](https://github.com/bastani-inc/atomic/issues/4386))
44
+ - A request that needs a newer broker than the one the session is connected to, such as keeping released subagents addressable, fails before it is sent with `IntercomBrokerProtocolError` (`broker-protocol-unsupported`) instead of ending the connection ([#4538](https://github.com/bastani-inc/atomic/issues/4538))
45
+
46
+ ### Changed
47
+
48
+ - A queued workflow send to a path outside the run's known stages no longer shows the "not in the workflow's known stage set" warning; the result is a plain `Message queued for <target>`. A path the decision model judged unlikely gets one `No stage named <x> is expected; did you mean <closest>?` line, and the `intercom.showUnknownTargetWarnings` setting restores the old warning. Delivery is unchanged ([#4359](https://github.com/bastani-inc/atomic/issues/4359))
49
+ - A pending workflow-stage route requested after its Intercom runtime ended now fails with `IntercomRuntimeInactiveError` (`code: "intercom_unavailable"`), which workflows treat as a retryable infrastructure fault by its type ([#4327](https://github.com/bastani-inc/atomic/issues/4327))
50
+ - A workflow run's pending-stage route registration that the broker does not acknowledge within 10 seconds now fails with `IntercomPendingStageRouteTimeoutError` (`code: "pending_stage_route_timeout"`), which names the run, how many roster stages the registration carried, the bound and how long it waited, and is still a recoverable broker timeout ([#4376](https://github.com/bastani-inc/atomic/issues/4376))
51
+ - A message a workflow stage's pending-stage delivery hands over after its Intercom runtime ended fails with `IntercomRuntimeInactiveError` too, and stays queued for the stage ([#4391](https://github.com/bastani-inc/atomic/issues/4391))
52
+
53
+ ### Fixed
54
+
55
+ - A reconnect re-authorizes only the subagents that are still running. Children that were released, parked, dropped, reported gone or finished are no longer re-authorized one by one on every reconnect, and waking a child again no longer adds another entry for it ([#4326](https://github.com/bastani-inc/atomic/issues/4326))
56
+ - A session of a newer Atomic no longer fails with `broker-routing-unavailable` when an older version's broker is running. It replaces the older broker with its own, waiting up to a minute for the older process to exit (about 30 seconds on Windows with sessions connected) while sessions of either version wait for the successor, and sessions of the older version reconnect to it under their session IDs and keep exchanging messages with the new ones. Each broker reports the range of Intercom protocol versions it accepts, keeps accepting every request an Atomic 0.9.71 session sends, and never sends such a session a message it does not handle. A broker that cannot be replaced is used on this machine only, with one warning, unless multi-node storage is selected or the broker routes across machines; then the session is still refused with `IntercomRoutingUnavailableError` ([#4538](https://github.com/bastani-inc/atomic/issues/4538))
57
+ - A message a workflow stage's queue delivered is replayed when the stage's session is recovered, such as by a pooled stage's replacement on another host, instead of being deferred or shown only as history because its sender is not connected there ([#4391](https://github.com/bastani-inc/atomic/issues/4391))
58
+ - The intercom broker writes `broker.pid` before its socket accepts connections, so a client that has connected, including one that waited for the broker to answer, always finds the pid file naming the running broker. Brokers that start at the same time take turns, and one that finds a live broker leaves its pid file alone ([#4409](https://github.com/bastani-inc/atomic/issues/4409))
59
+ - A send to a recipient on another broker node that is still saving the message no longer ends uncertain because one of the recipient's progress reports arrived late, as happens when its machine is busy. Once the destination broker has claimed the message, a recipient that misses one report gets one more receipt wait to report, so a claimed recipient on another node that neither confirms nor reports is reported uncertain after about 16 seconds instead of 8, while unclaimed sends and same-node sends still end uncertain after about 8 seconds ([#4443](https://github.com/bastani-inc/atomic/issues/4443))
60
+ - With multi-node routing on, a send that another machine's broker queued for a released subagent is now delivered after its owner's broker or the owner's process was killed, or while that broker could not reach the shared database. Before, such a send could stay queued forever because nothing woke the subagent. The owner's broker now wakes the subagent when the owner holds sends for it again, for example after either restarts, and otherwise within about 30 seconds, and the subagent receives the queued messages once each, in the order they were queued. This holds even when the owner returns after the brokers stopped remembering the subagent's session, seven days after it last connected ([#4401](https://github.com/bastani-inc/atomic/issues/4401))
61
+ - On Windows, an Intercom broker that shuts down, on `atomic intercom restart` or when it retires idle, now exits as soon as it has closed. Before, it could stay alive for about 30 seconds after closing its pipe, and sessions connecting to it in that time waited until their connection timed out ([#4497](https://github.com/bastani-inc/atomic/pull/4497))
62
+ - A workflow run whose Intercom registration races a retiring broker, such as a run resumed just as the broker's idle window ends after its previous process was killed, spawns the replacement broker and registers with it instead of failing with `Intercom broker went away before it registered this session`. A run's route connection now retries like a session's own connection, for up to 10 seconds, and fails with `IntercomBrokerSuccessorTimeoutError` (`code: "broker-successor-timeout"`) only if no broker takes over ([#4496](https://github.com/bastani-inc/atomic/issues/4496))
63
+ - With multi-node routing on, a released subagent whose broker restarted while it ran is woken by the next send to it. Before, when the subagent reconnected to the restarted broker just as it was released, that late registration could end the reservation its owner had just made, so later sends waited for it without waking it ([#4488](https://github.com/bastani-inc/atomic/issues/4488))
64
+ - With multi-node routing on, a send to a released subagent on another machine reaches it when it is sent just as the subagent is released, or arrives while it is being released again. Before, such a send could wait without waking the subagent and fail after 20 seconds with `recipient_parked` ("still being restored after the restart"), or reach it only at the next 30-second check. A send held for a subagent now also reaches it as soon as the wake that restores it registers, instead of at the next outcome check up to 5 seconds later ([#4488](https://github.com/bastani-inc/atomic/issues/4488))
65
+ - With multi-node routing on, one send held during a subagent's release wakes it only once, even when both the sender's broker and the owner's broker notice it. Before, their overlapping checks could restore the child a second time without another message. Later sends and subsequent releases still wake it normally ([#4488](https://github.com/bastani-inc/atomic/issues/4488))
66
+ - With multi-node routing on, a send to a released subagent on another machine that the sender's broker routed while the subagent was still connected, but queued only after it disconnected, now wakes the subagent right away. Before, nothing woke the subagent for it until the owner's broker's next check, up to 30 seconds later. The send still reaches the subagent once, in order, and wakes it only once ([#4512](https://github.com/bastani-inc/atomic/issues/4512))
67
+
7
68
  ## [0.9.72-alpha.1] - 2026-11-08
8
69
 
9
70
  ### Breaking Changes
@@ -66,7 +66,6 @@ import {
66
66
  workflowSendPredictionFields,
67
67
  } from "../workflow-prediction-fields.js";
68
68
 
69
- const BROKER_SOCKET = getBrokerSocketPath();
70
69
  /** How long `connect()` waits for the broker to answer `register`. */
71
70
  export const BROKER_CONNECT_TIMEOUT_MS = 10_000;
72
71
  /** How long an acknowledged pending-stage route registration waits for the broker's answer. */
@@ -128,8 +127,8 @@ function isLostBrokerSignature(error: Error): boolean {
128
127
  * that still answers closed the connection for its own reasons (a refused or malformed registration), so the failure
129
128
  * stays what it was.
130
129
  */
131
- async function classifyRegistrationFailure(error: Error): Promise<Error> {
132
- if (!isLostBrokerSignature(error) || (await isSocketAnswering(BROKER_SOCKET))) return error;
130
+ async function classifyRegistrationFailure(error: Error, socketPath: string): Promise<Error> {
131
+ if (!isLostBrokerSignature(error) || (await isSocketAnswering(socketPath))) return error;
133
132
  return new IntercomBrokerRetiringError(`Intercom broker went away before it registered this session: ${error.message}`, {
134
133
  cause: error,
135
134
  });
@@ -177,6 +176,8 @@ export interface IntercomClientOptions {
177
176
  * refuse one run's route on its own and keep the connection open for the others.
178
177
  */
179
178
  readonly multiplexesPendingStageRoutes?: true;
179
+ /** Broker socket this client connects to; defaults to the one for the agent directory current when it is created (#4561). */
180
+ readonly brokerSocketPath?: string;
180
181
  }
181
182
 
182
183
  export interface ReleasedChildReply {
@@ -372,6 +373,7 @@ export class IntercomClient extends EventEmitter {
372
373
  private readonly preferredSessionId: string | undefined;
373
374
  private readonly acknowledgesReceipt: boolean;
374
375
  private readonly connectTimeoutMs: number;
376
+ private readonly brokerSocketPath: string;
375
377
  /** #3761: the broker of the current registration echoed `acknowledgesReceipt`, so it understands `received`. */
376
378
  private brokerAcknowledgesReceipt = false;
377
379
  /** The broker of the current registration answers a pending-stage route registration that carries a `requestId`. */
@@ -465,6 +467,7 @@ export class IntercomClient extends EventEmitter {
465
467
  this.acknowledgesReceipt = options.acknowledgesReceipt === true;
466
468
  this.connectTimeoutMs = options.connectTimeoutMs ?? BROKER_CONNECT_TIMEOUT_MS;
467
469
  this.multiplexesPendingStageRoutes = options.multiplexesPendingStageRoutes === true;
470
+ this.brokerSocketPath = options.brokerSocketPath ?? getBrokerSocketPath();
468
471
  }
469
472
 
470
473
  private failPending(error: Error): void {
@@ -563,7 +566,7 @@ export class IntercomClient extends EventEmitter {
563
566
  if (attempt.signal.aborted) throw connectAborted();
564
567
  if (!(error instanceof Error)) throw error;
565
568
  if (!isBacklogRefusal(error) || retry >= BROKER_BACKLOG_RETRIES) {
566
- const classified = await classifyRegistrationFailure(error);
569
+ const classified = await classifyRegistrationFailure(error, this.brokerSocketPath);
567
570
  if (attempt.signal.aborted) throw connectAborted();
568
571
  if (expectedRouting?.verify === true && classified instanceof ConnectionClosedBeforeRegistrationError) {
569
572
  throw new IntercomRoutingUnavailableError("unsupported", "register");
@@ -596,7 +599,7 @@ export class IntercomClient extends EventEmitter {
596
599
  this.registrationExpectedRouting = expectedRouting;
597
600
 
598
601
  return new Promise((resolve, reject) => {
599
- const socket = net.connect(BROKER_SOCKET);
602
+ const socket = net.connect(this.brokerSocketPath);
600
603
  this.socket = socket;
601
604
  this.disconnectError = null;
602
605
  let settled = false;