@bastani/atomic 0.9.88-alpha.1 → 0.9.88

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +287 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +57 -0
  3. package/dist/builtin/intercom/index.bundle.mjs +62 -38
  4. package/dist/builtin/intercom/package.json +1 -1
  5. package/dist/builtin/intercom/session-target.ts +15 -3
  6. package/dist/builtin/mcp/package.json +1 -1
  7. package/dist/builtin/subagents/CHANGELOG.md +50 -0
  8. package/dist/builtin/subagents/package.json +1 -1
  9. package/dist/builtin/web-access/CHANGELOG.md +10 -0
  10. package/dist/builtin/web-access/package.json +1 -1
  11. package/dist/builtin/workflows/CHANGELOG.md +117 -0
  12. package/dist/builtin/workflows/README.md +2 -2
  13. package/dist/builtin/workflows/builtin/{chunk-r9xfx5d0.js → chunk-4h4nh4f1.js} +1 -1
  14. package/dist/builtin/workflows/builtin/{chunk-cryf7s3r.js → chunk-jm7redy5.js} +648 -91
  15. package/dist/builtin/workflows/builtin/{chunk-c7bc4ppx.js → chunk-t661k7hd.js} +1 -1
  16. package/dist/builtin/workflows/builtin/goal.js +2 -2
  17. package/dist/builtin/workflows/builtin/index.js +3 -3
  18. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  19. package/dist/builtin/workflows/package.json +1 -1
  20. package/dist/builtin/workflows/src/durable/fork-errors.d.ts +0 -1
  21. package/dist/builtin/workflows/src/durable/journal/internal.d.ts +1 -0
  22. package/dist/builtin/workflows/src/extension/index.bundle.mjs +2515 -1091
  23. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +1092 -98
  24. package/dist/builtin/workflows/src/index.js +1077 -91
  25. package/dist/builtin/workflows/src/local-worker-entry.mjs +1092 -98
  26. package/dist/core/storage/session/session-resume.d.ts +8 -1
  27. package/dist/core/storage/session/session-resume.d.ts.map +1 -1
  28. package/dist/core/storage/session/session-resume.js +22 -3
  29. package/dist/core/storage/session/session-resume.js.map +1 -1
  30. package/dist/core/worktree-snapshot/restore.d.ts +2 -0
  31. package/dist/core/worktree-snapshot/restore.d.ts.map +1 -1
  32. package/dist/core/worktree-snapshot/restore.js +41 -5
  33. package/dist/core/worktree-snapshot/restore.js.map +1 -1
  34. package/dist/modes/interactive/components/jump-to-latest.d.ts +0 -5
  35. package/dist/modes/interactive/components/jump-to-latest.d.ts.map +1 -1
  36. package/dist/modes/interactive/components/jump-to-latest.js +0 -5
  37. package/dist/modes/interactive/components/jump-to-latest.js.map +1 -1
  38. package/dist/modes/interactive/interactive-mode-base.d.ts +1 -0
  39. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  40. package/dist/modes/interactive/interactive-mode-base.js +13 -2
  41. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  42. package/dist/modes/interactive/interactive-render-chat.d.ts +0 -4
  43. package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
  44. package/dist/modes/interactive/interactive-render-chat.js +19 -45
  45. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  46. package/dist/modes/interactive/interactive-startup-chat-container.d.ts +9 -1
  47. package/dist/modes/interactive/interactive-startup-chat-container.d.ts.map +1 -1
  48. package/dist/modes/interactive/interactive-startup-chat-container.js +38 -0
  49. package/dist/modes/interactive/interactive-startup-chat-container.js.map +1 -1
  50. package/docs/keybindings.md +1 -1
  51. package/docs/storage.md +1 -1
  52. package/docs/workflows/api-reference.md +3 -2
  53. package/docs/workflows/operations.md +11 -9
  54. package/npm-shrinkwrap.json +49 -49
  55. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,293 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.9.88] - 2026-11-16
6
+
7
+ Atomic runs on its own libraries, workflows scale out to worker fleets on libSQL or PostgreSQL, and every screen shares one set of keys.
8
+
9
+ **Atomic's own foundation**
10
+
11
+ - **Forked pi libraries.** Atomic now ships its own `@bastani/atomic-ai`, `-tui`, `-agent-core`, `-codemode`, `-schema` and `-telemetry` packages, identifies its requests as Atomic, refreshes models from models.dev and reads `ATOMIC_*` variables. Existing extensions and `PI_*` variables keep working. The Radius provider was removed ([#5174](https://github.com/bastani-inc/atomic/issues/5174))
12
+
13
+ **Interface**
14
+
15
+ - **One set of navigation keys.** Esc only interrupts or closes, ← goes back, `x` twice stops, and `?` shows the keys of every screen. Pickers, `ask_user_question`, the working line, compaction notices, subagent blocks and the workflow graph share one look, and scrolling up pins the prompt you are reading and keeps an accurate count of new messages ([#5224](https://github.com/bastani-inc/atomic/issues/5224), [#5243](https://github.com/bastani-inc/atomic/pull/5243))
16
+ - **Failed stages explain themselves.** Enter on a failed workflow stage shows a short reason with keys to retry it, start a new run from it, or read its transcript and error log ([#5224](https://github.com/bastani-inc/atomic/issues/5224), [#5234](https://github.com/bastani-inc/atomic/pull/5234))
17
+
18
+ **Workflows and worker fleets**
19
+
20
+ - **Worker fleets.** `atomic worker start`, `controller`, `metrics` and `status` join machines to a shared database, autoscale them through command presets for Azure, AWS, Google Cloud, Kubernetes and GitHub Actions or KEDA, share model rate limits across hosts, and ship checkpoints in batches. Pools survive store outages and lock contention without losing children, and idle workers no longer poll the shared store ([#4768](https://github.com/bastani-inc/atomic/issues/4768), [#4803](https://github.com/bastani-inc/atomic/issues/4803), [#5072](https://github.com/bastani-inc/atomic/issues/5072), [#5230](https://github.com/bastani-inc/atomic/issues/5230))
21
+ - **PostgreSQL storage.** The new `@bastani/atomic-storage-postgres` adapter holds sessions, workflow journals, worker pools and Intercom, supports cloud IAM sign-in, wakes hosts through `LISTEN`/`NOTIFY`, claims work in parallel, and runs with a DML-only runtime role after `atomic storage migrate` ([#4793](https://github.com/bastani-inc/atomic/issues/4793), [#5103](https://github.com/bastani-inc/atomic/issues/5103), [#5102](https://github.com/bastani-inc/atomic/issues/5102), [#5218](https://github.com/bastani-inc/atomic/issues/5218))
22
+ - **Large values on libSQL.** Sessions, snapshots and workflow events over a few megabytes are stored in 1 MiB rows, so sqld no longer refuses them. The one-way schema upgrade means every host sharing a store should be upgraded together ([#4954](https://github.com/bastani-inc/atomic/issues/4954), [#4965](https://github.com/bastani-inc/atomic/issues/4965))
23
+ - **Exact workflow budgets.** Every model call, including compaction and a stage's subagents, is charged once, and token and cost caps stop a stage within its turn ([#5053](https://github.com/bastani-inc/atomic/issues/5053))
24
+ - **Durable resumes and forks.** Resumed, forked and pooled runs keep their recorded graph, answers and messages, so they no longer fail with replay mismatches or lose their history ([#4945](https://github.com/bastani-inc/atomic/issues/4945), [#5042](https://github.com/bastani-inc/atomic/issues/5042), [#4871](https://github.com/bastani-inc/atomic/issues/4871), [#5027](https://github.com/bastani-inc/atomic/issues/5027))
25
+
26
+ **Sessions and resume**
27
+
28
+ - **Faster resumes.** Headless resumes start the first turn while the blueprint builds, restores fetch one commit, idle restored worktrees are reused, and `atomic blueprint prebuild` and `cache-key` prepare them ahead of time ([#4748](https://github.com/bastani-inc/atomic/issues/4748), [#5099](https://github.com/bastani-inc/atomic/issues/5099))
29
+ - **Bounded `keepContext` and sturdier compaction.** Protected spans can no longer crowd out a compacted context, compaction moves to its next fallback instead of failing the turn, and resuming a compacted session reads only from its latest compaction without announcing finished tasks again ([#4794](https://github.com/bastani-inc/atomic/issues/4794), [#4977](https://github.com/bastani-inc/atomic/issues/4977), [#5249](https://github.com/bastani-inc/atomic/issues/5249))
30
+ - **Safe concurrent processes.** Settings, credentials, trust, sessions and restored worktrees no longer lose updates or get taken over while their owner still runs, and concurrent restores on Windows no longer fail on a shared lock ([#5193](https://github.com/bastani-inc/atomic/issues/5193), [#5161](https://github.com/bastani-inc/atomic/issues/5161), [#5135](https://github.com/bastani-inc/atomic/issues/5135), [#4971](https://github.com/bastani-inc/atomic/issues/4971), [#4951](https://github.com/bastani-inc/atomic/issues/4951))
31
+
32
+ **Models, tools and agents**
33
+
34
+ - **Steadier model calls.** Overloads and transient 5xx errors are retried instead of skipped, out-of-credit accounts fall back at once, stalled streams hit their deadline, and unsupported images no longer break a session ([#4994](https://github.com/bastani-inc/atomic/issues/4994), [#4918](https://github.com/bastani-inc/atomic/issues/4918), [#4904](https://github.com/bastani-inc/atomic/issues/4904), [#4908](https://github.com/bastani-inc/atomic/issues/4908))
35
+ - **Precise file tools.** `edit`, `write`, `read`, `search` and `find` no longer touch text outside the change or misread paths with brackets, `@` or `:` ([#4893](https://github.com/bastani-inc/atomic/issues/4893), [#4906](https://github.com/bastani-inc/atomic/issues/4906), [#5015](https://github.com/bastani-inc/atomic/issues/5015), [#5177](https://github.com/bastani-inc/atomic/issues/5177))
36
+ - **Subagents in named worktrees.** `worktree: { branch }` runs a subagent on its own branch, and long supervising sessions stay fast with hundreds of finished subagents ([#5202](https://github.com/bastani-inc/atomic/issues/5202), [#5186](https://github.com/bastani-inc/atomic/issues/5186))
37
+ - **Background work that wakes and cleans up.** Heartbeats start a turn in an idle chat, and a background shell's whole process tree ends with it ([#4795](https://github.com/bastani-inc/atomic/issues/4795), [#5057](https://github.com/bastani-inc/atomic/issues/5057))
38
+ - **Live `/reload`.** Reloading runs the code you edited in TypeScript and JavaScript extensions ([#4986](https://github.com/bastani-inc/atomic/issues/4986), [#4988](https://github.com/bastani-inc/atomic/issues/4988))
39
+ - **Intercom from scripts and reliable broadcasts.** Codemode scripts can list and send, and a glob matching several sessions now needs `broadcast: true`. A broadcast reaches every match, even hundreds of sessions, and shows once per session. Asks across brokers and restarts now always get their reply or failure ([#5087](https://github.com/bastani-inc/atomic/issues/5087), [#5202](https://github.com/bastani-inc/atomic/issues/5202), [#5252](https://github.com/bastani-inc/atomic/issues/5252), [#5291](https://github.com/bastani-inc/atomic/pull/5291), [#5297](https://github.com/bastani-inc/atomic/pull/5297))
40
+
41
+ **Security**
42
+
43
+ - **Hardened inputs and outputs.** Messages can no longer control your terminal, credentials are redacted more thoroughly, project workflows and agents load only in trusted projects, and private URLs never reach web fallbacks ([#4889](https://github.com/bastani-inc/atomic/issues/4889), [#4833](https://github.com/bastani-inc/atomic/issues/4833), [#5142](https://github.com/bastani-inc/atomic/issues/5142), [#5127](https://github.com/bastani-inc/atomic/issues/5127))
44
+
45
+ **Breaking change:** `/workflow connect` and `/workflow attach` are removed; use `/workflows` or `/workflows <run-id>` and press Enter on a stage to open its chat.
46
+
47
+ ### Added
48
+
49
+ - Added `readTail(sessionId, fromSeq)`, `readRange(sessionId, startSeq, endSeq)`, `findLatestCompaction(sessionId, leafId?)`, `readResume(sessionId, leafId?)` and `findEntrySeq(sessionId, entryId)` to `SessionStore`, implemented by the SQL (SQLite, libSQL and PostgreSQL), JSONL, legacy and memory stores and checked by the session store conformance suite, with their `SessionTail`, `SessionEntryRange`, `SessionCompactionPoint`, `SessionResume`, `SessionRecoveryState` and `SessionHistoryTotals` types exported from `@bastani/atomic/storage`. A custom store without `readResume` keeps working and resumes sessions whole. Range reads carry sequence positions and a generation token so replacing a session cannot mix its old and new histories. `create` and `replace` may resolve the new generation's `epoch`, and a memory, JSONL or SQL write carrying an older generation's `epoch` is refused even when the sequence count matches. `SessionRecoveryState.deliveryOpIds` lists the pooled workflow deliveries a session already took. `SessionManager.open(store, id, cwd, { history: "tail" })`, `openSessionById` and `continueRecent` open a compacted session from its latest compaction, and `hasFullHistory()`, `loadFullHistory()`, `forEachStoredEntry()` and `getOmittedHistoryTotals()` read and report the rest. `AgentSessionRuntime.switchSession(id, { history })` and `rehydrate(id, { history })` take the same option and read the whole history by default; `getUserMessagesForForking()` throws `SessionHistoryNotLoadedError` until a tail-opened session's history is loaded ([#5249](https://github.com/bastani-inc/atomic/issues/5249))
50
+ - Added `AgentSession.getPersistenceFailure()`: after a run stopped because a message could not be saved, it returns the storage error and the messages the session holds in memory but could not save, so a caller can report them ([#5210](https://github.com/bastani-inc/atomic/issues/5210))
51
+ - Added `modelCallUsage(event)`, which returns the usage of the one model call a session event reports (an assistant response, a compaction request, a child session's call, or a `usage` entry such as cache warming), or `undefined` for any other event ([#5053](https://github.com/bastani-inc/atomic/issues/5053))
52
+ - Added `AgentSession.stopTurns(reason)`: while a reason is set, the session starts no further model call within a turn. Each tool call is answered as cancelled with that reason, and the run ends without polling steering or follow-ups, which wait for the next prompt. `stopTurns(undefined)` resumes normal turns. Workflow budgets use it to stop a stage at its cap ([#5053](https://github.com/bastani-inc/atomic/issues/5053))
53
+ - Added the `child_session_usage` session event: a session reports each model call of a child session it created through its child session options, such as an in-process subagent, and of that child's own children, so an integration can charge a session's subagents' spend ([#5053](https://github.com/bastani-inc/atomic/issues/5053))
54
+ - Codemode scripts can call `intercom` with `list`, `status`, `pending`, and `send` to an exact target, each resolving to a structured value, so a script can filter a long session list or send computed messages to several sessions in one turn. Other Intercom actions and pattern targets stay model-only. Extensions can offer the same to their own model-only tools with the new `ToolDefinition.scriptAccess` ([#5087](https://github.com/bastani-inc/atomic/issues/5087))
55
+ - Added the `compaction_usage` session event: each compaction model request (planner, classifier, summary fallback, and their retries) reports its usage as it returns, for foreground and background runs and runs that later fail, so an integration can charge every compaction request once ([#5053](https://github.com/bastani-inc/atomic/issues/5053))
56
+ - `AgentSession.resumeDetachedTurn` takes an optional `onRecorded` callback, told the ids of the results it recorded as soon as they are saved and before the turn continues, so a caller holding them elsewhere can let them go even if the continued turn never ends ([#5012](https://github.com/bastani-inc/atomic/issues/5012)).
57
+ - Added `AgentWakeSlot`, the third argument of an `AgentWakeDispatcher` handler: `slot.outside(wait)` frees the handler's `maxConcurrent` slot while `wait` settles and takes it back in turn, so a handler waiting on something else does not hold up other keys ([#4856](https://github.com/bastani-inc/atomic/issues/4856))
58
+ - Added resume and capture timings ([#4748](https://github.com/bastani-inc/atomic/issues/4748)). `/session snapshot` now shows how long each checkout's last capture took and a **Last resume** block: each restored checkout with its restore phases (fetch, reconstruct, materialize, LFS, verify, publish), each blueprint step with its duration, and when the session was ready. `ATOMIC_TIMING=1` prints the same lines for `atomic --session`. Blueprint step logs record when each step started and finished and how long it ran. The session keeps the numbers in a `resume_timings` entry, readable from exports and through `latestResumeTimings()` and `formatResumeTimings()` in the SDK. A failure to record them never stops a resume.
59
+ - Added `resume.waitForBlueprint`, a setting that lets a resumed session's first turn start while the blueprint build of its restored worktrees still runs. With `"tools"`, the first request goes out once the worktrees are restored; every tool call waits for the build, and the first of them reports how it went. A failed build releases them with the usual warning, and interrupting the turn stops only the wait. `"prompt"` waits for the build before the session opens ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
60
+ - `atomic blueprint cache-key [dir] [--format text|json|github-output]` prints a key, a restore prefix and the paths of each cache entry worth keeping between CI runs, for `actions/cache`: the package stores detected from the repository's lockfiles (npm, pnpm, Yarn, Bun, Cargo, uv, pip, Poetry, Go, Gradle, Maven), extra store and build paths from the new `resume.cache` setting, Atomic's Git object store and its extension transpile cache. `.atomic/blueprint.yaml` keeps Devin's format and declares no caches. Paths that could hold credentials are left out with a warning, and an invalid `resume.cache` entry never fails the command ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
61
+ - Added `atomic worker start`, which joins a machine to a shared libSQL / Turso workflow database as a worker host in one command: `--db <url> --token-file <path>` select the database for that process only, `--slots` defaults to half the CPUs (1 to 16), `--label`, `--prefix`, `--host-id`, `--no-restore`, `--idle-exit <ms>` and `--json` (one JSON event per line) are optional. SIGTERM or SIGINT drains and exits 0, a second signal stops at once and exits 2, and incomplete setup lists every missing piece and exits 1. The token is never printed or logged. A host that loses the database keeps its running children, reports `degraded`, and retries with backoff. `atomic worker status` lists the registered hosts and each root's queue. The new [Running workers on many machines](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/guides/worker-hosts.md) guide has a systemd unit, a cloud-init recipe and a container image ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
62
+ - A session resume now reuses an idle worktree of the same repository that an earlier resume restored, instead of restoring a new one: Atomic resets its tracked files to the snapshot and keeps ignored dependency and build folders such as `node_modules`, `target` and `.venv`, so the blueprint's maintenance has little to rebuild. Only a worktree that no open session holds and that holds nothing its snapshot did not record is reused; its previous session gets a fresh worktree on its next resume and loses nothing. Any other case restores a new worktree as before, and `/session snapshot` shows a reused worktree as `(claimed)` ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
63
+ - Added the `workflows.workers` setting: `{ "placement": "shared" }` gives roots that `/workflow run` starts shared placement, so worker hosts on other machines run their pooled children without the SDK ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
64
+ - Added `atomic worker controller --provisioner <module>`, which adds worker hosts through a provisioner module as the shared queues grow and drains and removes idle ones, with `--min-hosts`, `--max-hosts`, `--workers-per-host`, `--scale-up-queue-depth`, `--scale-up-delay`, `--idle-drain` and `--boot-timeout`. Several controllers can run; one is active at a time and another takes over when it stops. `atomic worker start` hosts report `ATOMIC_PROVIDER_ID` and print `drain-requested` when a controller drains them. See [Scale the fleet automatically](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/guides/worker-hosts.md#scale-the-fleet-automatically) ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
65
+ - Added `atomic worker metrics`, which serves the fleet's scaling signal over HTTP for any autoscaler: `/metrics` in Prometheus text and `/scaling` as JSON for a KEDA `metrics-api` trigger, so KEDA on AKS, EKS or GKE scales worker pods from zero with no Atomic code in the cluster. It serves counts only, reads the database at most every 5 seconds and never writes. `atomic worker status` prints the same signal, as `scaling` with `--json`; both take `--min-hosts`, `--max-hosts` and `--workers-per-host` ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
66
+ - Added command provisioners to `atomic worker controller`: `--provisioner fleet.json` runs your own up, down and list commands, and presets for Azure scale sets, AWS Auto Scaling groups, Google Cloud managed instance groups, Kubernetes Deployments and GitHub Actions ship in `examples/worker-fleet`, with a container image, a Helm chart with KEDA, Terraform for each cloud and a GitHub Actions workflow. The guide gives the least-privilege role for each. See [Scale the fleet automatically](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/guides/worker-hosts.md#scale-the-fleet-automatically) ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
67
+ - `atomic worker status` and `/workflow status` now show fleet status: each worker host as `busy`, `idle`, `draining`, `degraded` or `stale`, with its busy workers out of its slots and its last heartbeat, the queue across every running shared root, and the shared database's state. `atomic worker status --json` prints the same as `host.stats()`. Status never waits more than 5 seconds on a database that stops answering: it reports it degraded and exits 1, reports a database that answers reads but commits no write as degraded, and names the sqld bug [tursodatabase/libsql#2286](https://github.com/tursodatabase/libsql/issues/2286) and its `--checkpoint-interval-s` workaround ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
68
+ - Added `atomic blueprint prebuild [dir] [--park] [--approve]`, which builds a trusted repository ahead of time: it restores the committed `HEAD` into a restored worktree, runs the blueprints' `initialize` and `maintenance`, and leaves the worktree idle, so the next resume of a session of the repository claims it with its dependencies and build output in place. With `--park`, the build paths of the `resume.cache` setting move into the seed directory that the `build` cache entry of `atomic blueprint cache-key` saves; a resume on another machine that restored those caches and has no idle worktree adopts the parked output into a worktree at the same path, then claims it, and `/session snapshot` shows it as `(seeded)`. Ignored and untracked files such as `.env` never reach the prebuilt worktree, a failed build keeps earlier worktrees and seeds, and any problem with a seed falls back to a fresh restore. HTTPS remotes and SSH remotes of the `git` user that hosting services use are now compared by host and repository path, so SSH and HTTPS checkouts of one repository share restored worktrees, Git object stores and cache keys; worktrees and stores created before keep working. A restore into a path whose earlier worktree survives only in a restored Git cache no longer fails ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
69
+ - `atomic storage join` and `atomic worker start|status|controller --db` accept `postgres://` and `postgresql://` URLs, which select `@bastani/atomic-storage-postgres`, with exactly one of `--password-file` (copied to a private file, mode 600), `--token-file` (referenced in place and read again for every new connection) or `--auth azure|aws|gcp`. A password in the URL is refused and settings hold only a file reference. `atomic storage status` shows a PostgreSQL selection by its server, without user name or parameters, and its check reports the server version. `atomic storage export` and `atomic storage import` take `--storage <json>` or `--storage-file <path>` to name the storage they read or write, including a shared database, so runs and sessions can move from one store to another ([#4793](https://github.com/bastani-inc/atomic/issues/4793))
70
+ - The `github-actions.json` worker fleet preset now authenticates `gh` as a GitHub App: `atomic worker controller` mints a one-hour installation token limited to **Actions: write** on your repository and renews it before it expires, so no long-lived token is needed. A fine-grained token or, inside Actions, the workflow's `GITHUB_TOKEN` still works. The worker fleet recipes now use each platform's own identity instead of stored keys: managed identities on Azure, IAM roles on AWS, service accounts on Google Cloud, a ServiceAccount with optional workload identity and controller RBAC in the Helm chart, and GitHub OIDC in the Actions workflow, which reads the database token from your cloud's secret manager. See [Credentials for each platform](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/guides/worker-hosts.md#credentials-for-each-platform) ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
71
+ - Added `SqliteBatchOptions` to the storage SDK. `SqliteDatabase.batch(statements, { lockWaitMs, priority })` lets a batch wait out a busy write lock with randomized retries, and lets small writes such as lease renewals go ahead of the database's queued calls. Drivers given to `createSqliteDatabase` receive the options in their `batch` ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
72
+ - Added `isPathInside(parent, child)` to the SDK exports: it tells whether a path is its parent or inside it, and treats a child named like `..cache` as inside ([#4836](https://github.com/bastani-inc/atomic/issues/4836))
73
+ - Added `boundOversizedText()` to the extension API: it bounds text an extension adds to the model's context the way oversized tool results are bounded, saving longer text to a session file and returning a short preview with its path ([#4907](https://github.com/bastani-inc/atomic/issues/4907))
74
+ - Exported `sliceHead` and `sliceTail` from the SDK: they cut a string to at most a number of UTF-16 code units without splitting a surrogate pair ([#5097](https://github.com/bastani-inc/atomic/issues/5097))
75
+ - The storage SDK's `StorageDialect.lockClause` takes `"key-share"` (`FOR KEY SHARE` on PostgreSQL), and a driver given to `createSqliteDatabase` can set `pipelinedTransactions` to receive a transaction's calls without waiting for each answer, with the commit sent behind them ([#5102](https://github.com/bastani-inc/atomic/issues/5102))
76
+ - `atomic worker start`, `status`, `metrics` and `controller --db postgres://…` now serve and report worker pools on PostgreSQL, so a fleet can share one managed PostgreSQL database instead of libSQL. The storage SDK's `StorageDialect` gains `identifier()` and `maxIdentifierBytes`, which shorten a PostgreSQL name longer than 63 bytes to its head and a hash of the whole name instead of letting the server truncate it, and `jsonObject`, `jsonArray`, `jsonGroupArray`, `jsonIndexText`, `isNotDistinct`, `foreignKeysCheck`, `abort` and `types.rowKey` for stores that run on both engines. `POSTGRES_STORAGE_IDENTIFIER_SUFFIXES` lists the worker pool's names too, `POSTGRES_HASHED_STORAGE_IDENTIFIER_SUFFIXES` its longer trigger names, and `POSTGRES_POOL_SESSION_PREFIX` the prefix its pooled-stage sessions use; a pool's session prefix is checked against the PostgreSQL prefix limit as the prefix the user chose ([#4793](https://github.com/bastani-inc/atomic/issues/4793))
77
+ - The storage SDK's `SqliteDatabase` and `SqliteDriver` gain optional `notifications` (`notify`, `listen`, `state`), which the PostgreSQL adapter provides through `LISTEN`/`NOTIFY` so stores can wake other processes when a transaction commits, and `atomic storage status` reports for a PostgreSQL selection whether wake-ups arrive or work is found by polling alone, and why ([#5103](https://github.com/bastani-inc/atomic/issues/5103))
78
+ - Added `setProviderRequestGate()`, which makes every model request of the process wait on a limit kept elsewhere after the process's own cooldowns admit it. Workflow worker pools use it for fleet-wide rate limits ([#4768](https://github.com/bastani-inc/atomic/issues/4768)).
79
+ - RPC clients receive an `extension_ui_request` with `method: "cancel"` and the original dialog's `id` when a select, confirm, input, or editor request times out or its caller aborts it. Clients should close that dialog without sending a response.
80
+
81
+ ### Changed
82
+
83
+ - Resuming a compacted session reads only its latest compaction's kept messages, what came after them, and the earlier entries that hold the session's state (name, labels, model and thinking-level changes, worktree snapshots, usage records and extension state), instead of its whole history. This applies to `atomic --session`, `--continue`, `/resume`, subagent and workflow stage resumes and forked stage sessions; footer and `/session` totals still cover the whole session, and `/tree`, `/fork`, `/clone`, `/export`, `/share` and `/session` read older entries when opened. `atomic --session` for a session recorded in another directory no longer reads its whole history twice before opening it. An older session needs a one-time metadata scan to build its index; JSONL stores cache their offsets in a checksummed `.idx` sidecar that can be deleted safely. Settled delivery cards and superseded child records no longer load on resume, and abandoned branches load only when requested. Compacting a resumed session counts the earlier history's lines in pages without keeping it in memory, and a session that recorded thousands of worktree snapshots resolves each checkout's path once instead of once per snapshot. An extension Atomic does not bundle still sees the whole history ([#5249](https://github.com/bastani-inc/atomic/issues/5249))
84
+ - The main composer names the session in its top rule, and its footer line shows the bound interrupt key while working and `? keys`. `?` on an empty prompt opens a key overview ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
85
+ - The working line shows how long the agent has been working and its output tokens so far, after Atomic's `∀` spinner: `∀ Working… (2m 14s · ↓ 18.4k tokens)`. Each run starts a fresh meter, and elapsed time still updates with reduced motion ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
86
+ - Compaction shows Atomic's still `∀` logo mark with its elapsed time and cancel key (`∀ Compacting context… (12s · esc to cancel)`), and leaves one line in the chat: `∀ Context compacted · 182k → 31.0k tokens · ctrl+o for summary`. Opening a chat during compaction preserves its elapsed time ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
87
+ - A background subagent's completion notice shows the first line of its result under `⎿`, with the rest behind the expand key; a shell's notice keeps its last three lines ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
88
+ - When you scroll up, the pill above the composer reads `↓ jump to bottom · ctrl+end`, or `↓ N new messages · ctrl+end` once new output arrives, in the main chat and in subagent, stage and `/tasks` transcripts. Status updates and loading earlier history do not count as new messages. While you are scrolled up, the first line of the prompt that started the turn you are reading stays pinned at the top, marked `↑`, with smooth scrolling even in long conversations ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
89
+ - A subagent's chat no longer shows a `working` line below the prompt while the subagent works; the footer shows only its extension status and task rows until the subagent is idle and its model line returns. The same applies to the main and stage chats while the `/tasks` picker is open over a running turn
90
+ - A resume without a UI now starts the first turn while the blueprint build of a restored worktree runs. `atomic -p`, `--mode json` and `--mode rpc` with `--session`, `--continue` or `--resume`, an RPC `switch_session`, and an SDK `createAgentSession` with a recorded session send the first request once the worktree is restored instead of after the build: on Atomic's own repository the first request now goes out after 10–14 s instead of 50–53 s, and after 3 s instead of 17 s when an idle pooled worktree is claimed. Every tool call and shell command in the restored worktree waits for the build, also in a session opened there later, so nothing runs in a half-built environment, and a failed build releases them instead of blocking. The build's warnings are shown once: on stderr with `-p`, and as a `blueprint_build_finished` event with `--mode json` and `--mode rpc`. `-p` and `--mode json` exit once the build has ended; a signal (Ctrl-C included, exiting 130), or RPC's stdin closing, stops the build's processes and the next resume builds the worktree again. Switching back to a session whose build still runs joins that build instead of starting a second one, and a resume after Atomic was killed during a build stops that build's leftover processes before building again, only when it can confirm they are that build's, and otherwise warns; it waits at most five minutes for another process still building the same worktree. The interactive TUI keeps waiting for the build, and a `resume.waitForBlueprint` setting always wins: set it to `"prompt"` to keep the old behaviour ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
91
+ - `<keepContext>` protection now has a budget, so protected spans can no longer crowd out the rest of a compacted context. Compaction always succeeds and never grows because of `keepContext`. When spans fill more than `compaction.keepContextShare` (default `0.5`) of the keep target, compaction releases whole spans until the rest fit: older duplicates first, then the oldest spans, then the 3 most recent spans, then spans in the latest user message. A released span is compacted like other lines and is never cut partway. Results report them as `releasedRanges` with a `duplicate` or `budget` reason, and the compaction notice shows how many were released. Released spans and tags in tool results now reach Morph without their tags, so Morph no longer force-keeps them. While spans fit the budget, nothing changes ([#4794](https://github.com/bastani-inc/atomic/issues/4794))
92
+ - A resume restore that needs a commit this machine lacks now fetches only that commit (`--depth=1`) instead of the repository's whole history, which roughly halves a cold restore of a long-lived repository; it fetches the full history when a remote refuses a shallow fetch or the restore needs older commits. Restored worktrees therefore start with a shallow history (`git fetch --unshallow origin` brings the rest). A session's other checkouts are now restored concurrently, up to four at a time, instead of one after another ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
93
+ - A session resume now restores each checkout into a worktree at a stable path, `~/.atomic/agent/worktree-snapshots/worktrees/<repository>-<n>`, that the session holds while it is open. Resuming the session again continues there, and a session never continues in a worktree another session now owns; it gets a fresh one instead. The new `snapshots.pool.maxIdlePerRepository` setting (default `2`) bounds how many idle restored worktrees of a repository are kept: a resume that restores another removes the oldest unchanged ones. Workflow runs and SDK restores into a chosen directory keep their paths ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
94
+ - Per-turn worktree snapshots are cheaper in fresh clones such as CI checkouts: each checkout's captures keep a private Git index between turns under `~/.atomic/agent/worktree-snapshots/capture-index/`, so unchanged files are no longer read again on every turn, and staged ignored files are found with one listing. A capture that cannot use that index captures as before, and snapshots record the same content ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
95
+ - A session resume that restores a checkout using Git LFS into a fresh worktree now downloads its LFS objects after the worktree is restored, alongside the session's other restores and blueprint builds, instead of holding every build back until it ends. Only that checkout's own blueprint waits for its download, and at most two downloads run at once. With `resume.waitForBlueprint: "tools"`, the first prompt no longer waits for the download at all; tools wait for it as they wait for the build. A download that fails still leaves the files as pointers with the same warning, which now comes with the build's notices, and the resume goes on. A download cut off because Atomic stopped is finished by the session's next resume before that checkout's blueprint runs ([#5099](https://github.com/bastani-inc/atomic/issues/5099))
96
+ - Atomic no longer depends on pi's npm packages. Its AI, TUI, agent-core, codemode, schema and telemetry libraries are now its own forks of pi 1.5.2, published with every release as `@bastani/atomic-ai` (formerly `@bastani/pi-ai`), `@bastani/atomic-tui`, `@bastani/atomic-agent-core`, `@bastani/atomic-codemode`, `@bastani/atomic-schema` and `@bastani/atomic-telemetry`. Extensions should import the new names. Existing extensions keep working unchanged: imports of `@earendil-works/pi-*`, `@mariozechner/pi-*` and `@bastani/pi-ai`, including their subpaths, resolve to the same host modules. Codemode, schema and telemetry are now host-provided too, so declare them as `peerDependencies` with a `"*"` range instead of bundling them ([#5174](https://github.com/bastani-inc/atomic/issues/5174))
97
+ - Terminal and prompt-cache environment variables have `ATOMIC_*` names: `ATOMIC_CACHE_RETENTION`, `ATOMIC_OAUTH_CALLBACK_HOST`, `ATOMIC_TUI_ESC_TIMEOUT`, `ATOMIC_HYPERLINKS`, `ATOMIC_IMAGE_PROTOCOL`, `ATOMIC_TRUE_COLOR`, `ATOMIC_PROGRAM_STATUS`, `ATOMIC_TUI_WRITE_LOG`, `ATOMIC_TUI_DEBUG` and `ATOMIC_TUI_DEBUG_REDRAW`. The `PI_*` names keep working when the `ATOMIC_*` name is unset. The legacy-extensions warning now links to Atomic's extension docs ([#5174](https://github.com/bastani-inc/atomic/issues/5174))
98
+ - `/share` links now open `https://bastani.ai/session/#<gist id>` instead of pi.dev. `ATOMIC_SHARE_VIEWER_URL` still overrides the viewer ([#5174](https://github.com/bastani-inc/atomic/issues/5174))
99
+ - Model catalog refreshes now download models.dev's public catalog (`https://models.dev/api.json`) instead of pi.dev's, and map it with the same transform that builds the bundled catalog. One download serves every provider, refreshes run at most every four hours or on `atomic update --models`, and the bundled catalog stays in use when the download fails. Set `ATOMIC_MODEL_CATALOG_URL` (or the SDK's `catalogBaseUrl`) to use a mirror ([#5174](https://github.com/bastani-inc/atomic/issues/5174))
100
+ - One set of navigation keys everywhere: Esc only interrupts, cancels, closes a dialog or deselects and never leaves a chat; ← on an empty prompt goes back one level; lists use ↑↓, Enter or →, and `x` pressed twice within 3 seconds to stop (once to dismiss a finished row); `?` shows the current screen's keys; Ctrl+X Ctrl+K pressed twice stops every background subagent and workflow run. In a subagent's chat, Esc now interrupts the subagent's current turn instead of leaving, and the subagent waits for your next message. In `/tasks`, Enter or → opens a task's chat directly and Space opens its detail page; ← at the start of a typed prompt leaves and keeps the draft; Ctrl+X Ctrl+K also stops background shells and works from any view; a finished subagent's chat stays live and a message resumes it, while one stopped for good is read-only; stopping a subagent from `/tasks` or with Ctrl+X Ctrl+K keeps it resumable (its chat reads `Stopped · send to resume`), and an item that finishes between the two presses of `x` is never dismissed by the second one. **Migration:** `app.tasks.inspect` and `app.tasks.cancel` in `keybindings.json` become `app.list.open` and `app.list.stop` automatically; stopping a task no longer asks for `y`, press `x` again instead; use Space where Enter opened a task's detail page ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
101
+ - Pickers share one look: a title, a `⌕` search box where typing filters, a `❯` marker on the selected row, `●` on the current value, dim descriptions, right-aligned tags such as `current` or `saved`, `↑ N more` / `↓ N more` indicators, and one hint line that lists exactly the keys that work. `/model`, the theme, `/thinking`, show-images, `/trust`, `/login` and `/logout`, `/scoped-models` and extension `select` and `confirm` dialogs use it. In `/model`, ←→ set the reasoning level the selected model is picked at, saved like a level set with `/thinking`. Esc clears a search before it closes a picker; in `/scoped-models` the rows show `[✓]` checkboxes and the enabled count sits under the title. Pickers without a search box keep `j`/`k`, and `/trust` adds digits to choose a row. Pickers reuse unchanged rendering and model search metadata to avoid repeated formatting in large catalogs. Filtering previews the newly selected theme even when its row number stays the same, and clicking a disabled row or an open key overlay never chooses another row ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
102
+ - `ask_user_question` sits in a rounded frame. Several questions show as steps on one line (`Navigation ── Packaging ── Review`) with the current one counted `n/m`. Multi-select descriptions line up under their labels and **Next** is numbered. Previews stay beside the options down to a 68-column terminal, so an 80-column terminal keeps the side-by-side layout. One hint line lists the keys of each step, the review included, and shortens its descriptions in narrow terminals so cancellation stays visible. In the transcript, the answers read one line per question (`Navigation → Build it as shown`), notes after the answer, and a declined questionnaire shows the options that were offered. Failed questionnaires keep their error message instead of appearing declined, and HTML exports retain the one-line answers. Extension confirmations number **Yes** and **No**, so `1` or `2` answers them ([#5224](https://github.com/bastani-inc/atomic/issues/5224))
103
+
104
+ ### Fixed
105
+
106
+ - Fixed a prompt typed during startup being lost when Atomic asked whether to trust the project folder, as it does on a first start in a folder with `.atomic` resources. Text typed before the trust question is no longer discarded, and text typed into the question no longer vanishes. Both now wait in the prompt as a draft in the order you typed them, with the notice "Your earlier input is in the prompt; press Enter to send it.", and nothing is sent until you press Enter. Without a startup question, text typed during startup is still sent as before.
107
+ - Fixed keys meant for the prompt answering the startup trust question. The question used to open on **Trust**, so a prompt's Enter could trust the project without the user noticing. It now opens on **Do not trust (this session only)**. If you were already typing an unfinished prompt when it appeared, or type text into it, Enter does nothing until you pick a choice with ↑ or ↓, and a notice says your text is kept as a draft.
108
+ - Fixed text typed during startup being lost, or answering a question by accident, when another startup screen took the terminal: first-time setup, the deprecation notice, the resume picker, the "fork this session" question, the dirty-checkout question and the missing-folder question. What you typed before a screen appeared, and text typed into a screen that does not use it, now waits in the prompt as a draft. Those choice screens ignore Enter after typed text until you pick with ↑ or ↓. Text typed while a screen opens or closes, including during first-time setup's color detection and immediately after an answer, also stays in the draft. An unfinished prompt's Enter cannot select a session or submit an empty startup input; first navigate with ↑ or ↓, or type into that screen. The fork question requires an explicit yes or no after unfinished or non-answer text, ignores blank lines after unfinished or non-answer text, and preserves text sent immediately after a valid answer. Concurrent extension startup questions appear one at a time and close when cancelled or timed out.
109
+ - On Windows, a resume or blueprint build that follows an interrupted build no longer lists every process of the machine when no step of that build recorded when it started. The list, which takes about a second, is used only to find what such a step left running, and it found nothing for steps without a recorded start ([#4748](https://github.com/bastani-inc/atomic/issues/4748)).
110
+ - On Windows, Atomic no longer stalls while it creates its private temp directories. It checked the owner and access list of every new directory, and of the directories above it again, with a PowerShell subprocess that held the main thread; on a busy machine each check took seconds, up to 30 s. It now checks each private root once per process, and a directory created inside a checked root needs no check of its own. A root that another account owns or can enter is still refused, and so is one recreated at the same path ([#4640](https://github.com/bastani-inc/atomic/issues/4640))
111
+ - On Windows, an interrupted or busy blueprint build no longer fails with `EPERM`, `EACCES` or `EBUSY` when `atomic blueprint prebuild --park` moves build output into the seed directory or when a blueprint `uses:` step moves a fetched action checkout into its cache while another handle briefly holds the directory ([#4748](https://github.com/bastani-inc/atomic/issues/4748), [#4588](https://github.com/bastani-inc/atomic/issues/4588))
112
+ - A fast foreground shell command run under resource admission, such as in an admitted workflow stage, no longer delivers a stray `Background shell completed` notice or starts an extra model turn when the command finishes before its process permit finishes binding ([#5281](https://github.com/bastani-inc/atomic/pull/5281))
113
+ - In the default isolated interactive mode, an extension's `ctx.ui.custom()` component or component-factory widget now sees the host's renderer as `tui.mode`: `"fullscreen"` on the alternate screen and `"regular"` on the main-screen fallback. It always saw `"regular"`, so a component that sized itself by the mode, for example to leave rows for the fullscreen dock, was laid out for the wrong screen. The host now sends its mode with each frame it asks for, and the component is invalidated when the mode changes. See [Renderer mode in an isolated component](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/tui/reference.md#renderer-mode-in-an-isolated-component) ([#5276](https://github.com/bastani-inc/atomic/pull/5276))
114
+ - On Windows, stopping a blueprint step, when a resume or `atomic blueprint prebuild` is interrupted or a step times out, now ends every process the step started before Atomic goes on, including one whose shell had already ended, such as a background command started from a subshell. Such a process could keep running in the worktree and hold its files. A step that ends on its own still leaves its background processes running, as before.
115
+ - Pressing `Shift+Ctrl+D` or running `/debug` now writes the lines of the last painted screen instead of re-rendering the component tree outside a paint, so row hit targets stay aligned with what is on screen when a list or catalog refreshes in the same frame
116
+ - `StoragePayloadTooLargeError` no longer calls a small value that a statement sent too large when the backend refused a value or row it built while running the statement, such as a row of several values or a value a query computes. A worker pool commit on a libSQL server failed with "refused a value of 59 bytes larger than it stores; the limit is 5,000,000 bytes per value or row" for a value of about 20 MB that its read built. The message now reads "refused a value or row it built while running the statement, larger than it stores; the limit is 5,000,000 bytes per value or row, and the largest value sent was 59 bytes". `kind`, `limitBytes` and `actualBytes` are unchanged ([#5265](https://github.com/bastani-inc/atomic/pull/5265))
117
+ - On Windows, interrupting a resume or `atomic blueprint prebuild` no longer leaves Git processes running in the checkout. A Git command aborted while it fetched from the checkout reported its abort while `git-upload-pack` or `git pack-objects` still held files there, for a moment or for longer than ten seconds, so the checkout could not be moved, renamed or deleted. Each snapshot Git command now runs in its own Windows job, and an abort ends every process in it and waits until none is left before it reports the abort.
118
+ - Two processes resuming one restored worktree at once no longer act on it together. An LFS download whose process died is taken over by one process at a time, so a second one no longer removes `index.lock` or `HEAD.lock` while the first one's Git holds them, or downloads beside it; a restore's own deferred download is taken the same way. A blueprint build of the worktree now keeps other processes from building it from before it checks for their builds until it has settled, so a second process no longer builds beside one that had not started its first step yet, and builds only if the first one's build failed. Both use the operating-system advisory file lock that serializes lock takeovers, which the kernel releases when its holder dies ([#5099](https://github.com/bastani-inc/atomic/issues/5099), [#4748](https://github.com/bastani-inc/atomic/issues/4748))
119
+ - On Windows, worktree moves no longer fail when another program briefly holds a file. Restoring, capturing, pooling and seeding worktrees rename directories and files that an antivirus scan, the search indexer, an editor or a Git process that just ended may hold open for a moment, which Windows refuses with `EPERM`, `EACCES` or `EBUSY`. Each such rename is now tried again with a growing wait, for up to a minute for a directory and 10 seconds for a file, as npm's graceful-fs does, and stops when the resume is cancelled; other errors and other platforms fail at once as before ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
120
+ - PostgreSQL storage now works with two roles, as documented in storage.md: an owner role that runs the new `atomic storage migrate` to create and upgrade Atomic's tables, and a runtime role with only `USAGE` on the schema, DML on the tables and `EXECUTE` on the trigger functions. Every store records its schema revision in the prefix's `atomic_migrations` ledger and runs no DDL on a current schema, so runtime roles, `atomic worker status` and `atomic worker metrics` no longer need `CREATE` or table ownership, and a starting host no longer takes table locks that queued every running host's writes behind a stalled transaction. Schema changes that remain wait at most a second for a table lock, then back off and try again ([#5218](https://github.com/bastani-inc/atomic/issues/5218))
121
+ - `atomic storage migrate` moves the tables an earlier release created in `public` to the `atomic` schema in one transaction, and leaves version tables, and write-refusing copies of Intercom's tables, in `public`, so processes of that release, Intercom brokers included, are refused instead of writing to a stale copy. A process of this release that opened the database before the move refuses to create anything in `public` and asks to be restarted. Concurrent migrations move the tables once, and a later one reports any table a process created in `public` after the move ([#5218](https://github.com/bastani-inc/atomic/issues/5218))
122
+ - A runtime role without `USAGE` on the schema, or with `USAGE` but no table grants, is now told the exact `GRANT` before any schema change runs, instead of a bare `3F000` or a request to run `atomic storage migrate` ([#5218](https://github.com/bastani-inc/atomic/issues/5218))
123
+ - `atomic storage join --auth azure|aws|gcp` without the cloud's SDK now fails with `auth-unavailable`, "Could not sign in to the shared database", naming the install command, instead of a retryable connection failure; join failures say "shared database" instead of "team database" ([#5218](https://github.com/bastani-inc/atomic/issues/5218))
124
+ - A storage prefix with uppercase letters is refused on PostgreSQL with `StoragePrefixError` reason `uppercase`, instead of failing with "column … already exists" or sharing its lowercase form's tables ([#5218](https://github.com/bastani-inc/atomic/issues/5218))
125
+ - The worker docs no longer say that pool writes on PostgreSQL take turns and that idle hosts poll: hosts claim, heartbeat and complete in parallel and are woken through `LISTEN`/`NOTIFY`. Troubleshooting covers Azure's `28000` "The access token has invalid format" ([#5218](https://github.com/bastani-inc/atomic/issues/5218))
126
+ - Fixed two PostgreSQL triggers getting one name under some valid 14 to 24 character prefixes, such as `atomic_team_bmuhhgaaaaaa`: names longer than 63 bytes ended in a 32-bit hash, which collided for the pool root snapshot's insert and delete triggers, so the insert trigger was missing and snapshot collection could delete blobs a pooled root still carried. Shortened names now end in the full 64-bit hash, opening a store replaces the triggers and functions an earlier build named the old way and indexes again what they missed, and a prefix under which two names would still share one is refused with `StoragePrefixError` reason `"identifier-collision"` ([#5219](https://github.com/bastani-inc/atomic/issues/5219))
127
+ - Fixed a crashed process and a paused one letting two processes hold the settings lock, the credentials lock or one session at once: takeovers of a dead holder's lock and of a dead session claim are now serialized by an operating-system advisory file lock (`flock` on Unix, `LockFileEx` on Windows) that the kernel releases when its holder dies, so no process ever judges the takeover mutex stale. The whole takeover runs while that lock is held, and an item it moved that turns out not to be the dead one is put back only while its path is free, never replacing anything. Each takeover also holds the owner-checked directory mutex, so a process without the native lock (an older native module) never takes over at the same time. Without a native module that has the lock, or when the lock file cannot be opened, as one left by `atomic` run with `sudo`, takeovers use that directory mutex alone, with a one-time warning naming the file and how to fix it. An item a takeover moved aside that cannot be removed, such as a dead mutex another user owns, no longer fails the save: it is left with a one-time warning naming it. These locks exclude only processes on one machine that see the agent directory through the same filesystem view; see [Locks in the agent directory](docs/storage.md#locks-in-the-agent-directory) ([#5193](https://github.com/bastani-inc/atomic/issues/5193))
128
+ - Fixed a session that runs many turns, such as one supervising subagents, copying its whole history for each `turn_end` and `agent_before_settle` handler of every turn. The copy is now made only when a handler adds entries ([#5186](https://github.com/bastani-inc/atomic/issues/5186))
129
+ - Fixed creating a session reading the first line of every other session file in its directory to check its id is new; it now reads only files named for that id or whose names do not identify a session, so creating one in a directory of 400 sessions takes about 2 ms instead of 56 ms ([#5186](https://github.com/bastani-inc/atomic/issues/5186))
130
+ - Fixed a finished task's transcript source keeping its history in memory for as long as the task is listed. A task transcript source can now offer `loadHistory()` to read its history on demand, and `/tasks`, transcripts and completion messages use it. When the history is gone, it reports why and keeps the task's prompt and answer ([#5186](https://github.com/bastani-inc/atomic/issues/5186))
131
+ - Fixed credential redaction missing secrets in less common formats and over-redacting ordinary text. Redaction now covers more field names, encodings and multi-line values. Now redacted: a cookie value containing `}` or `\`, `curl -ubob:<secret>`, `--password -<secret>`, a letters-only `-p<password>` after `mysql` or `-u`, `docker login -p <secret>`, `api_key=data.<token>`, a connection-string password containing `;name=`, a numeric JSON password, a netrc entry with `password` before `login`, and a YAML value alone on the next, indented line. Now left as they are: documentation examples such as `Cookie: name=value` and `(e.g. Set-Cookie: lang=en-US)`, `document.cookie = "theme=dark; …"`, `login bob password reset failed`, `PASSWORD= PORT=8080`, `options.password === undefined`, kubectl's `<set to the key …>`, placeholders such as `hidden` or `(not set)`, prose describing a password, and "Set `password:` in config.yaml". A value never runs past its line break, so Python's `-> Token:` no longer swallows the next line, and a value megabytes long is redacted instead of throwing a stack overflow ([#5142](https://github.com/bastani-inc/atomic/issues/5142))
132
+ - The fetch tool refuses more reserved and non-public address ranges.
133
+ - Fixed `search` and `find` reading the wrong file for a path containing brackets, such as a Next.js or SvelteKit route `app/[id]/page.tsx`: the brackets were read as a glob, so the tools matched `app/i/page.tsx` or `app/d/page.tsx` instead. A path that exists exactly as written is now used as that path, and a backslash makes a glob character literal (`app/\[id\]/*.tsx`) outside Windows ([#5177](https://github.com/bastani-inc/atomic/issues/5177))
134
+ - Fixed two processes resuming the same session when they took over a dead session claim at once. A takeover lock was broken by its age alone, so a process paused for 10 seconds or more lost its lock mid-takeover, and a second process could remove the claim the first had just taken; a third could fail with a raw `ENOENT` instead of "Session is already open". Takeovers of a dead claim now use the same takeover lock as settings and credential locks, which is broken only once the process holding it is dead. The dead claim is moved aside and removed only if it is still the dead one ([#5179](https://github.com/bastani-inc/atomic/issues/5179))
135
+ - Temporary lock-holder files (`settings.json.lock.holder.*.tmp`) left by a process killed while taking the settings lock are now removed once a minute old when a later process removes that lock as stale, as they already were after a dead holder's lock was taken over ([#5161](https://github.com/bastani-inc/atomic/issues/5161))
136
+ - Fixed a process killed while saving settings making the next run read no settings at all: it reported "Lock file is already being held" and fell back to the defaults, so with `"defaultProjectTrust": "always"` a project was treated as untrusted and a resumed session's blueprint build was skipped. Reading settings no longer takes the write lock, since saves replace the file whole; a save takes over a lock whose holder is proven dead by its process id and start time at once instead of waiting for it to go stale, while a live holder still excludes it; and when the global settings cannot be read, Atomic warns that project trust falls back to "ask" and what that skips ([#5161](https://github.com/bastani-inc/atomic/issues/5161))
137
+ - Fixed lost updates when processes save settings, credentials or trust decisions at the same time while some are killed: two processes could both remove a lock they judged abandoned and both save, and a process saving the first credential to a new `auth.json` could overwrite one another process had just saved. Removing an abandoned lock now takes a per-lock mutex and checks again that the lock is still abandoned, and the first save to `auth.json` is locked and creates the file exclusively ([#5161](https://github.com/bastani-inc/atomic/issues/5161))
138
+ - An RPC `abort` now holds queued messages before it stops the run, as Esc and Ctrl+C do in the TUI, so a completion notice that a background command or task queued during the run is no longer started as a new turn after the abort. Closing stdin or shutting down then saves the notice for the next session, which shows it once, instead of failing. The next `prompt` releases the hold and starts its turn as before; a hold the client set with `pause_queued_messages` stays until the client resumes it. SDK callers get the same with `session.abort({ pauseQueuedMessages: true })` before `dispose()`. When disposing the session still fails, an RPC process writes a `shutdown_error` event and exits with code 1 (or its signal's code), instead of an unhandled promise rejection ([#5166](https://github.com/bastani-inc/atomic/issues/5166))
139
+ - Fixed a running session's pooled worktree, or its open-session mark, that could be judged abandoned when the start of the process holding it could not be read at that moment (on Windows, when the PowerShell fallback timed out under heavy load) and the lease or mark had not been refreshed for over a day: the worktree could then be claimed or evicted, or the session deleted, while that session still ran. A holder whose recorded start cannot be read now keeps its hold for as long as a process with its id runs ([#5141](https://github.com/bastani-inc/atomic/issues/5141))
140
+ - Older Atomic builds can no longer corrupt or misread the snapshot data of a store this release wrote ([#5065](https://github.com/bastani-inc/atomic/issues/5065)). Opening a workflow journal now upgrades its schema to version 2, and storing a worktree snapshot over 1 MiB marks the database's journal at version 2 even where no workflow has run yet, so an older build refuses it with `StorageSchemaVersionError` instead of reading a worktree snapshot over 1 MiB as empty. And when an older build's snapshot collection reinstalls its own reference triggers between this release's upgrade and its first collection, this release now notices and indexes the sessions again, so a partly restored worktree no longer loses the snapshots it still needs. The upgrade is one way: upgrade every host that shares a store together, and close every process of an older version before the first run of this release on a shared SQL store, because a process that opened the store earlier checks its schema only when it opened it. From this release on, a session store checks the schema version in every read and write transaction, an open-session mark records the schema version its process reads, and a newer session-presence schema no longer locks a build out of its sessions. See [Size limits](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/storage.md#size-limits)
141
+ - Codemode's model listings (`models.getModelOfType()` and the like) now show a derived `-fast` or `-ultrafast` model at the service-tier rates it is billed at, as `maxInputCost`/`maxOutputCost` already compare it, instead of its base model's rates ([#5156](https://github.com/bastani-inc/atomic/issues/5156))
142
+ - A background shell's whole process tree now ends with its task: a stop, an execution timeout or closing its session or workflow stage also ends descendants that moved to another process group without starting their own session, such as GNU `timeout` and `set -m` jobs, and cleanup reports `reaped` only once they are gone. Pipe-mode shells now start in a session of their own, so they have no controlling terminal. When Atomic dies (SIGKILL, the OOM killer, an uncaught exception or `process.exit`), its shells and their descendants end too, on Linux and macOS through a small guardian process that Atomic replaces if it is killed, instead of running past their execution timeout. On Linux, where Atomic's cgroup is delegated to the user, each shell also gets a cgroup of its own, so a descendant that keeps forking cannot slip past cleanup ([#5057](https://github.com/bastani-inc/atomic/issues/5057))
143
+ - Fixed worktree restores on Windows failing with "unable to open database file (SQLite code 14)" when the agent directory is deep, for example under a long user name or a redirected profile. Atomic now opens SQLite files whose paths are too long to open as written through the `\\?\` long-path form, names its staging worktrees `.s-<12 hex>` instead of `.staging-<uuid>`, so the Git directories and writer leases of the worktrees it restores are shorter, and turns on `core.longpaths` in the Git object stores it creates. An agent directory too deep for Git for Windows now fails the restore before anything is written, with `WorkspaceRestoreError` code `path-too-long` naming the agent directory and how to shorten it. Staging directories of earlier versions are still recognized and cleaned. See [Long paths on Windows](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/guides/resume-on-any-machine.md#long-paths-on-windows) ([#5139](https://github.com/bastani-inc/atomic/issues/5139))
144
+ - Fixed a resumed session's pooled worktree that could stay held for up to a day on Windows after the process holding it crashed, when Windows gave its process id to another process: the slot could not be claimed or evicted, so resumes restored into a new worktree instead. Leases now name their holder's process creation time on Windows, as they name its start on Linux, so a later process given the same id never keeps the slot, while a holder that still runs keeps it however long its lease was not refreshed. The creation time is read by the native module, or by PowerShell where the native module is unavailable. Leases written by older builds, which name no start, keep the 24-hour limit ([#5141](https://github.com/bastani-inc/atomic/issues/5141))
145
+ - Fixed `.clock-<hex>.probe` files piling up in worktree pool and lock directories. A process that measures a shared filesystem's clock writes and removes such a probe, so one stopped or killed in between left its probe there for good. A process measuring the clock of a directory now also removes the probes there that are more than 10 minutes old by that filesystem's clock ([#5050](https://github.com/bastani-inc/atomic/issues/5050))
146
+ - Resuming one session from several processes at once (`atomic -p --session <id>` started twice) no longer crashes all but one with an uncaught `SessionConflictError`. A resume now claims the session before it writes to it or restores its checkouts, and a second resume of a session another live process holds exits with code `75` and `Session <id> is already open in process <pid> on <host>`, having changed nothing; interactive mode prints the same. A claim whose process was killed is taken over. Another process writing to the session during a run now ends it with a message instead of an uncaught error ([#5135](https://github.com/bastani-inc/atomic/issues/5135))
147
+ - A worker host now recovers within seconds after a database outage that cut a stream holding the write lock, instead of staying stuck for over a minute: the libSQL adapter closes such a stream as soon as the server is reachable again, and when the outage lost the answer to a request the server already ran, writes resume once the server expires the stream (about 5 seconds on sqld). A call queued on a database behind a call that does not settle no longer waits without end: it fails with `StorageUnavailableError` without running once the call ahead has run `STORAGE_PRIORITY_CALL_MAX_WAIT_MS` (10 seconds) for a priority call such as a heartbeat or a lease renewal, so it is tried again while its lease still holds, or `STORAGE_QUEUED_CALL_MAX_WAIT_MS` (60 seconds) for any other call ([#5114](https://github.com/bastani-inc/atomic/issues/5114)).
148
+ - A background task's completion notice restored after a restart, or after a workflow stage was released, is no longer lost when Atomic is killed during the turn it arrives in: the task is marked as reported only once its notice is saved in the session, so after a crash the notice is either shown or still waiting, never both and never neither. A notice saved just before a crash is not shown a second time, and a restored notice now describes its own task even when a new task of this process got the same task id, instead of being dropped (a new foreground shell) or shown with the new task's title and output ([#5047](https://github.com/bastani-inc/atomic/issues/5047))
149
+ - Forking or cloning a session that was resumed into a restored worktree now continues in that worktree, instead of the recorded checkout the session started in, which may be missing on this machine and made every shell command fail with "Working directory does not exist" ([#4748](https://github.com/bastani-inc/atomic/issues/4748))
150
+ - Fixed the Windows installer (`install.ps1`) failing with "Access to the path ... is denied" when Windows briefly refused to move the newly extracted version into place, for example while an antivirus scan held it. The installer now retries that move for about two seconds before failing and rolling back
151
+ - Fixed binding a workspace to a remote repository on Windows failing with `EPERM` when Windows briefly refused to move the just-fetched repository into place, for example while an antivirus scan or the search indexer held it. Atomic now retries that move, and its other renames, for about two seconds instead of 200 ms
152
+ - Saving a project trust decision, settings, `auth.json` credentials or an MCP server's refreshed tokens no longer fails while other Atomic processes save the same file one after another. A save now waits as long as the file keeps changing hands, up to two minutes, and fails only when one process keeps it locked. Waiting saves also get their turn sooner instead of losing it to newer ones ([#4952](https://github.com/bastani-inc/atomic/issues/4952))
153
+ - Fixed a session snapshot capture on Windows leaving a `capture-index/*.json.<pid>.tmp` file behind when another Atomic process held the capture record open while it was being replaced ([#4847](https://github.com/bastani-inc/atomic/issues/4847))
154
+ - A tool call with an empty or missing id, as some OpenAI-compatible servers send, now keeps its real result on every later request instead of being replaced by a "Tool execution was interrupted" result, parallel calls without ids each keep their own result, and such a call that detached or was released is started again after a restart and answered under the same id ([#5056](https://github.com/bastani-inc/atomic/issues/5056))
155
+ - Fixed restored worktrees on a pool shared by several machines being taken from a live session when the machines' clocks disagree: a lease or lock refreshed on a machine whose clock ran 90 seconds or more behind looked stale to another machine, which could reuse or remove the worktree while that session still worked in it, and one refreshed on a machine whose clock ran ahead kept its worktree for as long as the clock was ahead after its process stopped. Leases and the per-worktree, repository, restore and seed locks are now stamped and judged by the clock of the filesystem holding them, so only how long ago a lease was last refreshed decides ([#5050](https://github.com/bastani-inc/atomic/issues/5050))
156
+ - A background shell that a session's close stops now leaves its completion notice, naming `session closed`, for the next time the session is opened, once; it was never saved. When Atomic restarts while a workflow stage is released, the resumed stage is now told, once, that each shell it was running when released and whose notice it had not received was interrupted by the restart, instead of never hearing of it ([#5079](https://github.com/bastani-inc/atomic/issues/5079))
157
+ - Reading or writing a tar archive member selector (`foo.tar:member`, `foo.tgz:member`) no longer hangs Atomic on a malformed PAX header: a record without a length separator, with a zero or too-short length, or running past the header data is refused as `Invalid PAX header` ([#5108](https://github.com/bastani-inc/atomic/issues/5108))
158
+ - Tar archive member selectors now read PAX headers as GNU tar does: a PAX `size` that is not plain decimal digits (such as `0x5`, `5e0`, ` 5` or empty) is refused as `Invalid PAX header` instead of being read loosely, and an empty PAX value such as `path=` falls back to the header's own field, so the member is listed under its header name and writing it replaces it instead of adding a duplicate ([#5120](https://github.com/bastani-inc/atomic/issues/5120))
159
+ - Temporary extension installs and the GitHub clone cache now use directories only the current user owns
160
+ - Displayed tool output no longer passes 8-bit control sequences or bidirectional overrides to the terminal
161
+ - Fixed a failed lock release masking the result of the operation it guarded: a trust, settings, auth, MCP sign-in, package-install, blueprint-ledger, or worktree-snapshot write that succeeded is no longer reported as failed, and a write that failed reports its own error. The release failure is recorded in the debug log ([#5090](https://github.com/bastani-inc/atomic/issues/5090))
162
+ - `.atomic/snapshot-ignore` now matches paths exactly as Git matches `.gitignore` rules in the same repository: case sensitivity follows the repository's `core.ignorecase` (case-sensitive by default on Linux), so a rule such as `Notes.txt` no longer leaves `notes.txt` out of a snapshot and `!*.log` no longer brings back `SECRET.LOG`, and trailing spaces are dropped as Git drops them, so `build/ ` matches `build/` at any depth ([#5051](https://github.com/bastani-inc/atomic/issues/5051))
163
+ - Skill, prompt, theme and extension discovery now applies `.gitignore`, `.ignore` and `.fdignore` files as Git does: a pattern without a slash in a nested ignore file, such as `drafts` in `team/.gitignore`, also hides `team/x/drafts`; an escaped `\!name` is a literal file name instead of a negation; trailing spaces are dropped; and rules are case-sensitive except on Windows and macOS ([#5051](https://github.com/bastani-inc/atomic/issues/5051))
164
+ - Compaction and summaries no longer drop real tool output. A compaction cut never separates tool calls from their results: the kept tail now starts at the assistant message that made the calls, so after a parallel batch both results stay in the request. A message admitted while a tool batch was running, such as an Intercom delivery, now follows the batch in the kept tail, the compacted region, branch and session summaries and the summary fallback, as it already did in live requests, instead of turning a later real result into an "interrupted" one; the summary fallback no longer cuts at such a message ([#5062](https://github.com/bastani-inc/atomic/issues/5062))
165
+ - Fixed MCP Streamable HTTP response streams that broke or ended in the middle of an event: the reconnect asked the server to resume after that incomplete event, so the server skipped it and the tool call could lose its answer. A reconnect now resumes after the last event that arrived complete, and an event cut off by the end of the stream is dropped without an error ([#5019](https://github.com/bastani-inc/atomic/issues/5019))
166
+ - Fixed an MCP sign-in that refreshed the server's tokens while a connection was refreshing them: with a server that rotates refresh tokens, both used the same refresh token, so one of them failed, and a server that revokes a replayed grant revoked the tokens the sign-in had just reported as signed in. A sign-in now waits for a running refresh and keeps the tokens it saved ([#5019](https://github.com/bastani-inc/atomic/issues/5019))
167
+ - Fixed an MCP server that failed to connect with "MCP session expired" when it forgot its new session right after `initialize`, failing every call waiting for the connection. Atomic now initializes once more, as it already did for a session that expires later ([#5019](https://github.com/bastani-inc/atomic/issues/5019))
168
+ - A resume that restored a snapshot fully and applied the work done in its partly restored worktree no longer loses that work when recording the merged worktree fails (a Git error, a crash or Ctrl-C): the work's snapshot stays kept until the merged worktree is recorded, a warning says so, and the next turn or resume records it, so a resume on another machine still gets the work. Work that conflicted with the full restore is now also kept in the session's storage, not only as a ref on that machine, until `discardDegradedRestore` releases it ([#5009](https://github.com/bastani-inc/atomic/issues/5009))
169
+ - Fixed unrelated repositories sharing restored worktrees and a Git object store: every checkout without a remote, and every checkout whose remote is the same relative path such as `../upstream`, had the same repository identity, so resuming one project could reuse another's idle worktree and keep that project's ignored files, such as `secrets/` and `node_modules/`, or destroy it. Relative-path remotes are now resolved against the checkout, a checkout without a remote is never pooled and gets an object store of its own, and a reused worktree must belong to the resuming repository's store. Worktrees earlier versions pooled under the shared identity are left alone ([#4989](https://github.com/bastani-inc/atomic/issues/4989))
170
+ - Fixed restored worktrees piling up after a crash: a lease left by a process that crashed kept its worktree from being reused or removed for as long as any process had the same process ID, which after a reboot or a container restart could be forever. On Linux a lease now names when its process started, so a later process with the same ID never keeps it; where the start cannot be read, a lease of this machine not refreshed for 24 hours no longer keeps its worktree, even when its process ID runs. Leases written by earlier versions name no start, so one left by a crash can keep its worktree for up to 24 hours while its process ID is in use ([#4990](https://github.com/bastani-inc/atomic/issues/4990))
171
+ - Fixed a suspended Atomic process deleting or resetting a restored worktree that its session had taken again meanwhile: removing, reusing or taking a worktree now checks right before each change that the process still holds the worktree's lock and that the worktree's record is the one it checked, and removing a worktree takes its record and moves the worktree aside before deleting it, so nothing another session holds is changed. A session taking its worktree again takes its lease first and writes the record only in place of the one it read, so it never takes back a worktree another session took meanwhile ([#4991](https://github.com/bastani-inc/atomic/issues/4991))
172
+ - `/reload` now also runs the edited code of plain JavaScript extensions: `.mjs` and `.cjs` files, and `.js` files that are ESM in a `"type": "module"` package or are CommonJS, along with the relative JavaScript modules they import. Node and Bun keep a module they load themselves until the process exits, so these used to run the code they were first loaded with until a restart. Atomic now evaluates them through its own transform, as it does TypeScript, keeping ESM behavior (`import.meta.url`, top-level await, imports of Node builtins and packages) and CommonJS behavior (`require`, `module.exports`, `__dirname`), and memory stays bounded across many reloads. Packages an extension imports by name still load once per process ([#4988](https://github.com/bastani-inc/atomic/issues/4988))
173
+ - `/reload` now runs the current code of an extension you edited, and of the local modules it imports, in interactive mode (in-process and isolated) and RPC, from the compiled binary, `dist` under Node or source under Bun. Before, a reload reused the modules loaded at startup. Reloads evaluate the edited files without keeping earlier evaluations alive, so memory stays bounded across many reloads. ([#4986](https://github.com/bastani-inc/atomic/issues/4986))
174
+ - Fixed a session on a shared database (libSQL, Postgres) failing every later save after one lost COMMIT response. When the connection breaks, or a gateway answers HTTP 5xx, after the server may have applied a save, the session now reads the store back: an entry that was saved is kept and not written twice, and later saves go on. Entries another process added to the session fail one save with a clear conflict, and later saves go on after them instead of failing for the rest of the session ([#4970](https://github.com/bastani-inc/atomic/issues/4970))
175
+ - Deleting a session that's open in another running Atomic session, usually in another terminal, from `/resume`, the `--resume` picker or the RPC `delete_session` command, is now refused with a message naming that process; it's allowed once that session closes or its process exits. A running session now keeps a marker, refreshed on a heartbeat: in a SQL session store (SQLite, libSQL, Postgres) it's a row in the store's new `session_open` table, so every host and agent directory sharing the store sees it; for JSONL sessions it's a file under the agent directory's `open-sessions` folder. A marker whose process ended or stopped refreshing for 60 seconds is ignored; a SQL store times its markers with the database's clock, so hosts whose clocks differ agree on which are live. The table has a migration domain of its own (`session-presence`), so older Atomic versions keep opening the store. If a session is deleted anyway while it runs, its next save fails once with a clear notice that the session is no longer saved, instead of failing silently on every save ([#4971](https://github.com/bastani-inc/atomic/issues/4971))
176
+ - Fixed compaction failures that errored the turn, or lost verbatim deletions, instead of moving to the next documented rung ([#4977](https://github.com/bastani-inc/atomic/issues/4977)):
177
+ - A provider that ends a planner stream as aborted on its side now counts as a failed request, so the fallback models and the fresh context window are tried. Only your own cancellation stops compaction.
178
+ - Overflow recovery and post-tool preflight now accept a planned result only when it fits the model's context window. Otherwise they try the next model, then the fresh context window.
179
+ - When the transcript is split after repeated policy refusals, a part that fails for another reason stays as it is, and the other parts keep their deletions. Atomic falls back to the summary only when no part deletes anything.
180
+ - A backup that cannot be written (`ENOSPC`, `EACCES`) no longer blocks the boundary. The boundary is written without a `backupPath`.
181
+ - A cancel that arrives while the boundary is being written now leaves the session unchanged and reports the compaction as cancelled.
182
+ - A `session_before_compact` handler that returns empty or whitespace `compactedText` now counts as no override, and Atomic plans the region itself.
183
+ - The fresh context window counts text outside ASCII, such as CJK, at a token per character when deciding whether the recent tail fits, so a dense tail that does not fit is dropped instead of being refused at the next request.
184
+ - A fallback model whose lookup throws, for example on a corrupt credential store, is skipped.
185
+ - When a stored background result is applied and the foreground compaction after it fails, `compaction_end` now reports the applied boundary together with the error. Overflow recovery still retries the turn, and the main chat shows the "Context compacted" card.
186
+ - A small remaining region is no longer cleared when a stored background result has already brought the context under the context window.
187
+ - A context overflow on the request right after a compaction boundary, in the same millisecond, now starts overflow recovery instead of being ignored as stale.
188
+ - Fixed model fallback treating a transient overload as a permanent failure: Gemini's `503` "The model is overloaded" (`UNAVAILABLE`), and any other `5xx` or `429` whose message mentions the model, such as an OpenAI-compatible `503` "The model is currently unavailable", is now retried on the same model instead of ending the turn or blocking the model for the rest of the turn. Google's `429` `RESOURCE_EXHAUSTED` is retried as a rate limit; a genuine `404` for a missing model still moves on to the next fallback ([#4994](https://github.com/bastani-inc/atomic/issues/4994))
189
+ - Fixed concurrent Atomic sessions breaking the project trust store (`trust.json`): reads no longer wait for or fail on another process's save, so a resumed session's blueprint build no longer stops with "Lock file is already being held"; saves wait up to 5 seconds for each other and no decision is lost; a save is written to a temporary file and renamed into place, so an interrupted save leaves the previous file intact; and an unreadable `trust.json` is reported once and treated as empty instead of failing every read ([#4952](https://github.com/bastani-inc/atomic/issues/4952))
190
+ - Fixed requests to OAuth MCP servers failing with "Lock file is already being held" when several Atomic sessions use them at once, and for about 10 seconds after a session that was saving MCP sign-in tokens was killed: reading the stored tokens in `mcp-auth.json` no longer takes the file's write lock ([#4952](https://github.com/bastani-inc/atomic/issues/4952))
191
+ - Fixed sessions and worktree snapshots failing on a libSQL server (sqld) once a value passed a few megabytes. sqld refuses a value or row over 5,000,000 bytes and a response over 10 MB. As a result, a session entry over about 2.5 MB could not be saved ("could not persist the user message"), a session of more than 10 MB could not be loaded, a listing failed once a session's message text passed 5 MB, and a checkout with an untracked file under the 5 MiB `snapshots.maxFileBytes` cap could not be snapshotted. Each failure was reported as `StorageUnavailableError`. Session entries over 1 MiB, and snapshot patches and bundles over 1 MiB, are now stored as rows of at most 1 MiB in one transaction. Sessions, listings and workflow journals are read in pages of about 1 MiB of text. Blobs and entries written before stay readable. A session listing now keeps at most 64 KiB of each message, so a search matches only that prefix of a longer message, on every store ([#4954](https://github.com/bastani-inc/atomic/issues/4954))
192
+ - Storing the first chunked session entry upgrades the session database's schema to version 2, one way. Older builds then refuse it when opening with `StorageSchemaVersionError` instead of reading a large entry as a stub. A new database, or an existing version 1 database, stays at version 1 until then, so older builds keep opening it. Existing version 2 databases are not downgraded. Upgrade every host that shares a store together and stop every older process first. An older build that reads a large worktree snapshot through a workflow journal reports it as corrupt ([#4954](https://github.com/bastani-inc/atomic/issues/4954))
193
+ - A value or response too large for the storage backend now fails with `StoragePayloadTooLargeError` (`code` `"payload-too-large"`, `retryable: false`), whose message names the size and the backend's limit. It was reported as `StorageUnavailableError`, as if the store were down, although retrying cannot help. On a libSQL server this applies to an Intercom message over 5,000,000 bytes ([#4954](https://github.com/bastani-inc/atomic/issues/4954))
194
+ - Fixed workflow runs failing on a libSQL server (sqld) when one journal event passed 5,000,000 bytes, such as a large `ctx.step` result or stage output, and pooled children whose inputs or result passed it: each failed with `StoragePayloadTooLargeError`, so the run could not continue. Journal events, pool inputs and pool results whose JSON is over 1 MiB are now stored as rows of at most 1 MiB in the transaction that writes them, on every backend; the event's own row keeps a summary with the fields the snapshot reference index, the run's latest checkpoint time and status read in SQL. Events, inputs and results written before stay readable. Opening a workflow journal with this release upgrades its journal schema to version 2, and a worker pool's to version 3, one way: older builds refuse them instead of reading a large event as its summary, so upgrade every host that shares a store together, and stop every older Atomic process and pool worker on a shared store before the first run of this release. While an older process detectably holds a run's lease or reports as a worker host, large values are written whole, as before, and fail on libSQL with `StoragePayloadTooLargeError`. Every journal read and write now checks the schema version, so this release's processes refuse a journal a later release upgrades ([#4965](https://github.com/bastani-inc/atomic/issues/4965))
195
+ - A turn whose worktree snapshot cannot be stored or read, because the storage is unreachable or refuses the payload, now ends normally and reports the new `WorkspaceSnapshotError` code `blob-store-failed` once. Before, the turn failed, and failed again on every later turn while the file was there ([#4954](https://github.com/bastani-inc/atomic/issues/4954))
196
+ - Fixed snapshot garbage collection failing on PostgreSQL with `column "branch.snapshot_id" must appear in the GROUP BY clause`, so unreferenced snapshot blobs were never deleted there. The query that finds the snapshot each session branch keeps now gives the same result on SQLite, libSQL and PostgreSQL ([#4960](https://github.com/bastani-inc/atomic/issues/4960))
197
+ - Fixed the policy-refusal summary fallback of compaction. It failed with "No compactable history for pi summary fallback" when less than about 20,000 tokens had accumulated since the last boundary. It also dropped `<keepContext>` spans and replaced a different part of the conversation than planned, keeping far more recent messages than `preserve_recent`. The summary now replaces exactly the part the planner was given, whatever its size, and keeps the same recent messages. When those messages start with tool results, it also keeps the assistant message that made the calls. Protected spans are placed unchanged ahead of the summary and reported as `keptRanges`; they are limited to their share of the context window and released in the usual order. During overflow recovery and post-tool preflight, a summary that still does not fit the context window is not used, and compaction moves on to the next model or a fresh context window ([#4975](https://github.com/bastani-inc/atomic/issues/4975))
198
+ - Fixed wrong-typed settings crashing or misleading Atomic: a setting of the wrong type, such as `"extensions": "./my-ext.ts"` or `"fallbackModels": "openai/gpt-4o"`, is now ignored with one warning naming the settings file and key, so the other settings file or the default applies, instead of stopping startup, crashing a session when a request failed, or turning `"skills": "./skills"` into one path per character. `fallbackModels` entries now resolve exactly like `--model`, in any letter case, with a reasoning suffix, as bare ids and as OpenRouter-style ids such as `qwen/qwen3-coder:exacto`, and an entry that matches no model with credentials is reported once at startup instead of being skipped silently ([#4902](https://github.com/bastani-inc/atomic/issues/4902))
199
+ - Fixed a session's uncommitted work being lost for good after a resume restored its snapshot only partly: one turn that ran `bash`, `edit` or `write` in the partly restored worktree recorded a snapshot that replaced the original as the checkout's latest, and the next collection deleted the original's content, so a later resume on a machine that can reach its commits restored the partial state. The original snapshot now stays the checkout's restore target and is kept by collection until a resume restores it fully, `discardDegradedRestore` releases it, or 30 days have passed since the partial restore. Snapshots of the partly restored worktree are recorded as derived from it (`degradedFrom`). A later resume that can restore the original applies the work done in the partly restored worktree on top, whole or not at all; work that does not apply is kept as a commit of the restored worktree's repository, with a notice that says how to apply it. A resume that still cannot reach the original continues from that work ([#4922](https://github.com/bastani-inc/atomic/issues/4922))
200
+ - A session whose process stalled, for example because it was suspended or the host was overloaded, no longer ends up sharing its restored worktree with another session ([#4830](https://github.com/bastani-inc/atomic/issues/4830)). Another session on the same machine no longer takes a worktree while its session's process still runs, and a session on another machine sharing the pool waits 60 seconds past the stale lease. A session that lost its worktree to another session no longer writes the worktree's record back as its own. It no longer records a snapshot there; it warns with `pooled-worktree-lost` instead, and its next resume restores fresh. A session that cannot take the lease of its worktree on resume now restores fresh instead of continuing in it without one.
201
+ - Fixed a resumed session leaving its own checkout for a restored worktree with older files after `git gc` pruned its snapshot commit. Atomic now keeps each session's latest snapshot commit of a checkout reachable from `refs/atomic/snapshots/<session-id>/<checkout>` in that repository. `git push`, `--all` and `--tags` never send the ref; `git push --mirror` does. The ref moves with each snapshot and is deleted when the session is deleted or its work moves to a restored worktree. A checkout that keeps the session's ref is recognised even when the resumed snapshot's own commit is gone. See [Snapshot refs in your repository](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/docs/worktree-snapshots.md#snapshot-refs-in-your-repository) ([#4923](https://github.com/bastani-inc/atomic/issues/4923))
202
+ - Project workflows and agents are now loaded only for trusted projects, and their presence prompts for trust. A project whose only project resources are `.atomic/workflows`, `.atomic/agents`, `.atomic/mcp.json` or `.atomic/blueprint.yaml`, or a subdirectory of a project whose root holds agent definitions or settings, now asks whether to trust it like one with project extensions
203
+ - Compaction now takes each message's role from where the message starts, not from lines in its text that look like a role header. A tool result can no longer mark its own lines as `<keepContext>`-protected or pass as the latest user message, so the user's spans are no longer released ahead of it. Lines inside a message that look like a role header are written with a leading `\` in the compaction transcript ([#4831](https://github.com/bastani-inc/atomic/issues/4831))
204
+ - Fixed worktree snapshot capture storing a commit that was never checked against the deny-list: the bundle of unpushed commits was built from `HEAD`, so a commit that landed during the capture, such as one adding a `.env`, could reach snapshot blob storage. The bundle is now built from the commit the capture checked, through a temporary ref under `refs/atomic/capture/` that is removed afterwards, and a bundle whose tip or commits differ from the record is discarded instead of stored ([#4900](https://github.com/bastani-inc/atomic/issues/4900))
205
+ - GitHub URLs are now validated, and clones are confined to the clone directory.
206
+ - Fixed a session resume reusing or removing an idle restored worktree that held an unsaved edit to a tracked file that snapshots leave out, such as a tracked `.env.example`, a file listed in `.atomic/snapshot-ignore` or a file over the size cap: the reuse put back the committed content and the edit was lost. Such a worktree is now kept as it is, and the resume restores a new one ([#4897](https://github.com/bastani-inc/atomic/issues/4897))
207
+ - Fixed an Atomic write to a SQLite store, such as the workflow journal, waiting forever for the database's write lock while another writer that does not take a place in Atomic's writers' queue (a raw SQLite client or an older Atomic) kept committing. On Windows, where every process's timers fire on the same 15.6 ms clock tick, the waiting writer always tried the lock while that writer held it; it now keeps trying for a tick once another writer has committed, so it takes the lock when that writer lets go. On Linux the same wait could last seconds
208
+ - Task heartbeats (shells and subagents) and workflow heartbeats now start a turn as soon as they arrive in an idle chat, including right after you interrupt with Esc, instead of waiting for your next message. Heartbeats that come due together still arrive as one message in one turn, the interrupted response is not resumed, and text you queued but have not sent is never sent by a heartbeat. Set `tasks.heartbeatWakesIdleSession` to `false` to keep the old behaviour ([#4795](https://github.com/bastani-inc/atomic/issues/4795))
209
+ - Fixed a workflow child on a local worker or worker host being replayed elsewhere when the shared database was unreachable for a moment: the worker keeps the child while its lease lasts, and an idle worker waits out the outage instead of exiting ([#4768](https://github.com/bastani-inc/atomic/issues/4768))
210
+ - Fixed `/resume` and `/workflow resume` lists on a libSQL server (sqld) or another storage adapter showing a session's old name or summary after a rename until Atomic restarted. Over these adapters every list now re-reads each session's listed columns, and re-reads search text only for sessions that changed. Atomic's own SQLite storage still serves an unchanged list from its cache ([#4805](https://github.com/bastani-inc/atomic/issues/4805))
211
+ - Fixed `/workflow resume` on a libSQL server (sqld) or another storage adapter still listing a deleted run, and missing the run that replaced it, until Atomic restarted. `RunJournal.changeToken` may now return `undefined`, meaning the journal cannot tell that nothing changed ([#4814](https://github.com/bastani-inc/atomic/issues/4814))
212
+ - A fleet controller's drain now applies to the worker's VM instance or pod, not only its Atomic host id, so a worker that restarts on a drained instance, such as a pod whose container restarted, stays drained until the controller removes the instance. `atomic worker start --provider-id <id>` names the instance (default: `ATOMIC_PROVIDER_ID`, or the pod name on Kubernetes), `atomic worker status` shows it, and the Kubernetes preset now deletes the drained pod instead of relying on its deletion cost, so a scale-down no longer removes a different pod ([#4803](https://github.com/bastani-inc/atomic/issues/4803))
213
+ - Fixed sessions and workflow runs on PostgreSQL ([#4793](https://github.com/bastani-inc/atomic/issues/4793)). A session entry whose JSON holds a NUL character or a lone surrogate (for example tool output) is now saved: before, the snapshot reference index rejected the whole write, because Postgres's `jsonb` cannot hold those characters. Workflow runs now open on PostgreSQL, and `atomic storage export --workflows` and `atomic storage import --workflows` with a PostgreSQL database named by `--storage` or `--storage-file` no longer fail on SQLite-only SQL.
214
+ - Fixed the read, edit and write tools opening a different file than the one named when the path starts with `@` or contains a Unicode space such as a no-break space: `@types/a.d.ts` read `types/a.d.ts`, and editing or writing a name with a no-break space changed the file with an ordinary space instead. The path as written is now used when it exists, and a new file keeps its name when its folder exists. An `@path` mention or pasted Unicode space still finds the file when the path as written does not exist ([#4841](https://github.com/bastani-inc/atomic/issues/4841))
215
+ - Fixed per-turn worktree snapshots possibly reusing an out-of-date private capture index after Atomic was stopped in the middle of a capture, or when two Atomic processes captured the same checkout at once. Such a snapshot could miss a change that only your index knew about until your index changed again. Each capture now checks that the private index is exactly the one its record describes and rebuilds it from your index otherwise ([#4847](https://github.com/bastani-inc/atomic/issues/4847))
216
+ - Fixed credentials leaking into error details, workflow failure text and logs. A password or token in a URL that contains `@` is now removed whole: before, the part after its first `@` stayed visible in git commands and output, remotes, change sets and workspace errors. Credential fields are now redacted in JSON (`"token":`, `"api_key":`), `password`, `passwd` and `pwd` fields and env-style names such as `DB_PASSWORD=` included, and a quoted value is redacted whole past an escaped quote. Storage error redaction no longer leaves part of a short secret behind ([#4833](https://github.com/bastani-inc/atomic/issues/4833))
217
+ - Fixed `local://` paths, search results and resource paths treating a file or directory whose name starts with two dots (for example `local://..notes.md`) as outside the workspace ([#4836](https://github.com/bastani-inc/atomic/issues/4836))
218
+ - Fixed context-overflow recovery compacting a conversation a second time when it started while a finished background compaction was being applied at a turn boundary. Recovery now uses that compaction and compacts again only if the context still does not fit ([#4851](https://github.com/bastani-inc/atomic/issues/4851)).
219
+ - Fixed bash commands that start with `cd <dir>` followed by a redirect, `||`, a pipe, `--`, `-`, an escaped space or a directory that does not exist failing with "Working directory does not exist" or running in the wrong directory. The bash tool now moves only `cd <dir> && …` and `cd <dir>; …` with a single plain directory name, optionally quoted, into the command's working directory, and runs every other command exactly as bash would ([#4840](https://github.com/bastani-inc/atomic/issues/4840))
220
+ - Fixed worktree snapshots on Windows: uncommitted executable scripts and symbolic links in a resumed session's checkout now keep their executable bit and link type in later snapshots, including after you edit them, instead of becoming regular files, so resuming on Linux or macOS no longer loses them. Restores now succeed for paths longer than Windows' 260-character limit, and a partial restore names files whose paths differ only in case (`dir/b.txt` and `Dir/b.txt`) as missing ([#4932](https://github.com/bastani-inc/atomic/issues/4932))
221
+ - Fixed worktree snapshots silently dropping work in untracked nested repositories and submodules. Snapshots still do not record that work, but `omitted` now lists an untracked repository inside the checkout (`nested-repository`) and a submodule with uncommitted changes or untracked files (`submodule-changes`) or with a checked-out commit that is on none of its remote-tracking branches (`unpushed-submodule-commit`), and a resume warns about each by path ([#4905](https://github.com/bastani-inc/atomic/issues/4905))
222
+ - HTML session export now embeds its scripts verbatim, so the cost line keeps its `$` and Swift and some unlabeled code blocks are highlighted again ([#4887](https://github.com/bastani-inc/atomic/issues/4887))
223
+ - Fixed a session resume ignoring the checkout you started it in when that checkout's remote is spelled differently from the one the session recorded, such as SSH instead of HTTPS or with or without `.git`. Atomic restored a separate worktree instead, or continued without restoring when the recorded remote was unreachable. It now resumes in that checkout, matching repositories the same way restored worktrees and caches do ([#4913](https://github.com/bastani-inc/atomic/issues/4913))
224
+ - Fixed an SVG or other unsupported image from a tool, such as an MCP diagram server, staying in the session and making every later request fail. Tool images that are not JPEG, PNG, GIF or WebP are converted to PNG when possible and otherwise replaced with a note naming their type, and sessions that already hold such an image work again on the next turn ([#4908](https://github.com/bastani-inc/atomic/issues/4908)).
225
+ - Fixed three `write` paths that could change or lose data they were not asked to touch ([#4906](https://github.com/bastani-inc/atomic/issues/4906)):
226
+ - `conflict://` now recognises only Git's exact marker lines (`<<<<<<<`, `|||||||`, `=======`, `>>>>>>>`, alone or followed by a space and a label) in Git's order. A markdown `==========` underline or a quoted `>>>>>>>>` line stays in its side instead of splitting the region and losing the rest of the side when you write `@theirs`. A region with an extra or out-of-order marker is left in the file rather than resolved at a guess.
227
+ - SQLite row selectors now match the table's complete primary key. A table with a composite key takes a JSON array of the key values in key order, such as `data.sqlite:members:["acme",2]`; a single value is refused instead of updating or deleting every row that shares the first key column. An update or delete that would change more than one row is refused and changes nothing.
228
+ - Writing a member of a tar archive keeps every other member byte for byte, including GNU long names, PAX headers, symlinks, hard links, modes and mtimes. The written member keeps its mode and owner, and a long path is stored in full. Overwriting a link, directory or other non-regular member, a member that appears more than once, or an archive with a corrupt header is refused
229
+ - Fixed transient Amazon Bedrock failures being treated as permanent by model fallback ([#4918](https://github.com/bastani-inc/atomic/issues/4918)). A `503 ServiceUnavailableException` was read as an unavailable model, so it was never retried and the model was skipped for the rest of the turn, and a `502` with an HTML gateway page was not recognized at all. Failures are now classified from the HTTP status and the provider's error code first, so 5xx errors, `ServiceUnavailableException`, `InternalServerException`, `ModelNotReadyException` and throttling are retried on the same model before falling back, and message text no longer marks a model unavailable when the status says the failure is temporary. An HTTP/2 stream reset such as `NGHTTP2_CANCEL` is now retried instead of being treated as a cancelled request
230
+ - Fixed `edit` changing text outside the edit ([#4893](https://github.com/bastani-inc/atomic/issues/4893)). An `oldText` that occurs twice at overlapping offsets, such as `}\n}` in `}\n}\n}`, is now refused as not unique instead of replacing the first. When only normalized text matches, `edit` replaces just the file's original text at that place, so characters such as `x²` or `①` and trailing whitespace beside the match are no longer rewritten. A single exact match is used even when the normalized text matches more than once. A file that is not valid UTF-8, such as Latin-1, is refused with the new `target-not-utf8` error and left unchanged, instead of having its other non-UTF-8 characters replaced with U+FFFD.
231
+ - Fixed the `bash` tool rounding a fractional `timeout` down to whole seconds, so `timeout: 1.9` stopped a command after 1 second. Fractional seconds are now honoured to the millisecond
232
+ - Fixed an MCP server being marked as needing sign-in when its OAuth authorization server failed temporarily while refreshing an expired token (a 5xx or 429 answer, `server_error` or `temporarily_unavailable`, a network error or a timeout). Atomic now keeps the stored tokens, retries the connection with backoff, and `/mcp` and the startup notice say the authorization server is temporarily unavailable; only a rejected grant or client (`invalid_grant`, `invalid_client`, `unauthorized_client`) still asks you to sign in ([#4910](https://github.com/bastani-inc/atomic/issues/4910))
233
+ - Fixed overlapping MCP OAuth sign-ins to one server, for example in two sessions, breaking each other: each sign-in now keeps its own client registration, PKCE verifier and `state` parameter until it completes, so both succeed and the server keeps the tokens of the one that finished last. A failed authorization code exchange no longer deletes stored tokens, and a refresh rejected with `invalid_grant` now drops only the grant it used ([#4916](https://github.com/bastani-inc/atomic/issues/4916))
234
+ - Fixed the grep tool hiding matches past the 512th character of a long line: a long matching line is now cut around its first match, with `...` on each cut side. Patterns anchored with `$` or `^` now match lines of files with CRLF line endings, as they do with LF endings ([#4903](https://github.com/bastani-inc/atomic/issues/4903))
235
+ - Fixed large MCP results over Streamable HTTP stalling the session: a response streamed in many pieces is now read in time proportional to its size, so a 15 MB tool result takes milliseconds instead of seconds. The 16 MB message limit still applies ([#4892](https://github.com/bastani-inc/atomic/issues/4892))
236
+ - Fixed sessions whose text contains U+2028 or U+2029 (line and paragraph separators, common in text copied from web pages, PDFs and Word) failing to read back from JSONL ([#4957](https://github.com/bastani-inc/atomic/issues/4957)). Such a session in JSONL session storage can be opened again, a subagent whose transcript contains them can be resumed, and `atomic storage export` / `import` and `atomic --import` carry them between every pair of backends. JSONL files are now split only at newlines (and CRLF). The find tool now returns a file whose name contains either character as one path, and the grep tool through ripgrep no longer drops a matching line that contains one.
237
+ - Fixed a cancelled or timed-out MCP tool call over Streamable HTTP leaving its response stream open on the server until the client closed. Cancelling a call or letting it time out now closes its request and response stream, and a stream whose call already ended is never resumed ([#4895](https://github.com/bastani-inc/atomic/issues/4895))
238
+ - Fixed an interrupted git package install, such as a cancelled CI job or a stopped container, making every later `atomic install` and `atomic update` of that package fail. A git package is now cloned into a temporary directory beside its install directory and moved into place only once it is complete, and a checkout that an earlier interrupted install left incomplete is cloned again with a notice. `atomic remove` of a package whose directory is present but not in your settings now removes the directory, says so, and exits 0 ([#4962](https://github.com/bastani-inc/atomic/issues/4962))
239
+ - Fixed concurrent installs of one git package, for example several sessions starting at once, deleting each other's clone or loading without the package. Installs, updates and removals of a package now wait for each other across processes, and a session that starts while another is installing waits for it and then loads the package ([#4964](https://github.com/bastani-inc/atomic/issues/4964))
240
+ - Fixed concurrent `atomic install` runs losing packages: `settings.json` kept only the last run's package, and npm installs into the shared package directory dropped each other's dependency, which a later install then deleted. Package changes to settings now re-read the settings file under its lock, and npm installs and removals in the shared directory run one at a time ([#4966](https://github.com/bastani-inc/atomic/issues/4966))
241
+ - Fixed `/reload` hiding extensions that fail to load: interactive mode now lists the failure under `[Extension issues]` as startup does, and the RPC `reload` command emits an `extension_error` event with `"event": "reload"` for each one, also returned in `get_state` as `resourceErrors`. An extension that registers the same tool name twice now gets a warning; the last registration is still used ([#4968](https://github.com/bastani-inc/atomic/issues/4968))
242
+ - Fixed session titles and `/tree` branch summaries telling the summarizing model that every tool call was interrupted: the summary input dropped tool results, so each call looked unanswered and was given an invented "interrupted" result. Summaries now see the start of each real tool result, up to 500 characters, and only a call that never returned is reported as interrupted. `prepareBranchEntries` in the SDK returns those shortened results too ([#4967](https://github.com/bastani-inc/atomic/issues/4967))
243
+ - Fixed `atomic blueprint prebuild --park` leaving a worktree that no resume could claim or remove whenever a `"kind": "build"` path of `resume.cache` held files Git tracks, such as a committed `dist/`, so every prebuild left another full worktree behind. Parking now moves only the untracked and ignored files under a build path and leaves tracked files in place, a resume that adopts the parked output puts it back beside them, and `atomic blueprint cache-key` warns when a build path holds tracked files. Worktrees an earlier prebuild left this way are not removed automatically: run `git restore -- <path>` in each one under `~/.atomic/agent/worktree-snapshots/worktrees/` to make it claimable again, and the next prebuild or resume removes the extra ones ([#4911](https://github.com/bastani-inc/atomic/issues/4911))
244
+ - Fixed concurrent first resumes of one repository on a host failing to restore some checkouts with "could not lock config file … File exists". Processes that restore the same repository at once now take turns on its shared object store, which is created in one step, so every restore succeeds. An environment variable that holds only whitespace now reports the same missing-credential precondition as an all-whitespace token file ([#4951](https://github.com/bastani-inc/atomic/issues/4951))
245
+ - Security: terminal control sequences in assistant, thinking, user and custom message text are removed before the message is rendered, so message text can no longer change the window title, write to the clipboard or clear the screen ([#4889](https://github.com/bastani-inc/atomic/issues/4889))
246
+ - `read` now reads an existing file by its full name before treating a trailing `:…` as a line selector, so files such as `build:12`, `notes:0` or `backup:2024-01-05` are read as named instead of failing or reading a different file ([#5015](https://github.com/bastani-inc/atomic/issues/5015))
247
+ - `conflict://` writes now change only the resolved region: bytes elsewhere in the file are kept exactly in any encoding, a region that is not UTF-8 is refused with `conflict-not-utf8`, and new content uses the file's CRLF or LF line endings (in a mixed file, the region's own). A conflict whose markers, separator or sides changed since it was read is refused with `conflict-stale` instead of writing lines that are no longer there ([#5015](https://github.com/bastani-inc/atomic/issues/5015))
248
+ - `conflict://*` now covers every conflict region under the working directory, as documented, not only those of the last file read with `:conflicts`; files read with `:conflicts` keep their ids, and gitignored files are skipped like `search` does ([#5015](https://github.com/bastani-inc/atomic/issues/5015))
249
+ - SQLite writes with JSON5-style content no longer rewrite text inside strings (`"port: 0x1F"`, `"+5"` or `"[a,]"` are stored as written). A row selector now matches a primary key declared without a type, such as `t.db:items:2`, for reads, updates and deletes, and row ids that look like line ranges, such as `t.db:events:2024-01-05`, `3-1` or `1.5`, select their row instead of failing ([#5015](https://github.com/bastani-inc/atomic/issues/5015))
250
+ - A fleet controller now keeps a drain when a worker host without a provider id restarts on its instance under a new host id: it drains the new host when the provider lists that id for the instance, and never removes a drained instance whose host is gone while a host it cannot match holds a child. A drain is forgotten only after three listings in a row omit its instance, so a listing that briefly misses a running instance no longer lets a drained worker serve again ([#4828](https://github.com/bastani-inc/atomic/issues/4828))
251
+ - Fixed a JSONL session that a process killed mid-write left with an unfinished last line becoming unreadable and disappearing from `/resume` until the file was edited by hand: the unfinished line, which was never saved, is now ignored with one warning naming the file, and the next message removes it, so every saved entry stays readable. A damaged line before the last one is still reported. The conflict error after another process rewrites or shortens a session file now shows the file's actual entry count ([#4993](https://github.com/bastani-inc/atomic/issues/4993))
252
+ - Fixed `edit` corrupting the character next to a match when `oldText` or `newText` started or ended with half of an emoji or another surrogate pair: the other half became `�` and the edit reported success. Such an edit is now refused with the new `EditInputError` code `text-splits-character`, and the file is left unchanged ([#5013](https://github.com/bastani-inc/atomic/issues/5013))
253
+ - Fixed the completion notice and `/tasks` row of a subagent released while it waited reading as a pause ("paused · awaiting resume … otherwise leave it paused"). They now say it was released while waiting on its call and wakes by itself when that finishes ([#5031](https://github.com/bastani-inc/atomic/issues/5031))
254
+ - Fixed a running session being deletable after another host's clock ran a minute or more ahead, this host's clock stepped forward, or the process holding it was suspended for a minute: open-session marker files of another host are now aged on the shared file system's clock, and a process on this host keeps its marker while it runs. Task heartbeats, timed wakes and SQLite lock waits are also timed on the monotonic clock, so a wall-clock step no longer delays or hastens them ([#5058](https://github.com/bastani-inc/atomic/issues/5058))
255
+ - Fixed `maxInputCost` and `maxOutputCost` letting auto routing and model fallback choose a `-fast` or `-ultrafast` model whose service-tier price is above the limit. These limits used the model's Standard price, but the model is billed at the tier price. Both limits now use the price you are billed ([#5046](https://github.com/bastani-inc/atomic/issues/5046))
256
+ - Fixed compaction trying a fallback model that failed earlier in the same turn with an error that retrying cannot fix, such as a rejected key. Compaction now skips the models that main-chat fallback skips ([#5046](https://github.com/bastani-inc/atomic/issues/5046))
257
+ - `local://` selectors no longer resolve through a dangling symbolic link to a path outside the workspace: reading or writing `local://link`, where `link` points at a missing file or directory outside the workspace (directly or through another link and `..`), is refused as escaping the workspace instead of creating the file there. Workspace session working directories get the same check ([#5045](https://github.com/bastani-inc/atomic/issues/5045))
258
+ - Fixed `find` and `search` disagreeing on patterns with a slash in Git's global excludes file (`core.excludesFile`), such as `foo/**` or `deep/**/x.log`: on Windows `find` never applied them, and `search` skipped them when it searched a path reached through a symlink or junction. Both tools now apply them the way ripgrep and Git do from the repository root ([#5068](https://github.com/bastani-inc/atomic/issues/5068))
259
+ - Fixed settings layering losing values ([#5049](https://github.com/bastani-inc/atomic/issues/5049)): a wrong-typed value in `.atomic/settings.json` or `~/.atomic/agent/settings.json` no longer hides a valid value in the matching `.pi` file, which now applies as documented; a legacy key such as `routerModel`, `queueMode`, `websockets` or `retry.maxDelayMs` in an `.atomic` file now takes precedence over the current key in the `.pi` file; saving a per-model thinking level, workflow paths, `workflows.autoAdvanceAfterSteer` or warning settings no longer erases entries another Atomic process saved under the same setting, such as `workflows.journal`; SDK `applyOverrides` values now last for the run instead of being dropped after any setting write, `reload()` or a project trust change, and a setter that changes an overridden setting replaces that override; a wrong-typed value that was fixed and then broken again is reported again; and wrong-typed entries in the legacy `skills.customDirectories` form are now reported when they are dropped
260
+ - Fixed `atomic install` of a git source with a `.` or empty path segment, such as `git:localhost/alice/.` or `https://localhost/alice/.`, deleting every other installed package of that owner or host. Such sources are now rejected like `..`, and an install, update or remove never deletes a directory that is not the package's own or that holds another package's checkout. On a case-insensitive filesystem (Windows, macOS), a source that differs from an installed one only in case, such as `https://localhost/alice/TOOL` next to `alice/tool`, is refused with an error naming both instead of updating or removing the other package's checkout ([#5055](https://github.com/bastani-inc/atomic/issues/5055))
261
+ - `atomic worker start`, `controller`, `metrics` and `status` now show the cause of a storage failure after its message, with the cause's code (for example a TLS error, a SQLSTATE or `auth-unavailable`), as `atomic storage join` does, instead of only "Storage unavailable" ([#5113](https://github.com/bastani-inc/atomic/issues/5113))
262
+ - Fixed long storage prefixes on PostgreSQL: a prefix of 25 characters or more failed with a raw `TypeError` after some sessions tables were already created, and one of 33 or more made two Intercom tables share one truncated name and reported storage unavailable. Prefixes of up to 24 characters keep working: the one Intercom index whose name did not fit under them is renamed when a store opens. A longer prefix is now refused with `StoragePrefixError` (reason `"too-long"`) before anything is created ([#5067](https://github.com/bastani-inc/atomic/issues/5067))
263
+ - Fixed a worktree snapshot being recorded as a session's latest even though a snapshot collection had deleted its content between the capture and the record, which left a snapshot that could not be restored (`blob-missing`). Recording now checks that the content is still stored, stores it again and retries, then captures once more; if that fails too, nothing is recorded and the turn warns with `blobs-collected` ([#5077](https://github.com/bastani-inc/atomic/issues/5077))
264
+ - Fixed git package sources with a long run of slashes, such as `git:example.com/a//…//b`, taking seconds to parse in `atomic install`, `update` and `remove`, and in startup package resolution: parse time grew with the square of the run. Parsing now takes time linear in the source length
265
+ - Hardened settings against keys named `__proto__`, `constructor` or `prototype` in a settings file, an SDK `applyOverrides` value or a setter such as `setWarnings`: such keys are now ignored when settings are merged, overridden and saved, so they can no longer replace the prototype of a settings object
266
+ - Fixed slash commands whose arguments start after a tab or on a new line (Shift+Enter) not being recognised: `/review` then a line break then `src/a.ts` was sent to the model unchanged instead of expanding the `review` prompt template, and extension commands and `/skill:` commands typed the same way did not run. The command name now ends at the first space, tab or line break, from the editor, RPC, the SDK and `-p`, and line breaks inside the arguments are kept. The SDK exports the parser as `parseSlashCommand` ([#5192](https://github.com/bastani-inc/atomic/issues/5192))
267
+ - Fixed built-in commands ignoring arguments that follow a tab or a line break: `/model`, `/thinking`, `/tasks`, `/export`, `/import`, `/name`, `/session snapshot`, `/login` and `/logout` now read their argument the same way prompt templates and extension commands do, so `/model` then a tab then `opus` searches for `opus` instead of being sent to the model. Argument completion for slash commands also starts after a tab ([#5192](https://github.com/bastani-inc/atomic/issues/5192))
268
+ - Fixed model fallback treating an account that is out of credit as briefly rate limited: errors such as Anthropic's "Your credit balance is too low", OpenAI's "check your plan and billing details", OpenRouter's "Insufficient credits", DeepSeek's "Insufficient Balance" and xAI's spending-limit error cost one failed request every short cooldown before falling back, and some were not fallen back from at all. They now count as an exhausted quota, so the session falls back to the next model straight away instead of retrying the account that has no credit
269
+ - Fixed `truncateHead()` and `truncateTail()` reporting output as truncated by the line limit when only its trailing newline went over the byte limit, so tools such as `find`, `grep`, `ls`, `search` and `bash` showed a truncation notice when nothing was cut. A tail truncation that cuts the only kept line to fit the byte limit now reports `bytes` instead of `lines`
270
+ - Fixed extension dialogs rejecting with `HumanInputCancelled` when their own timeout expired or their caller aborted. They now close and return `false` for confirm or `undefined` for select, input and editor, as documented.
271
+ - Fixed the reference RPC extension-UI client failing to start after the TUI API changed, leaving timed-out or aborted dialogs open, and losing overlapping dialog requests. Dialogs now appear in request order; a matching cancellation closes or removes its dialog without sending a stale answer.
272
+ - Fixed startup drafts losing line breaks and text from cancelled or timed-out text inputs. Startup screens also keep input buffered before they open, and an unfinished prompt's custom submit key no longer selects a session. Text inputs now explain how to type an answer instead of showing selector instructions.
273
+ - Fixed slow loading of long SQL-backed sessions and session listings by reading bounded keyset batches instead of rescanning every remaining row for each page. Pages count the row being returned and JSON search-text separators against their text limit, with an oversized row returned alone. Fetches grow when a batch fits and are sized to twice the rows returned when unreturned text exceeds four pages, avoiding both repeated scans of large legacy entries and a series of tiny read requests ([#4954](https://github.com/bastani-inc/atomic/issues/4954))
274
+ - Fixed chunked session writes failing permanently after an older process rewrote or deleted that session. Opening a writable SQLite session store also removes leftover entry chunks whose entries were deleted or replaced with unchunked entries. Read-only stores remain readable without changing those chunks. Stop older processes before upgrading a shared store ([#4954](https://github.com/bastani-inc/atomic/issues/4954))
275
+ - Fixed SQL session markers failing to save and stale markers never expiring on macOS 13 and early macOS 14 binaries, where SQLite lacks subsecond Unix timestamps. On the same binaries the local SQLite writers' queue removed waiting writers' tickets as abandoned, so writers stopped taking the write lock in arrival order. Session heartbeats and the writers' queue now use a millisecond database clock supported by those SQLite versions ([#4971](https://github.com/bastani-inc/atomic/issues/4971))
276
+ - Fixed footer directory and model labels sending embedded terminal commands or line breaks to the terminal ([#5243](https://github.com/bastani-inc/atomic/pull/5243))
277
+ - A `fallbackModels` entry, or a `--fallback-models` entry, naming a model from a provider an extension registers (for example a `registerProviderAlias` alias such as `github-copilot-2`) no longer prints "does not match a model with configured credentials" at startup. The chain is now checked after extensions load and model selection or restoration finishes, including after project trust approval, so bare ids use the selected provider. When no model is selected yet, bare ids use the configured default provider. An entry that really matches nothing is still reported once, even if extension loading, applying a model scope or restoring a saved model fails.
278
+ - Fixed deferred startup keeping an unknown model placeholder after an extension made a default or another model available. Existing conversations report the missing saved model and its replacement once, including after project trust approval and when `--extension` or a trusted project extension provides the model; empty sessions discard the stale warning. A model selected after deferred loading now gets the thinking level that startup with extensions already loaded gives it: the `--thinking` level or a `--models` suffix, else a continued conversation's saved level, else the per-model or default setting.
279
+ - Fixed startup that loads extensions after the session opens choosing a different model or thinking level than startup with extensions already loaded. With `--models` or `enabledModels` naming both a built-in model and an extension model, an empty session now switches to the configured default or first scoped model once the extension registers, with that model's suffix level, instead of keeping the built-in model found first. On the default interactive host, a continued conversation whose saved model comes from an extension now restores it even when built-in providers have credentials, a continued conversation without a saved thinking level starts at the default level instead of `off`, and an empty session whose model scope names an extension model gets the scope's model. Starting, resuming or switching sessions also no longer rebuilds the session context an extra time.
280
+ - Fixed `atomic storage status` and `atomic storage join` starting the database connection timeout before the storage adapter module had loaded, so a slow adapter load under a short probe timeout reported `skipped (adapter not loaded)` instead of probing the server and reporting a database that does not answer as `failed`
281
+ - Questionnaire dialogs and transcripts remove terminal control sequences from questions, options, previews, answers and notes instead of executing them. Pasting text with controls keeps the caret aligned, and custom-answer, chat and notes carets highlight whole characters, including emoji and combining accents, so the dialog's frame stays intact. Step headers, multi-select labels and the Review step's unanswered-question list stay on one line. HTML exports no longer repeat a folded answer or declined question as raw response text, and moving between questions redraws faster ([#5244](https://github.com/bastani-inc/atomic/pull/5244))
282
+ - Fixed a session resume failing with `ENOENT` when another process finished its pending Git LFS download while Atomic checked whether that download was still running. Fixed a resume that checked on a pending Git LFS download while another process was taking it over reporting that the worktree had changed and to run `git lfs pull`, and deleting the download's record, so a later resume no longer finished it if that process was interrupted. The record is now replaced in one step, so a resume never reads it half-written ([#5099](https://github.com/bastani-inc/atomic/issues/5099))
283
+ - Fixed a resumed session announcing a finished task again after its completion notice had already been delivered on another branch of the session. Resuming from the latest compaction did not read the acknowledgement saved on the other branch, so the notice was admitted a second time and could start an extra turn. The resume index now records each acknowledgement and reads it with its completion, so a resume restores the same pending completions as a whole read. Atomic rebuilds the index saved by an earlier build the first time it resumes the session ([#5249](https://github.com/bastani-inc/atomic/issues/5249))
284
+ - On Windows, concurrent resumes that restore worktrees of one repository no longer fail with a false `unwritable-path` error for the shared object store's `<store>.git.lock`. A process that creates that lock directory just as another process removes it, while a third is still checking it, gets `EPERM` from Windows for a moment. The restore treated that as a lock it could never write. It now tries again, as it does while another process holds the lock, and reports `unwritable-path` only when the refusal lasts 10 seconds ([#4951](https://github.com/bastani-inc/atomic/issues/4951))
285
+ - The jump-to-latest pill no longer loses a new message and falls back to `↓ jump to bottom` when a prompt fails whose echo a compaction, a same-session render or a rewritten prompt redrew before it was painted, while following the end ([#5243](https://github.com/bastani-inc/atomic/pull/5243))
286
+ - Counting new messages for the jump-to-latest pill no longer scans the whole transcript on every frame, and replacing or discarding a submission echo no longer scans it several times, which had slowed long sessions ([#5243](https://github.com/bastani-inc/atomic/pull/5243))
287
+
288
+ ### Removed
289
+
290
+ - Removed the Radius provider, which was operated by pi.dev. A `models.json` that configures `radius` or `"oauth": "radius"`, a `defaultProvider` of `radius`, or `--model radius/...` now reports that the provider was removed ([#5174](https://github.com/bastani-inc/atomic/issues/5174))
291
+
5
292
  ## [0.9.88-alpha.1] - 2026-11-16
6
293
 
7
294
  Atomic runs on its own libraries, workflows scale out to worker fleets on libSQL or PostgreSQL, and every screen shares one set of keys.