@bastani/atomic 0.10.15 → 0.10.16-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/__atomic_timers/index.js +112 -0
  3. package/dist/__atomic_timers/index.js.map +1 -0
  4. package/dist/_shared/dist-KOELCESV.js +2 -2
  5. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  6. package/dist/_shared/http-YFAPTIZD.js +20 -22
  7. package/dist/_shared/http-YFAPTIZD.js.map +1 -1
  8. package/dist/_shared/lib-4PES5P4V.js +2 -2
  9. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +55 -25
  10. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  11. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +13 -14
  12. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  13. package/dist/_shared/mode-shared-2QJSCUM6.js +16 -17
  14. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  15. package/dist/_shared/p0-cli-BB45ZQY6.js +23 -37
  16. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  17. package/dist/_shared/p1a-prewarm-XIU57JHF.js +6 -5
  18. package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
  19. package/dist/_shared/{p1b-elig-TVB5CBLL.js → p1b-elig-BY2G5BUE.js} +28 -36
  20. package/dist/_shared/p1b-elig-BY2G5BUE.js.map +1 -0
  21. package/dist/_shared/runtime-O4KCSG4C.js +4 -4
  22. package/dist/_shared/sdk-OHKMDJ74.js +382 -45
  23. package/dist/_shared/sdk-OHKMDJ74.js.map +1 -1
  24. package/dist/_shared/session-data-AHTU7IS6.js +3 -3
  25. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  26. package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -1
  27. package/dist/_shared/{startup-0-0-Q3MWKUK4.js → startup-0-0-ERMIDHQT.js} +296 -382
  28. package/dist/_shared/startup-0-0-ERMIDHQT.js.map +1 -0
  29. package/dist/_shared/{startup-0-1-M6OWAYHH.js → startup-0-1-RTASI3HG.js} +430 -102
  30. package/dist/_shared/startup-0-1-RTASI3HG.js.map +1 -0
  31. package/dist/_shared/{startup-0-2-2HUMCPKX.js → startup-0-2-YZZOC22D.js} +8109 -7962
  32. package/dist/_shared/startup-0-2-YZZOC22D.js.map +1 -0
  33. package/dist/_shared/{startup-0-3-4ZYBYQNM.js → startup-0-3-DE2NCS6A.js} +130 -83
  34. package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -0
  35. package/dist/_shared/startup-0-4-ZMJV547D.js +7 -7
  36. package/dist/_shared/{startup-0-5-YDW47QX6.js → startup-0-5-HZX3ZPTP.js} +411 -85
  37. package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +1 -0
  38. package/dist/_shared/startup-10-0-TDQNBDDL.js +42 -29
  39. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
  40. package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
  41. package/dist/_shared/startup-14-0-MLX36RBG.js +11 -10
  42. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  43. package/dist/_shared/startup-15-0-YUKGAC63.js +9 -8
  44. package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
  45. package/dist/_shared/startup-15-1-4S7FLMNG.js +24 -16
  46. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  47. package/dist/_shared/startup-8-0-34CBHPZH.js +40 -19
  48. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  49. package/dist/_shared/startup-8-1-LZFXSD3Z.js +129 -92
  50. package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -1
  51. package/dist/_shared/storage-command-7MGXLJGZ.js +6 -4
  52. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  53. package/dist/_shared/storage-status-K7PX2RXA.js +7 -6
  54. package/dist/_shared/storage-status-K7PX2RXA.js.map +1 -1
  55. package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
  56. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  57. package/dist/_shared/team-DOQKICG2.js +4 -3
  58. package/dist/_shared/team-DOQKICG2.js.map +1 -1
  59. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  60. package/dist/builtin/intercom/index.bundle.mjs +1 -2
  61. package/dist/builtin/intercom/package.json +1 -1
  62. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  63. package/dist/builtin/mcp/package.json +1 -1
  64. package/dist/builtin/subagents/CHANGELOG.md +6 -0
  65. package/dist/builtin/subagents/package.json +1 -1
  66. package/dist/builtin/subagents/src/extension/index.bundle.mjs +102 -42
  67. package/dist/builtin/web-access/index.bundle.mjs +1 -2
  68. package/dist/builtin/web-access/package.json +1 -1
  69. package/dist/cli/args.js +2 -2
  70. package/dist/cli/auth-cli.code.js +6 -6
  71. package/dist/cli/auth-cli.impl.js +3 -3
  72. package/dist/cli/auth-cli.js +3 -3
  73. package/dist/cli/blueprint-command.code.js +7 -6
  74. package/dist/cli/blueprint-command.code.js.map +1 -1
  75. package/dist/cli/blueprint-command.impl.js +3 -3
  76. package/dist/cli/blueprint-command.js +3 -3
  77. package/dist/cli/intercom-command.code.js +3 -3
  78. package/dist/cli/intercom-command.impl.js +3 -3
  79. package/dist/cli/intercom-command.js +3 -3
  80. package/dist/cli/list-models.code.js +2 -2
  81. package/dist/cli/list-models.impl.js +3 -3
  82. package/dist/cli/list-models.js +3 -3
  83. package/dist/cli/session-picker.code.js +2 -2
  84. package/dist/cli/session-picker.impl.js +3 -3
  85. package/dist/cli/session-picker.js +3 -3
  86. package/dist/cli/startup-ui.code.js +2 -2
  87. package/dist/cli/startup-ui.impl.js +3 -3
  88. package/dist/cli/startup-ui.js +3 -3
  89. package/dist/cli/storage-command.impl.js +3 -3
  90. package/dist/cli/storage-command.js +3 -3
  91. package/dist/cli/storage-search-session.code.js +1 -1
  92. package/dist/cli/storage-search-session.impl.js +3 -3
  93. package/dist/cli/storage-search-session.js +3 -3
  94. package/dist/cli/team-command.code.js +2 -2
  95. package/dist/cli/team-command.impl.js +3 -3
  96. package/dist/cli/team-command.js +3 -3
  97. package/dist/cli.js +2 -2
  98. package/dist/core/agent-session.d.ts +1 -0
  99. package/dist/core/debug.code.js +1 -1
  100. package/dist/core/debug.impl.js +3 -3
  101. package/dist/core/debug.js +3 -3
  102. package/dist/core/export-html/card-projection.code.js +1 -1
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  111. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  112. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  116. package/dist/core/extensions/jiti-loader.js +3 -3
  117. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  118. package/dist/core/extensions/jiti-static-loader.js +3 -3
  119. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  120. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  121. package/dist/core/extensions/loader-host-modules.js +3 -3
  122. package/dist/core/extensions/loader-virtual-modules.js +2 -2
  123. package/dist/core/extensions/runner-context.js +1 -1
  124. package/dist/core/http-dispatcher.d.ts +2 -1
  125. package/dist/core/intercom-broker-control-host.code.js +1 -1
  126. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  127. package/dist/core/intercom-broker-control-host.js +3 -3
  128. package/dist/core/intercom-broker-control.code.js +3 -3
  129. package/dist/core/intercom-broker-control.impl.js +3 -3
  130. package/dist/core/intercom-broker-control.js +3 -3
  131. package/dist/core/lock-takeover.d.ts +2 -0
  132. package/dist/core/model-config.d.ts +28 -0
  133. package/dist/core/model-registry.js +1 -1
  134. package/dist/core/model-runtime-streaming.d.ts +3 -2
  135. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  136. package/dist/core/package-manager-storage-adapters.js +3 -3
  137. package/dist/core/provider-rate-limits.d.ts +17 -10
  138. package/dist/core/provider-request-admission.d.ts +16 -0
  139. package/dist/core/resume/blueprint/barrier.d.ts +6 -6
  140. package/dist/core/resume/blueprint/build.d.ts +3 -1
  141. package/dist/core/resume/blueprint/ledger.d.ts +3 -2
  142. package/dist/core/resume/blueprint/resume.d.ts +2 -1
  143. package/dist/core/retry-policy.d.ts +3 -1
  144. package/dist/core/sdk.code.js +3 -3
  145. package/dist/core/sdk.impl.js +3 -3
  146. package/dist/core/sdk.js +3 -3
  147. package/dist/core/session-manager-core.js +6 -6
  148. package/dist/core/session-manager-list.impl.js +3 -3
  149. package/dist/core/session-manager-list.js +3 -3
  150. package/dist/core/session-manager-types.d.ts +1 -1
  151. package/dist/core/session-manager.code.js +2 -2
  152. package/dist/core/session-manager.impl.js +3 -3
  153. package/dist/core/session-manager.js +3 -3
  154. package/dist/core/session-open-markers.js +1 -1
  155. package/dist/core/session-storage.impl.js +3 -3
  156. package/dist/core/session-storage.js +3 -3
  157. package/dist/core/settings-duration.d.ts +3 -0
  158. package/dist/core/settings-manager-resource-accessors.d.ts +2 -1
  159. package/dist/core/settings-schema.d.ts +1 -0
  160. package/dist/core/storage/index.js +2 -2
  161. package/dist/core/storage/node-sqlite-file-gate.js +7 -6
  162. package/dist/core/storage/node-sqlite-file-gate.js.map +1 -1
  163. package/dist/core/storage/node-sqlite-thread.js +2 -2
  164. package/dist/core/storage/node-sqlite.js +2 -2
  165. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  166. package/dist/core/storage/offline-snapshot-file.js +3 -3
  167. package/dist/core/storage/prefix.js +3 -0
  168. package/dist/core/storage/prefix.js.map +1 -1
  169. package/dist/core/storage/provider.js +2 -2
  170. package/dist/core/storage/selection.js +2 -2
  171. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  172. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  173. package/dist/core/storage/session/branch-fork-source.js +3 -3
  174. package/dist/core/storage/session/card-view.impl.js +3 -3
  175. package/dist/core/storage/session/card-view.js +3 -3
  176. package/dist/core/storage/session/child-reader.code.js +24 -7
  177. package/dist/core/storage/session/child-reader.code.js.map +1 -1
  178. package/dist/core/storage/session/child-reader.impl.js +3 -3
  179. package/dist/core/storage/session/child-reader.js +3 -3
  180. package/dist/core/storage/session/chunked-resume-projection.code.js +1 -1
  181. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  182. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  183. package/dist/core/storage/session/expanded-child-details.code.js +3 -3
  184. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  185. package/dist/core/storage/session/expanded-child-details.js +3 -3
  186. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  187. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  188. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  189. package/dist/core/storage/session/fork-row-index.js +3 -3
  190. package/dist/core/storage/session/fork-staging.code.js +1 -1
  191. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  192. package/dist/core/storage/session/fork-staging.js +3 -3
  193. package/dist/core/storage/session/fork-window.code.js +4 -4
  194. package/dist/core/storage/session/fork-window.impl.js +3 -3
  195. package/dist/core/storage/session/fork-window.js +3 -3
  196. package/dist/core/storage/session/history-pages.impl.js +3 -3
  197. package/dist/core/storage/session/history-pages.js +3 -3
  198. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  199. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  200. package/dist/core/storage/session/jsonl-session-store.d.ts +2 -2
  201. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  202. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  203. package/dist/core/storage/session/memory-session-store.d.ts +2 -2
  204. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  205. package/dist/core/storage/session/memory-session-store.js +3 -3
  206. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  207. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  208. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  209. package/dist/core/storage/session/released-history-files.code.js +4 -4
  210. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  211. package/dist/core/storage/session/released-history-files.js +3 -3
  212. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  213. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  214. package/dist/core/storage/session/session-resume.impl.js +3 -3
  215. package/dist/core/storage/session/session-resume.js +3 -3
  216. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  217. package/dist/core/storage/session/snapshot-cut.js +3 -3
  218. package/dist/core/storage/session/snapshot-history.code.js +4 -4
  219. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  220. package/dist/core/storage/session/snapshot-history.js +3 -3
  221. package/dist/core/storage/session/sql-session-store.d.ts +13 -4
  222. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  223. package/dist/core/storage/session/sql-session-store.js +3 -3
  224. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  225. package/dist/core/storage/session/tree-outline.js +3 -3
  226. package/dist/core/storage/session/tree-presentation.code.js +1 -1
  227. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  228. package/dist/core/storage/session/tree-presentation.js +3 -3
  229. package/dist/core/storage/session/types.d.ts +20 -2
  230. package/dist/core/storage/sqlite-facade.js +14 -13
  231. package/dist/core/storage/sqlite-facade.js.map +1 -1
  232. package/dist/core/storage/storage-status.impl.js +3 -3
  233. package/dist/core/storage/storage-status.js +3 -3
  234. package/dist/core/storage/team.impl.js +3 -3
  235. package/dist/core/storage/team.js +3 -3
  236. package/dist/core/structured-output/index.impl.js +3 -3
  237. package/dist/core/structured-output/index.js +3 -3
  238. package/dist/core/tasks/heartbeat.d.ts +1 -0
  239. package/dist/core/tasks/task-completion-entry.code.js +1 -1
  240. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  241. package/dist/core/tasks/task-completion-entry.js +3 -3
  242. package/dist/core/tasks/task-file-history.code.js +3 -3
  243. package/dist/core/tasks/task-file-history.impl.js +3 -3
  244. package/dist/core/tasks/task-file-history.js +3 -3
  245. package/dist/core/tasks/task-reference-archive.code.js +3 -3
  246. package/dist/core/tasks/task-reference-archive.js +3 -3
  247. package/dist/core/tasks/task-reference-identity.js +3 -3
  248. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  249. package/dist/core/tasks/task-reference-stream.js +3 -3
  250. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  251. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  252. package/dist/core/tasks/task-view-source.impl.js +3 -3
  253. package/dist/core/tasks/task-view-source.js +3 -3
  254. package/dist/core/tools/ask-user-question/ask-user-question.d.ts +1 -1
  255. package/dist/core/tools/history-session.d.ts +2 -0
  256. package/dist/core/tools/read-url.code.js +3 -3
  257. package/dist/core/tools/read-url.impl.js +3 -3
  258. package/dist/core/tools/read-url.js +3 -3
  259. package/dist/core/worktree-snapshot/blob-store.js +5 -6
  260. package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
  261. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  262. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  263. package/dist/core/worktree-snapshot/errors.js +3 -3
  264. package/dist/core/worktree-snapshot/git.d.ts +2 -0
  265. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  266. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  267. package/dist/extensions/codemode/execute.code.js +6 -5
  268. package/dist/extensions/codemode/execute.code.js.map +1 -1
  269. package/dist/extensions/codemode/execute.impl.js +3 -3
  270. package/dist/extensions/codemode/execute.js +3 -3
  271. package/dist/extensions/codemode/renderer.code.js +1 -1
  272. package/dist/extensions/codemode/renderer.impl.js +3 -3
  273. package/dist/extensions/codemode/renderer.js +3 -3
  274. package/dist/extensions/mcp/cli.code.js +8 -4
  275. package/dist/extensions/mcp/cli.code.js.map +1 -1
  276. package/dist/extensions/mcp/cli.impl.js +3 -3
  277. package/dist/extensions/mcp/cli.js +3 -3
  278. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  279. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  280. package/dist/extensions/mcp/cli.lazy.js +3 -3
  281. package/dist/extensions/mcp/runtime.impl.js +3 -3
  282. package/dist/extensions/mcp/runtime.js +3 -3
  283. package/dist/index.js +6 -6
  284. package/dist/main-first-time-setup.code.js +2 -2
  285. package/dist/main-first-time-setup.impl.js +3 -3
  286. package/dist/main-first-time-setup.js +3 -3
  287. package/dist/modes/interactive/components/stored-tree-view.code.js +3 -3
  288. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  289. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  290. package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
  291. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  292. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  293. package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
  294. package/dist/package-manager-cli.code.js +7 -7
  295. package/dist/package-manager-cli.impl.js +3 -3
  296. package/dist/package-manager-cli.js +3 -3
  297. package/dist/rpc-entry.js +1 -1
  298. package/dist/startup-files.json +1 -1
  299. package/dist/startup-stages/10.js +1 -1
  300. package/dist/startup-stages/11.js +1 -1
  301. package/dist/startup-stages/12.js +1 -1
  302. package/dist/startup-stages/13.js +1 -0
  303. package/dist/startup-stages/2.js +2 -6
  304. package/dist/startup-stages/3.js +6 -1
  305. package/dist/startup-stages/4.js +1 -1
  306. package/dist/startup-stages/5.js +12 -1
  307. package/dist/startup-stages/6.js +8 -4
  308. package/dist/startup-stages/7.js +4 -3
  309. package/dist/startup-stages/8.js +1 -5
  310. package/dist/startup-stages/9.js +5 -1
  311. package/dist/startup-stages/stages.json +1 -1
  312. package/dist/utils/startup-database-spare.code.js +3 -3
  313. package/dist/utils/startup-database-spare.impl.js +3 -3
  314. package/dist/utils/startup-database-spare.js +3 -3
  315. package/dist/utils/tools-manager.code.js +1 -1
  316. package/dist/utils/tools-manager.impl.js +3 -3
  317. package/dist/utils/tools-manager.js +3 -3
  318. package/dist/utils/windows-cwd.js +3 -3
  319. package/dist/utils/windows-cwd.js.map +1 -1
  320. package/docs/changelog.mdx +2 -10
  321. package/docs/codemode.md +5 -2
  322. package/docs/compaction/branch-summaries.md +1 -1
  323. package/docs/compaction/custom-compactors.md +1 -1
  324. package/docs/custom-provider/api-reference.md +1 -1
  325. package/docs/custom-provider/registration.md +3 -0
  326. package/docs/custom-provider/streaming.md +1 -1
  327. package/docs/environment-variables.md +2 -2
  328. package/docs/guides/resume-on-any-machine.md +1 -0
  329. package/docs/libraries/ai.md +4 -2
  330. package/docs/libraries/codemode.md +1 -1
  331. package/docs/models/choose-a-model.md +1 -1
  332. package/docs/models-configuration.md +5 -2
  333. package/docs/models.md +32 -0
  334. package/docs/providers.md +33 -1
  335. package/docs/sdk/structured-decisions.md +4 -2
  336. package/docs/sessions.md +1 -1
  337. package/docs/settings.md +78 -16
  338. package/docs/storage/postgres/tuning.md +1 -0
  339. package/docs/subagents/reference.md +2 -1
  340. package/docs/tools.md +4 -3
  341. package/docs/worktree-snapshots/reference.md +2 -0
  342. package/docs/worktree-snapshots.md +4 -0
  343. package/package.json +9 -9
  344. package/schemas/models.schema.json +21 -0
  345. package/schemas/settings.schema.json +14 -1
  346. package/dist/_shared/p1b-elig-TVB5CBLL.js.map +0 -1
  347. package/dist/_shared/startup-0-0-Q3MWKUK4.js.map +0 -1
  348. package/dist/_shared/startup-0-1-M6OWAYHH.js.map +0 -1
  349. package/dist/_shared/startup-0-2-2HUMCPKX.js.map +0 -1
  350. package/dist/_shared/startup-0-3-4ZYBYQNM.js.map +0 -1
  351. package/dist/_shared/startup-0-5-YDW47QX6.js.map +0 -1
package/docs/providers.md CHANGED
@@ -107,6 +107,8 @@ When configuring Anthropic with environment variables instead of `/login`, Atomi
107
107
 
108
108
  Claude Opus 5 (`anthropic/claude-opus-5`, `anthropic/claude-opus-5-5`) and Claude Fable 5.2 (`anthropic/claude-fable-5-2`, $8 input / $40 output per million tokens, 1M context, 128K max output) are included in the Anthropic catalog. Both Fable 5.1 and Fable 5.2 support per-message effort and mid-conversation system messages and restrict server-side fallback to Claude Opus 5.
109
109
 
110
+ On supported models connected directly to Anthropic, Atomic now displays progress updates before tool calls instead of requesting reasoning summaries. No setup change is needed. See [Claude progress updates and reasoning summaries](/settings#claude-progress-updates-and-reasoning-summaries) for the supported models and how to get the old reasoning summaries back.
111
+
110
112
  ### GitHub Copilot
111
113
 
112
114
  - Run `/login github-copilot` and press `Enter` for `github.com` or enter your GitHub Enterprise Server domain.
@@ -403,6 +405,7 @@ atomic --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v
403
405
  - **Bedrock GPT-6 Astra:** Available as `openai.gpt-6-astra` (direct) plus `global.openai.gpt-6-astra` and `us.openai.gpt-6-astra` (inference profiles), with `low`, `medium`, `high`, `xhigh`, and `max` reasoning effort and no Fast variant. See [OpenAI built-in models](/models/reference#openai-built-in-models) for per-profile pricing.
404
406
  - **Application inference profiles and caching:** Prompt caching turns on automatically when a Claude model ID contains a recognizable model name. For application inference profile ARNs that omit the model name, export `AWS_BEDROCK_FORCE_CACHE=1` (and give custom GPT inference profiles a recognizable GPT name in `models.json` so reasoning effort is sent).
405
407
  - **Bedrock API proxies:** Set `AWS_ENDPOINT_URL_BEDROCK_RUNTIME=https://my.corp.proxy/bedrock`, `AWS_BEDROCK_SKIP_AUTH=1` if the proxy handles signing, and `AWS_BEDROCK_FORCE_HTTP1=1` if your proxy does not support HTTP/2.
408
+ - **Bedrock retries:** Leaving `retry.provider.maxRetries` unset keeps the AWS retry count. Bedrock still stops retrying when a rate limit or server error asks it to wait longer than `retry.provider.maxRetryDelayMs` (60 seconds by default), so chat can use the next eligible fallback. See [Retry](/settings#retry) for settings and examples.
406
409
 
407
410
  ### Cloudflare AI Gateway
408
411
 
@@ -475,6 +478,35 @@ export GOOGLE_CLOUD_API_KEY=your-api-key
475
478
 
476
479
  Classifiers, image models, and remote compactors never appear in `/model` and never run as your chat model.
477
480
 
481
+ ### Gemini Decisions {#gemini-decisions}
482
+
483
+ `google-decisions/gemini-decision-1` uses Google's [Gemini Decisions API](https://aistudio.google.com/docs/decisions-api) to answer yes/no, choice, and score questions about text and images. It is a classifier, not a chat model.
484
+
485
+ This is a new provider. We tested it against a simulated server, but not yet against the live Gemini API ([#6788](https://github.com/bastani-inc/atomic/issues/6788)).
486
+
487
+ 1. If you already saved a Gemini key with `/login google`, reuse it. Otherwise, [get a Gemini API key from Google AI Studio](https://aistudio.google.com/app/apikey), then run `/login google` or set `GEMINI_API_KEY` (or `GOOGLE_API_KEY`) before starting Atomic. Atomic checks the saved `google` key first, then `GEMINI_API_KEY`, then `GOOGLE_API_KEY`. There is no `/login google-decisions` entry, and the API is not available through Vertex AI.
488
+ 2. Open `/settings` → **Decision model** and choose `google-decisions/gemini-decision-1`, or add this to [your `settings.json`](/settings#decisionmodel) and run `/reload`:
489
+
490
+ ```json
491
+ { "decisionModel": "google-decisions/gemini-decision-1" }
492
+ ```
493
+
494
+ Saving a key alone does not switch your decision model. Set `decisionModel` to `"auto"` to use your current chat model again. To use Gemini only for individual requests, leave your setting alone. In codemode, get the model with `models.getModelOfType("classifier", "google-decisions", "gemini-decision-1")` and pass it to [`models.classify()`](/codemode#classify).
495
+
496
+ **Limits:** Each request can have 1 to 1,000 questions. Choice questions need 2 to 255 options; score questions need 2 to 255 levels. Google checks the 262,144-token limit across the input and all questions. Atomic sends images inline and caps the encoded request at 100 MB. See Google's [supported image formats](https://aistudio.google.com/docs/decisions-api#input) and [request limits](https://aistudio.google.com/docs/decisions-api#limits).
497
+
498
+ **If a request fails:**
499
+
500
+ | What you see | What to do |
501
+ | --- | --- |
502
+ | No key, rejected key, or permission denied (HTTP 400 with `API_KEY_INVALID`, 401, or 403) | Save a valid Gemini Developer API key with `/login google` or check the environment variables above. A Vertex credential will not work. |
503
+ | Invalid or oversized request (HTTP 400 or 413) | Check question and option counts, shorten the input, split the questions across calls, or remove large images. |
504
+ | Model or endpoint not found (HTTP 404) | Check the exact model ID above. If you use a proxy, check that it forwards the Gemini Decisions endpoint. |
505
+ | Temporary rate limit (HTTP 429) or server error (HTTP 5xx) | Atomic can retry. It honors a temporary rate limit's wait time only if it is within the retry cap; a longer wait or an exhausted daily quota skips same-model retries. See [Google's rate limits](https://aistudio.google.com/docs/rate-limits#gemini-decision). |
506
+ | Google blocks the input, or returns an invalid answer | Atomic does not retry the same request. Revise the input or choose another classifier if the problem persists. |
507
+
508
+ Structured decisions try the next eligible candidate or the current chat model when fallback is allowed. Chat fallback does not return probabilities. Direct codemode calls report the failure instead of choosing another model. See [Structured decision limits](/sdk/structured-decisions#provider-behavior-and-limits).
509
+
478
510
  ### TypeSafe Jev {#typesafe-jev}
479
511
 
480
512
  `typesafe/jev-latest` and `typesafe/jev-1.14.0` are Atomic's direct TypeSafe classifiers. Save your key with `/login typesafe` or set `TYPESAFE_API_KEY` (stored credentials take precedence).
@@ -484,7 +516,7 @@ Classifiers, image models, and remote compactors never appear in `/model` and ne
484
516
  - **Gateway Jev:** Atomic also registers Jev classifiers on **OpenRouter** (`openrouter/~typesafe/jev-latest`, `typesafe/jev-1.13`, `typesafe/jev-1.14`, 262K with images), **Vercel AI Gateway** (`vercel-ai-gateway/typesafe-ai/jev`, `jev-1.13.0`, `jev-1.14.0`, 32K text only), and **OpenCode Zen** (`opencode/jev-1.13`, `jev-1.13-free`, 32K text only).
485
517
  - **Failures and fallback:** Classifier candidates are skipped when a schema is not a finite Choice. Missing credentials, size rejections, refusals, or malformed classifier output fall back to your chat model or next candidate (HTTP 401 indicates an invalid key, HTTP 422 a contract error, HTTP 429/529 rate limit or overload). See [Structured decision limits](/sdk/structured-decisions#provider-behavior-and-limits).
486
518
 
487
- For all built-in classifiers (including OpenAI Decisions, Cloudflare Clef, OpenRouter, Vercel AI Gateway, and local `llama.cpp`) and image models (`openai-images`, `openrouter`), see [Use classifier models](/models#use-classifier-models) and [Use image models](/models#use-image-models).
519
+ For all built-in classifiers (including Gemini Decisions, OpenAI Decisions, Cloudflare Clef, OpenRouter, Vercel AI Gateway, and local `llama.cpp`) and image models (`openai-images`, `openrouter`), see [Use classifier models](/models#use-classifier-models) and [Use image models](/models#use-image-models).
488
520
 
489
521
  ### Morph compaction {#morph-compaction}
490
522
 
@@ -69,7 +69,7 @@ Inside an extension handler, pass `settings: { getDecisionModel: () => ctx.getDe
69
69
  - `questions`: non-empty record mapping caller-chosen IDs to `choice`, `bool`, or `score` question definitions.
70
70
  - `instructions`: optional top-level context shared across all questions. Defaults to ``"Answer each question about `state`."`` and must be non-blank if supplied.
71
71
  - `deadline`: optional positive safe integer wall-clock limit in milliseconds covering credential screening, requests, retries, repairs, and fallbacks. Defaults to `settings.getHttpIdleTimeoutMs?.()` (from [`httpIdleTimeoutMs`](/settings#http)), or 10 minutes if unset.
72
- - `retry`: optional `RetryPolicy` for transient chat transport errors. Precedence is `request.retry` → `settings.getRetrySettings?.()` → `{ enabled: true, maxRetries: 3, baseDelayMs: 2000 }`.
72
+ - `retry`: optional retry policy for temporary classifier and chat failures. Precedence is `request.retry` → `settings.getRetrySettings?.()` → `{ enabled: true, maxRetries: 3, baseDelayMs: 2000 }`. No retry is sent for an exhausted account quota or for a server wait longer than `maxRetryDelayMs` (60,000 ms by default). A fallback can still answer if the request allows one. For the settings-file equivalent, see [Retries outside chat](/settings#retries-outside-chat).
73
73
  - `signal`: optional `AbortSignal`; cancellation rejects immediately with `signal.reason`.
74
74
  - `model`: optional exact `provider/model` ID to use instead of `decisionModel` (cannot be `"auto"` or have surrounding whitespace).
75
75
  - `requireProbabilities`: when `true`, only a classifier may answer.
@@ -125,6 +125,8 @@ Every `DecisionError` exposes `code`, `hint`, `retryable`, `cause`, and `fields(
125
125
  | `DecisionOutputError` | `invalid-output` | The model responded, but output failed schema validation after repairs | `model`, `detail` | Clarify questions or pick another model. |
126
126
  | `DecisionProviderError` | `provider-failure` | The provider request failed (or credential screening threw) | `model`, `providerStatus`, `providerCode`, `retryAfterMs`, `detail` | `retryable` is `true` **only** when `providerCode` is `"rate_limit_exceeded"` or `"insufficient_quota"`; otherwise check provider status and auth. |
127
127
 
128
+ When a provider reports a throttle or exhausted quota and supplies retry advice, the decision error keeps that delay as `retryAfterMs`, in milliseconds, even when it exceeded the retry cap. For an exhausted quota, wait for a reset, replenish the account, or use another provider rather than retrying right away.
129
+
128
130
  <Note>
129
131
  Legacy `routerModel` entries in `settings.json` migrate to `decisionModel` automatically (an existing `decisionModel` wins, and invalid legacy values are ignored with a one-time warning). `DecisionConfigError` still recognizes the legacy decode-only code `"renamed-setting"` when rehydrating serialized errors from older processes. See [decisionModel](/settings#decisionmodel).
130
132
  </Note>
@@ -282,7 +284,7 @@ One wall-clock deadline covers the entire call: credential screening, every repa
282
284
  - **Default deadline:**
283
285
  - `decide()` and `structured_output`: read `httpIdleTimeoutMs` from settings/session first, then fall back to 10 minutes (`600_000` ms).
284
286
  - Standalone `generateStructuredOutput()`: defaults directly to 10 minutes (`600_000` ms) and does **not** read `settings.getHttpIdleTimeoutMs()`. Pass `timeoutMs` explicitly to override it.
285
- - Setting `httpIdleTimeoutMs` to `0` (`"disabled"`) uses JavaScript's maximum timer delay (`2,147,483,647` ms, ~24.8 days).
287
+ - Setting `httpIdleTimeoutMs` to `0` (`"disabled"`) uses a default decision deadline of `2,147,483,647` ms (~24.8 days). An explicit deadline can be longer.
286
288
  - **On expiration:** Atomic aborts the in-flight request (even if the provider ignores abort signals) and rejects with `DecisionTimeoutError`, including `timeoutMs`, `elapsedMs`, `phase`, `hint`, and per-attempt timings (for example, `Attempts: 1) stopReason=stop 25m02s; 2) still generating 4m58s.`). Timeouts are final and never trigger further repairs or fallbacks.
287
289
 
288
290
  ### Caller cancellation (`AbortSignal`)
package/docs/sessions.md CHANGED
@@ -111,7 +111,7 @@ Press `Ctrl+S` to cycle sort modes: **Threaded** (default; groups forks under th
111
111
 
112
112
  Once the agent goes idle, Atomic generates a one-line summary using the session's active model. Summaries run for saved interactive and RPC sessions and skip `--no-session`, `-p`, JSON mode, internal sessions, and sessions with fewer than 4 entries on the active branch.
113
113
 
114
- Summary generation feeds up to 4,000 tokens of recent conversation, caps the stored line at 160 characters (truncated with `…`), counts toward session usage, cancels on new input or exit, and retires on a later branch summary. Disable summaries with `"sessionSummary": { "enabled": false }`.
114
+ Summary generation feeds up to 4,000 tokens of recent conversation, caps the stored line at 160 characters (truncated with `…`), counts toward session usage, cancels on new input or exit, and retires on a later branch summary. If the account is out of quota or the server asks for a wait longer than the [retry limit](/settings#retries-outside-chat), Atomic skips that summary. The session remains available in the picker. To turn off summaries, set `"sessionSummary": { "enabled": false }`.
115
115
 
116
116
  ### Internal and subagent sessions
117
117
 
package/docs/settings.md CHANGED
@@ -16,6 +16,7 @@ Edit these files directly or run `/settings` to change common options interactiv
16
16
  ## How settings load and save
17
17
 
18
18
  - **Strict JSON and syntax errors.** `settings.json` must be valid JSON (no `//` comments or trailing commas; leading UTF-8 BOMs are stripped). If a file has a JSON syntax error, Atomic warns, uses defaults for that scope, and stops writing to that scope so your file is never overwritten.
19
+ - **Durations.** Numeric timeouts, delays, and intervals must be finite and non-negative. Atomic names invalid settings when it loads the file. Retry fields with invalid values fall back to the next settings scope or the default; invalid transport timeouts still stop requests that use them. Options that accept a duration such as `30s` or `"disabled"` keep accepting it.
19
20
  - **Automatic startup defaults.** Interactive model or thinking switches (`/model`, `/thinking`, or cycling shortcuts) save `defaultProvider`, `defaultModel`, `defaultThinkingLevel`, and `modelThinkingLevels`. `/scoped-models` saves `enabledModels`. SDK calls, session restores, and automatic fallbacks do not overwrite saved defaults unless you request it.
20
21
  - **Editor schema and safe merges.** Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/settings.schema.json"` for editor completion and validation. Atomic preserves `$schema`, unknown keys (such as extension settings like `subagents.agentOverrides`), symlinks, and concurrent external edits. Saving writes only changed fields to `.atomic` (and only changed keys inside object settings such as `modelThinkingLevels`).
21
22
  - **Scope merging and legacy `.pi` files.** Within one scope, `.atomic` overrides `.pi` per file, so legacy `queueMode` in `.atomic` beats `steeringMode` in `.pi`, and setting an array to `[]` in `.atomic` clears the `.pi` array in that scope. Across global and project scopes, `packages`, `extensions`, `skills`, `prompts`, and `themes` combine rather than replace; setting `"packages": []` in `.atomic/settings.json` clears only a legacy `.pi/settings.json` in that project, not global `~/.atomic/agent/settings.json`. Non-resource arrays (`enabledModels`, `fallbackModels`, `npmCommand`, `resume.cache`) replace the global array. Legacy `skills` objects (`{ "enableSkillCommands": ..., "customDirectories": [...] }`) migrate automatically on load.
@@ -55,7 +56,8 @@ See [Choose a model](/models/choose-a-model) for everyday model selection, [Mode
55
56
  | `decisionModel` | string | `""` | Model for `structured_output` (when omitted) and `decide()`: exact `provider/model` (chat or classifier), or `""`/`"auto"` for the current chat model. See [`decisionModel`](#decisionmodel) |
56
57
  | `defaultThinkingLevel` | string | unset | Startup thinking level (`"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`), clamped to model support |
57
58
  | `modelThinkingLevels` | object | unset | Per-model startup thinking levels keyed by `"provider/modelId"` |
58
- | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
59
+ | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the terminal UI; does not hide visible progress updates |
60
+ | `anthropicThinkingDisplay` | `"updates"` or `"summarized"` | `"updates"` on supported direct Claude models | See [Claude progress updates and reasoning summaries](#claude-progress-updates-and-reasoning-summaries) |
59
61
  | `thinkingBudgets` | object | unset | Custom token budgets per thinking level (native on Anthropic, Google, and Bedrock; OpenAI-compatible when `compat.thinkingTokenBudgetField` or `supportsThinkingTokenBudget` is set) |
60
62
  | `showCacheMissNotices` | boolean | `false` | Show notices for significant prompt-cache misses, billed compaction or branch summaries, and provider recovery diagnostics (such as dropped Anthropic thinking blocks), including on resume |
61
63
  | `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"idle"` | Keep eligible prompt caches warm during runs (`"streaming"`, up to 60 min after the starting request) or up to 30 min between runs (`"idle"`). `"off"` disables. Refreshes incur provider cost. Global setting only |
@@ -66,6 +68,23 @@ See [Choose a model](/models/choose-a-model) for everyday model selection, [Mode
66
68
  - **Unsupported saved default provider.** If `defaultProvider` and `defaultModel` name a provider still unsupported after extensions load, Atomic does not switch providers silently. Interactive mode warns, print and JSON modes warn on stderr and exit nonzero (stdout stays valid JSONL), and RPC rejects `prompt` until an explicit model switch succeeds. If the provider is supported but the model is unknown or unauthenticated, normal auto-selection applies.
67
69
  - **Subagents (`model: "auto"`).** Subagents use `defaultProvider`/`defaultModel` when authenticated (at agent `thinking`, else `modelThinkingLevels`, else `defaultThinkingLevel`, else `medium`), falling back to the launching session's model. When `enabledModels` or `--models` is active, subagent model selection must stay inside that scope. Built-in agent overrides live under `subagents.agentOverrides`; see [Subagent reference](/subagents/reference#automatic-model-selection).
68
70
 
71
+ ### Claude progress updates and reasoning summaries
72
+
73
+ On Anthropic's API, Claude Opus 5.5, Sonnet 5.5, Fable 5/5.1/5.2, and Mythos 5.1/5.2 previously mixed the model's progress updates into its reasoning summaries. For these models, Atomic now asks Anthropic for progress updates only (`display: "updates"`). The updates appear as assistant text before tool calls, even when `hideThinkingBlock` is on. No change to your settings is needed to see them. Print mode writes progress to stderr and leaves only the final answer on stdout.
74
+
75
+ Anthropic sends a short summary of each update, not the full note, and does not send reasoning summaries in the new default mode. To get the old reasoning summaries back, add these settings to `~/.atomic/agent/settings.json`:
76
+
77
+ ```json
78
+ {
79
+ "anthropicThinkingDisplay": "summarized",
80
+ "hideThinkingBlock": false
81
+ }
82
+ ```
83
+
84
+ In `"summarized"` mode Anthropic still mixes progress and reasoning together, so Atomic shows both as thinking. To switch back to visible progress, remove `anthropicThinkingDisplay` or set it to `"updates"`. Other models and providers are unchanged. Atomic leaves earlier messages as saved because it cannot tell which parts of an old summary were progress updates.
85
+
86
+ SDK callers can override the display per request with `anthropicThinkingDisplay` in `streamSimple` or with `thinkingDisplay` in Anthropic-specific stream options. Set `compat.thinkingDisplay` in your [model configuration](/models-configuration#anthropic-messages) to change the default for one model.
87
+
69
88
  ### Model scope (enabledModels) {#enabledmodels}
70
89
 
71
90
  `enabledModels` (and the one-run CLI flag `--models`) restricts the active set of authenticated models for a session. Omit it or set `[]` to leave every authenticated model active.
@@ -141,12 +160,17 @@ Ordered fallback chain for main-chat turns when the active model fails:
141
160
  - **Entry format and matching.** Use `provider/model` (preferred; bare IDs and fuzzy substrings also match, and exact unmodified IDs containing `/` or `:` such as `qwen/qwen3-coder:exacto` match first) with an optional case-insensitive `:off`, `:minimal`, `:low`, `:medium`, `:high`, `:xhigh`, or `:max` suffix (clamped to model support). Run `atomic --list-models` for IDs. Invalid `:thinking` suffixes or unmatched entries warn once after extensions load and are skipped. Ambiguous bare IDs prefer the current or default provider and skip if neither matches.
142
161
  - **Thinking level without a suffix.** Uses `defaultThinkingLevel`, else the current session's thinking level, else `"medium"`, clamped to model support (`modelThinkingLevels` is not consulted during fallback).
143
162
  - **CLI precedence.** `--model` runs strictly as named and falls back only to `--fallback-models`, ignoring settings `fallbackModels`. `--no-fallback` disables fallback for one run, and `--fallback-models` replaces this list for one run. Press `Esc` during a retry wait or model switch to cancel. See [CLI model options](/reference/cli#model-options).
144
- - **What retries vs. falls back.** Fallback eligibility is broader than same-model retry eligibility:
145
- - **Retry same model, then fall back:** rate limits, transient server or network errors, timeouts, degenerate empty completions (no content and zero output tokens), and provider-intercepted zero-output canned safety refusals. Unrecognized errors (no status, code, or recognized message pattern) are retried on the same model first only when `fallbackModels` is configured, so a single unrecognized failure does not immediately switch models.
146
- - **Skip same-model retry and fall back immediately:** authentication failures (HTTP 401/403, Codex token invalidation), unavailable models, incompatible requests, refused TLS certificates (each fallback is tried once), quota exhaustion (`The usage limit has been reached`), and content-filter refusals (such as OpenAI HTTP 422 `cyber_policy`, Anthropic refusal, or `content_filter`, unless `retry.fallbackOnContentFilter: false` is set to retry on the same model instead).
147
- - **Context overflow:** compacts first, and falls back only if compaction is off, fails, or does not clear the overflow.
148
- - **Never falls back:** `Esc` cancellations and non-fallbackable task errors. With `retry.enabled: false`, retryable errors advance immediately.
149
- - **Skipping broken providers or models during a turn.** Unauthenticated providers are skipped before sending a request (if none have credentials, Atomic fails immediately and lists the missing providers). Rejected credentials (HTTP 401, `invalid_api_key`, `authentication_error`) exclude that provider for the rest of the turn; model-scoped HTTP 403 or incompatible-request errors exclude only that model across all reasoning suffixes.
163
+ - **What retries vs. falls back.** Atomic tries the next eligible entry in `fallbackModels` when:
164
+ - **The account has run out of quota, credits, or spending allowance.** Retries do not refill a balance. This includes OpenAI Chat or compatible gateways reporting exhausted quota, Anthropic reporting too little credit (with an API key or in signed-in Fast mode), and OpenCode Zen, OpenCode Go, or Z.ai reporting that a plan limit is exhausted. Atomic skips models on that account for the rest of the turn, even under another provider name. Top up, wait for the quota to renew, or add a fallback that uses a different account.
165
+ - **The provider asks for a wait above your limit.** A rate limit (HTTP 429) or server error (HTTP 5xx) with a retry hint above `retry.provider.maxRetryDelayMs` skips same-model retries. Hints at or below the cap and transient errors without a hint keep the normal retry budget. See [Retry](#retry) to change the limit.
166
+ - **A content filter declines the request.** This includes an OpenAI content refusal, an Anthropic refusal or sensitive-content stop, and a Gemini or Vertex AI safety block on the prompt or response. Atomic tries the next model by default; set `retry.fallbackOnContentFilter` to `false` to keep the retry on the same model instead. This does not disable the provider's filters.
167
+ - **The model cannot serve the request.** Authentication failures, missing models, incompatible requests, and refused TLS certificates skip same-model retries. A custom `pi-messages` gateway's HTTP 404 means the model is unavailable, and HTTP 400 means the request is incompatible unless the gateway provides a more specific error.
168
+ - **Same-model retries run out.** Short rate limits, transient server or network errors, timeouts, empty completions, and provider-intercepted zero-output canned refusals retry first. An unrecognized error retries first only if you have configured `fallbackModels`. With `retry.enabled: false`, these failures advance without agent-level retries.
169
+ - **The request is too large and compaction cannot fix it.** Atomic tries compaction first, then falls back only if compaction is off, fails, or does not clear the context overflow. `Esc` cancellations and non-fallbackable task errors never advance the chain.
170
+ - **When several models use the same account.** A rejected login or key (HTTP 401, or HTTP 403 that explicitly rejects the credential) excludes the entire account for the rest of the turn. An account-wide rate-limit wait above your retry limit skips other models on that account while that wait still exceeds the limit. A cooldown or access restriction for one model does not disqualify other models on the account.
171
+ - **How Atomic matches accounts.** Two models share account limits if they use the same API endpoint (`baseUrl`) and the same API key or sign-in token, even when they have different provider names. A trailing slash on the URL does not make it a different endpoint. For Codex, Atomic matches the ChatGPT account itself, even after a token is renewed. For cloud sign-ins without a key, it uses the configured identity, such as an AWS profile or the Vertex project, location, and credential file (if set).
172
+ - **Choosing an independent backup.** No settings change is needed. For a backup that can serve the request when an account runs out of quota, use a separate account or a different provider, as in the example above. A new provider name alone is not a backup account.
173
+ - **Missing credentials and incompatible requests.** Atomic skips providers that aren't signed in or configured with a key. If none of the models has credentials, it stops and lists the missing providers. An incompatible request excludes only the model that rejected it, including variants of that model with different reasoning levels.
150
174
  - **Persistence, print output, and billing.** Once a fallback runs, it stays active for later turns (keeping thinking-level changes) until you switch via `/model` or model cycling. In print mode (`-p`), fallback notices and the final `Model: ran on <fallback>, not the requested <model>.` line go to **stderr** so stdout stays clean. Because switching providers changes billing and data-handling terms, list only approved providers.
151
175
 
152
176
  ### decisionModel
@@ -157,7 +181,7 @@ Ordered fallback chain for main-chat turns when the active model fails:
157
181
 
158
182
  Selects the model used for `structured_output` calls (when no explicit `model` is passed; classifiers answer finite `Choice` schemas, otherwise Atomic tries `fallbackModels` and then the current chat model) and extension [`decide()`](/sdk/structured-decisions#decide) calls. It never changes your chat model or subagent execution model.
159
183
 
160
- - **Configure.** Set in JSON, open `/settings` and choose **Decision model** (updates project override if present, otherwise global), or update via SDK/RPC—changes made through `/settings`, the SDK, or RPC take effect immediately without `/reload`. `""` or `"auto"` uses the current chat model; pinning a model requires an exact case-sensitive `provider/model` of a registered classifier (such as `typesafe/jev-latest`, `vercel-ai-gateway/typesafe-ai/jev`, `opencode/jev-1.13`, or `opencode/jev-1.13-free`) or chat model (classifiers are checked before chat models). Run `/reload` only after editing `settings.json` externally.
184
+ - **Configure.** Set in JSON, open `/settings` and choose **Decision model** (updates project override if present, otherwise global), or update via SDK/RPC—changes made through `/settings`, the SDK, or RPC take effect immediately without `/reload`. `""` or `"auto"` uses the current chat model; pinning a model requires an exact case-sensitive `provider/model` of a registered classifier (such as [`google-decisions/gemini-decision-1`](/providers#gemini-decisions), `typesafe/jev-latest`, `vercel-ai-gateway/typesafe-ai/jev`, `opencode/jev-1.13`, or `opencode/jev-1.13-free`) or chat model (classifiers are checked before chat models). Run `/reload` only after editing `settings.json` externally.
161
185
  - **Validation and runtime fallback.** A wrong JSON type or whitespace-padded string fails with an error when `decide()`, `structured_output`, or `/settings` reads `decisionModel`. An unregistered ID, bare ID without `provider/`, image model, or compactor model fails with an error during `decide()` or `structured_output` with no explicit `model` instead of falling back (`/settings` shows it as unavailable without failing). Once a registered classifier is selected, runtime failures (missing credentials, context error, refusal, or malformed output) fall back silently to the current chat model and log in [debug mode](#debug-mode). Chat models get 1 initial attempt plus 3 repair retries within [`httpIdleTimeoutMs`](#http). Cancellation does not fall back.
162
186
  - **Credentials, cost, and legacy migration.** Authenticate a pinned classifier with its provider login (for example `/login typesafe` or `TYPESAFE_API_KEY`); classifiers do not appear in `/model`. An explicit `""` in project settings overrides a global selection. Valid legacy `routerModel` values migrate automatically when `decisionModel` is absent without rewriting the file; removed `modelRouting` and built-in override `modelConstraints`/`taskNeeds` keys are cleaned up automatically on startup with a one-time notice.
163
187
 
@@ -253,7 +277,7 @@ Atomic writes these keys automatically in global `settings.json`. Leave them unc
253
277
  | `followUpMode` | string | `"one-at-a-time"` | Follow-up message delivery: `"one-at-a-time"` or `"all"` |
254
278
  | `transport` | string | `"auto"` | Multi-transport provider preference: `"auto"`, `"websocket-cached"`, `"websocket"`, or `"sse"` (legacy boolean `websockets` migrates here) |
255
279
  | `websocketConnectTimeoutMs` | number or string | `15000` | WebSocket handshake timeout (ms, duration string, or `"disabled"`/`0`) |
256
- | `streamDeadlineMs` | number or string | `300000` | Max idle gap between provider stream events below HTTP (ms, duration string like `"30s"`, `"5m"`, `"1h"`, or `"disabled"`/`0`). Cuts stalled streams for retry or fallback; Anthropic `ping` events reset the timer |
280
+ | `streamDeadlineMs` | number or string | `300000` | Longest gap without new content after a provider stream opens (ms, a duration such as `"5m"`, or `"disabled"`/`0`). Pings, empty updates, and metadata do not reset the timer |
257
281
 
258
282
  How `transport` modes work on providers that support both WebSocket and SSE (such as OpenAI Codex):
259
283
 
@@ -305,20 +329,44 @@ For the global HTTP idle timeout, see [HTTP](#http) (`httpIdleTimeoutMs`).
305
329
  | `retry.enabled` | boolean | `true` | Enable agent-level retry on transient errors |
306
330
  | `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts |
307
331
  | `retry.baseDelayMs` | number | `2000` | Base exponential backoff delay (2s, 4s, 8s) |
308
- | `retry.maxAgentDelayMs` | number | `60000` | Cap on agent-level backoff (`0` retries immediately) |
332
+ | `retry.maxAgentDelayMs` | number | `60000` | Caps Atomic's own backoff, not a server-requested wait; `0` makes only that local backoff immediate. |
309
333
  | `retry.fallbackOnContentFilter` | boolean | `true` | Advance to next `fallbackModels` entry on content-filter refusals (such as OpenAI HTTP 422 `cyber_policy`); `false` retries on the same model |
310
- | `retry.provider.timeoutMs` | number | `httpIdleTimeoutMs` | Per-request provider timeout in ms. Defaults to `httpIdleTimeoutMs` (10 min by default, or `2147483647` ms when `httpIdleTimeoutMs` is `0`/`"disabled"`). Passing `0` explicitly times out immediately |
334
+ | `retry.provider.timeoutMs` | number | `httpIdleTimeoutMs` | Time limit in ms for request setup and for receiving HTTP response headers after sending. Defaults to `httpIdleTimeoutMs` (10 min). Disabling that setting disables Atomic's default request deadline. Passing `0` times out immediately |
311
335
  | `retry.provider.maxRetries` | number | unset | Provider client retries. Most providers default to `0` so agent-level retry controls backoff; Amazon Bedrock keeps AWS SDK defaults when unset, and classifier APIs default to `2` |
312
- | `retry.provider.maxRetryDelayMs` | number | `60000` | Max server-hinted retry delay before failing fast (`0` disables cap; legacy `retry.maxDelayMs` migrates here) |
336
+ | `retry.provider.maxRetryDelayMs` | number | `60000` (60 seconds) | Longest server-requested retry wait across providers, including Amazon Bedrock. A longer wait advances chat to the next fallback; `0` disables that limit and waits the full time the server requests. The old `retry.maxDelayMs` setting migrates here. |
313
337
 
314
338
  <Warning>
315
- Do not set `retry.provider.timeoutMs` to `0` to disable timeouts—an explicit `0` is passed straight to provider clients and times out immediately. Leave `retry.provider.timeoutMs` unset and set `httpIdleTimeoutMs` to `0` or `"disabled"` instead.
339
+ Do not set `retry.provider.timeoutMs` to `0` to disable timeouts. It makes an HTTP request time out immediately; setup still uses the default limit. Leave `retry.provider.timeoutMs` unset and set `httpIdleTimeoutMs` to `0` or `"disabled"` instead. The OpenAI, Azure OpenAI, and Anthropic SDKs still enforce their own request timeout of at most about 24.8 days. If that timeout expires, Atomic treats it as an ordinary transient request failure. The OpenAI and Anthropic SDKs still enforce a limit of about 25 days; Atomic treats it as a retryable timeout.
316
340
  </Warning>
317
341
 
318
- - **Server retry hints.** Atomic honors `Retry-After-Ms`, `Retry-After`, Cloudflare 5xx `retry_after`, and Google `RetryInfo.retryDelay` up to `retry.provider.maxRetryDelayMs`, failing immediately if the server asks for longer (such as a 5-hour quota reset). This applies across OpenAI, OpenAI-compatible, Codex, Anthropic, Azure OpenAI, Mistral, Google, Vertex, and Bedrock. Cloudflare 520 to 524 and connection resets count as transient; non-retryable 4xx and quota errors fail immediately.
342
+ - **Server retry hints.** Chat applies `retry.provider.maxRetryDelayMs` to server hints across providers, including provider-client retries on Amazon Bedrock. For example, if a gateway's HTTP 503 response asks for a six-minute wait in its headers or body, the default 60-second limit sends chat to the next available fallback immediately. When retrying, chat shows a countdown for the full server wait; press `Esc` to cancel it. Without a hint, Atomic uses its ordinary backoff. Recognized hints include `Retry-After-Ms`, `Retry-After`, Bedrock's `X-Amz-Retry-After`, Cloudflare's `retry_after`, and Google's `RetryInfo.retryDelay`. For an Anthropic HTTP 429 with no explicit delay, Atomic uses the reset time for the depleted rate-limit bucket. If there is no eligible fallback, the error is shown instead of waiting above the limit.
343
+ - **Classifier decisions in extensions.** [`decide()`](/sdk/structured-decisions#decide) uses `retry.provider.maxRetryDelayMs` for its classifier requests too. For example, `{ "retry": { "provider": { "maxRetryDelayMs": 5000 } } }` skips a retry if the provider requests more than five seconds. When fallback is allowed, the current chat model can answer instead; callers that require probabilities get the classifier error. The default cap remains 60 seconds.
344
+ - **Long waits.** An accepted retry can wait more than about 25 days. Interactive chat shows the time remaining, and print mode writes a notice for a wait of a day or more. Press `Esc` in chat or `Ctrl+C` in print mode to cancel. Elapsed waits may pause while the computer is asleep; a dated provider cooldown is checked again after wake. In-process retry waits are not saved across restarts.
319
345
  - **Refused TLS certificates.** Untrusted certificates (such as a self-signed certificate or corporate TLS proxy) are never retried. The error names the host, the error code (such as `SELF_SIGNED_CERT_IN_CHAIN`), and how to trust a private CA with [`NODE_EXTRA_CA_CERTS`](/environment-variables#tls-certificates). Connection resets during TLS handshakes still retry.
320
346
  - **GitHub Copilot long cuts.** A stream cut after 5 minutes or more gets 1 retry; a second consecutive long cut switches to `fallbackModels` or fails with guidance. See [Streams cut after a long attempt](/providers#streams-cut-after-a-long-attempt).
321
- - **SDK retry deadlines.** Programmatic callers can pass a monotonic `retryDeadline` with `signal` on provider requests to avoid starting backoff past a local budget; see [Custom provider streaming](/custom-provider/streaming).
347
+ - **SDK retry deadlines.** A running `retryDeadline` also ends a retry that is waiting on an extension request gate, a provider cooldown, or a local request budget. The expired retry is not sent. See [Custom provider streaming](/custom-provider/streaming).
348
+
349
+ ### When a provider stops responding
350
+
351
+ - **Before sending:** Press Esc to cancel setup or stop waiting for a request gate, cooldown, or local request budget. Setup, including checking a fallback model's credentials, uses `retry.provider.timeoutMs`. Waiting for permission to send has its own `httpIdleTimeoutMs` limit and does not use up the request's HTTP timeout. A running SDK retry deadline can end that wait sooner. If either wait times out, Atomic does not send the request.
352
+ - **Waiting for a response:** `retry.provider.timeoutMs` is the limit for each HTTP attempt to receive response headers, including Gemini, Vertex, Pi, and Bedrock. WebSocket handshakes use `websocketConnectTimeoutMs` instead. When Atomic inspects an HTTP error body for details, such as which model hit a rate limit, it waits at most 250 ms and no longer than the remaining request timeout. If the body stalls, Atomic uses the status and headers without waiting for the rest.
353
+ - **Waiting for an extension:** Payload and response hooks use `retry.provider.timeoutMs`. Each stream-event hook uses `streamDeadlineMs` (or the request timeout if the stream deadline is disabled). Esc stops waiting for a hook even if the extension itself does not finish. A hook timeout names the hook that stalled.
354
+ - **After the stream opens:** `streamDeadlineMs` limits how long Atomic waits for new content. Non-empty text, thinking, or tool-call updates, completed blocks, and events that end the response count as progress. Pings, empty updates, and metadata do not. Increase this setting if a model legitimately goes quiet for longer while thinking. This is not a limit on the total length of a progressing response.
355
+
356
+ Request and stream timeouts are temporary failures, so normal retry and fallback settings apply. Esc cancels the attempt instead of retrying it.
357
+
358
+ For example, to allow up to two minutes for a server-requested retry wait and keep content refusals on the current model, add this to `settings.json`. Neither change is required for normal use:
359
+
360
+ ```json
361
+ {
362
+ "retry": {
363
+ "fallbackOnContentFilter": false,
364
+ "provider": { "maxRetryDelayMs": 120000 }
365
+ }
366
+ }
367
+ ```
368
+
369
+ Full retry settings example:
322
370
 
323
371
  ```json
324
372
  {
@@ -336,6 +384,20 @@ Do not set `retry.provider.timeoutMs` to `0` to disable timeouts—an explicit `
336
384
  }
337
385
  ```
338
386
 
387
+ ### Retries outside chat
388
+
389
+ Structured decisions (including classifier requests) and session or branch summaries stop retrying the current model if its account is out of quota or the server asks for a delay longer than `retry.provider.maxRetryDelayMs` (60,000 ms by default). They do not shorten the server's wait and resend early. A structured decision can still use an eligible fallback; summaries do not use the chat fallback chain.
390
+
391
+ For example, to allow a server-requested wait of at most 15 seconds, use this in `settings.json`:
392
+
393
+ ```json
394
+ {
395
+ "retry": { "provider": { "maxRetryDelayMs": 15000 } }
396
+ }
397
+ ```
398
+
399
+ Setting `retry.provider.maxRetryDelayMs` to `0` allows the full server-requested wait, subject to any request deadline. `retry.maxAgentDelayMs` caps the delay Atomic chooses when there is no server hint; it does not shorten a server-requested wait. Neither setting lets Atomic retry an exhausted quota. [Remote compactors](/compaction/custom-compactors#automatic-fallback-to-memory-compaction) make one request and fall back to memory compaction on failure. [OpenRouter image generation](/models#use-image-models) also stops on quota exhaustion, even if the SDK caller has enabled retries.
400
+
339
401
  ## Tools
340
402
 
341
403
  | Setting | Type | Default | Description |
@@ -468,7 +530,7 @@ Accepted duration forms for `httpIdleTimeoutMs`, `websocketConnectTimeoutMs`, an
468
530
  - Integer duration with unit `ms`, `s`, `m`, or `h`, case-insensitive (such as `"500ms"`, `"30s"`, `"5m"`, `"1h"`). Decimal durations (`"1.5m"`), negative values, blank strings, and other units (`"d"`) are rejected.
469
531
  - `"disabled"` (case-insensitive), equivalent to `0`.
470
532
 
471
- `httpIdleTimeoutMs` applies to `fetch`, provider HTTP clients (including the default for `retry.provider.timeoutMs`), and the default total wall-clock budget for one [structured decision](/sdk/structured-decisions#cancellation-and-failures). `/settings` presets offer `30 sec` (`30000`), `1 min` (`60000`), `5 min` (`300000`), `10 min` (`600000`), `30 min` (`1800000`), and `Disabled` (`"disabled"` or `0`). The standalone binary checks this timeout on a coarse timer, ending a silent request up to about 8 seconds late (or up to about two minutes late for timeouts longer than four minutes).
533
+ `httpIdleTimeoutMs` applies to `fetch`, provider admission waits and HTTP clients (including the default for `retry.provider.timeoutMs`), and the default total wall-clock budget for one [structured decision](/sdk/structured-decisions#cancellation-and-failures). `/settings` presets offer `30 sec` (`30000`), `1 min` (`60000`), `5 min` (`300000`), `10 min` (`600000`), `30 min` (`1800000`), and `Disabled` (`"disabled"` or `0`). The standalone binary checks this timeout on a coarse timer, ending a silent request up to about 8 seconds late (or up to about two minutes late for timeouts longer than four minutes).
472
534
 
473
535
  ## Network proxy
474
536
 
@@ -292,6 +292,7 @@ Running `migrate` as the owner role ensures:
292
292
 
293
293
  - **Fast startup:** Agents open an up-to-date database in a couple of round trips with no schema-init contention.
294
294
  - **Owner-only optimizations and lazy objects:** Applies `fillfactor`, autovacuum thresholds, `lz4` compression, search index tuning, unlogged `intercom_wakeups`, the concurrent `snapshot_session_links_anchored` index rebuild (up to a 6-hour statement timeout for large tables without blocking writes), the single-round-trip session append function, and lazily initialized tables (fork staging, chat records, Intercom ended-child queue). Each table tuning `ALTER TABLE` uses a 2-second `lock_timeout` and gracefully skips busy tables without failing the migration—re-run later if any table was skipped.
295
+ - **Faster resume with worktree snapshots:** Atomic indexes the small snapshot fields it compares when resuming sessions that launched many subagents. New stores get the index when their session tables are created. For an existing store with a large session entries table, run `atomic storage migrate` as the owner rather than waiting for the index to appear on open. The backfill can take time; the index itself builds concurrently. Sessions can still resume using the unindexed path until the migration finishes. If interrupted, rerun the same command.
295
296
 
296
297
  ## Checklist
297
298
 
@@ -76,7 +76,8 @@ What triggers fallback:
76
76
  - **Retryable provider errors.** Rate limits, quota exhaustion (`The usage limit has been reached`, `usage_limit_reached`, `insufficient_quota`), auth failures, unavailable models, timeouts, and 5xx errors.
77
77
  - **Request-incompatible candidates.** HTTP 400, 413, and 422 payload or parameter errors, unsupported tools, and context-window overflows. Context-window overflow advances to the user-selected model only when not pinned.
78
78
  - **Content-filter refusals.** Advances without retrying the refusing model (OpenAI HTTP 422 `cyber_policy`, Anthropic refusal stop, or `content_filter` finish reason). Set `retry.fallbackOnContentFilter: false` in settings to stay on the refusing model.
79
- - **Credential skipping.** Before launching a concrete-model subagent, Atomic skips known providers without credentials and still tries unknown or custom providers. If all candidates are skipped, launch fails and names each missing provider. During execution, HTTP 401 or an invalid key disables that provider for the rest of the chain, while model-scoped HTTP 403 blocks only that model.
79
+ - **Missing credentials.** Before launching a concrete-model subagent, Atomic skips known providers without credentials and still tries unknown or custom providers. If all candidates are skipped, launch fails and names each missing provider.
80
+ - **Fallbacks on the same account.** A rejected key rules out every fallback sharing that account for the rest of the turn. An active account-wide quota or spending limit, or an account-wide rate-limit wait beyond `retry.provider.maxRetryDelayMs`, also makes the subagent skip those fallbacks. A model-only access restriction still blocks just that model. For a backup that can run when an account is unavailable, use a separate account in the subagent's `fallbackModels`. See [how Atomic matches accounts](/settings#fallbackmodels).
80
81
  - **Session model scope (`enabledModels` / `--models` / `/scoped-models`).** Subagents enforce the launching session's model scope using the exact same matching engine as the main session (`minimatch` `*`/`?`/`[...]` globs, literal bracketed IDs, fuzzy substring matching, case-insensitive `:thinking` suffixes, and Azure compatibility). `subagent({ action: "models" })`, `model: "auto"`, pre-launch filtering, and mid-run fallbacks all honor that allowlist. Bare model IDs prefer matches inside the active scope before falling back to the full catalog for error reporting. Candidates outside the scope are skipped with a reason naming `enabledModels`, and explicit launches targeting a disallowed model fail instead of running. If `enabledModels` matches zero available models, **all** subagent launches are rejected; only an unset or empty `enabledModels` allows all models.
81
82
 
82
83
  Refused tool calls, ordinary tool or task errors, validation errors, and cancellations never trigger fallback. There is no per-attempt idle watchdog or wall-clock kill cap.
package/docs/tools.md CHANGED
@@ -45,7 +45,7 @@ Bundled integrations also add [`code_search`](#code_search), web search and fetc
45
45
  - **Exclusive:** `codemode` acts as a turn barrier—it waits for earlier tool calls to finish and blocks later calls until it completes.
46
46
  - **Sequential:** `edit`, `write`, `todo`, `ask_user_question`, and `bash` or `powershell` with `pty: true` run one at a time in call order.
47
47
  - **Parallel:** `read`, `find`, `search`, `ls`, `kill`, `tool_search`, non-PTY shell commands, MCP tools, and web-access tools can run in parallel.
48
- - **Interrupting stuck tools.** When you interrupt a turn (for example with `Esc`), Atomic waits up to **10 seconds** for a tool call that ignores cancellation to stop before abandoning it with an `Operation aborted` error and discarding any late return. Override this grace period in milliseconds with `ATOMIC_TOOL_ABORT_GRACE_MS` (up to `2147483647`; `0` skips waiting).
48
+ - **Interrupting stuck tools.** When you interrupt a turn (for example with `Esc`), Atomic waits up to **10 seconds** for a tool call that ignores cancellation to stop before abandoning it with an `Operation aborted` error and discarding any late return. Override this grace period in milliseconds with `ATOMIC_TOOL_ABORT_GRACE_MS` (`0` skips waiting).
49
49
  - **Inspecting active tools.** Run `/tools` to see active tools, why inactive tools are off, and any unrecognized names in `defaultTools`. Its **Git** section reports which `git` binary Atomic uses (`system`, `provisioned` portable Git, or `unavailable` with an install command) and any failed portable Git update. See [Git](/getting-started/installation#git). SDK and RPC clients get the same report from [`session.getToolStatus()`](/sdk/reference#checking-tool-status) and [`get_tools`](/rpc/protocol#get_tools).
50
50
  - **Malformed tool arguments.** If a model produces invalid or truncated JSON arguments, Atomic rejects the call without executing a partial request and returns the original arguments so the model can retry.
51
51
 
@@ -320,15 +320,16 @@ When `ask_user_question` is enabled, the agent displays interactive multiple-cho
320
320
  - **Limits and validation.** Each call accepts 1 to 4 questions with 2 to 4 options per question, `header` up to 16 characters, and option `label` up to 60 characters. Duplicate questions and duplicate option labels are rejected. Reserved labels (`"Other"`, `"Type something."`, `"Chat about this"`, and `"Next"`) are rejected even on `multiSelect: true`.
321
321
  - **Multi-select and previews.** Pass `multiSelect: true` to let the user choose multiple options (this hides the custom `"Type something."` choice). On single-select questions, options can include a markdown `preview` rendered side by side (which also hides `"Type something."` while keeping `"Chat about this"`). See [Keybindings](/keybindings#tui-fullscreen-viewport) for dialog controls.
322
322
  - **Custom prompt guidance.** Machine-level overrides in `~/.config/rpiv-ask-user-question/config.json` can customize `guidance.promptSnippet` and `guidance.promptGuidelines`.
323
+ - **Decision context.** The question and options should tell you what you’re deciding, the facts you need, and what happens for each choice, without relying on earlier progress updates.
323
324
  - **Scoped approvals.** A confirmation question should name the exact action, identify the target PRs or resources, and offer explicit proceed and decline choices:
324
325
 
325
326
  ```json
326
327
  {
327
328
  "questions": [{
328
329
  "header": "Merge approval",
329
- "question": "Remove the stack grouping, then admin-merge the same seven PRs in dependency order without changing repository protections?",
330
+ "question": "Remove the stack grouping for PRs #101–#107 in acme/widgets, then admin-merge them in dependency order without changing repository protections?",
330
331
  "options": [
331
- { "label": "Proceed", "description": "Remove the grouping and admin-merge those seven PRs in dependency order. Leave repository protections unchanged." },
332
+ { "label": "Proceed", "description": "Remove the grouping and admin-merge the seven listed PRs in dependency order. Leave repository protections unchanged." },
332
333
  { "label": "Do not proceed", "description": "Leave the grouping and PRs unchanged." }
333
334
  ]
334
335
  }]
@@ -67,6 +67,8 @@ An open session keeps its worktree reserved by refreshing its lease every 10 sec
67
67
 
68
68
  A worktree stays associated with the session it was restored for after the session closes so resuming it again continues in the same directory. If another session claims that idle worktree later, the original session gets a fresh worktree on its next resume.
69
69
 
70
+ If another Atomic is still updating the pool, resume shows a waiting notice. It can continue right away if Atomic can tell the process holding the pool lock is gone. Locks from an older version or another machine still have to go 30 seconds without a refresh. This wait is separate from worktree leases: Atomic can skip a worktree that is still leased and restore into another one.
71
+
70
72
  ### Idle reuse, eviction, and set-aside worktrees
71
73
 
72
74
  - **Idle reuse.** Restore reuses an idle pooled worktree that still matches its last recorded snapshot with no extra untracked or excluded files, resetting tracked files while preserving ignored directories (`node_modules`, `target`, `.venv`) and preferring worktrees with a matching `envHash`. `/session snapshot` marks reused worktrees `(claimed)`.
@@ -73,6 +73,10 @@ Atomic prints a notice explaining what is missing and how to fix it (such as pus
73
73
 
74
74
  Restored worktrees live under `~/.atomic/agent/worktree-snapshots/worktrees/<repository>-<n>` and share one Git object store per repository. Checkouts that share the same repository remotes share a pool; repositories with no remotes are never pooled so ignored files cannot cross between unrelated projects.
75
75
 
76
+ If another Atomic is restoring the same repository, the resume shows a waiting notice. After a crash, it can continue right away if Atomic can tell the process that held the repository lock is gone. A lock from an older Atomic version or a different machine still has to go 30 seconds without a refresh before it can be reclaimed.
77
+
78
+ If Atomic was killed while Git was moving a restored checkout into place, a retry only uses that path after it verifies the old move has stopped. If the move already put files there, Atomic leaves them alone and can repair the checkout's Git registration during cleanup. If it cannot verify the old move, choose a fresh destination. Older versions sharing the same snapshot store do not honor this protection; upgrade them before retrying into the same destination.
79
+
76
80
  - **Warm reuse.** When restoring, Atomic reuses a clean idle worktree of the same repository—preferring one with the same dependency fingerprint—so ignored folders like `node_modules`, `target`, or `.venv` stay intact. Excess clean idle worktrees above `snapshots.pool.maxIdlePerRepository` are removed automatically, while any worktree with unrecorded edits or excluded files (such as `.env`) is preserved.
77
81
  - **Non-interactive fetches and Git LFS.** Restore fetches never hang waiting for terminal input (SSH runs in batch mode with a 15-second connect timeout; run `git ls-remote <remote>` once interactively if a host key or passphrase is needed). Missing Git LFS objects download automatically—up to **2 in parallel per session resume**—leaving unavailable files as pointers with a warning.
78
82
  - **Cleanup and refs.** Atomic tracks snapshot commits under `refs/atomic/snapshots/` so `git gc` preserves them without affecting `git push`, and cleans up unused snapshot blobs automatically in the background. See [Worktree snapshots reference](/worktree-snapshots/reference) for lease rules, ref cleanup commands, and garbage collection internals.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/atomic",
3
- "version": "0.10.15",
3
+ "version": "0.10.16-alpha.1",
4
4
  "description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "atomicConfig": {
@@ -98,7 +98,7 @@
98
98
  "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
99
99
  "typecheck": "node ../../scripts/bun-typecheck.mjs -p tsconfig.build.json && node ../../scripts/bun-typecheck.mjs -p tsconfig.typetests.json",
100
100
  "build": "bun run build:tsc && bun run build:split && bun run build:declarations && bun run build:assets",
101
- "build:tsc": "tsc -p tsconfig.build.json",
101
+ "build:tsc": "node ../../scripts/tsc-with-timers.mjs dist -p tsconfig.build.json",
102
102
  "build:split": "node scripts/split-dist.mjs",
103
103
  "build:declarations": "bun run scripts/unreachable-declarations.ts",
104
104
  "build:assets": "node scripts/build-codemode-worker.mjs && node ../../scripts/package-files.mjs executable dist/cli.js dist/rpc-entry.js && bun run copy-assets && node scripts/write-startup-files.mjs && node scripts/write-startup-stages.mjs",
@@ -118,13 +118,13 @@
118
118
  "prepack": "node -e \"require('node:fs').existsSync('scripts/split-dist.mjs') && import('./scripts/split-dist.mjs').then(() => import('./scripts/write-startup-files.mjs')).then(() => import('./scripts/write-startup-stages.mjs'))\""
119
119
  },
120
120
  "dependencies": {
121
- "@bastani/atomic-natives": "0.10.15",
122
- "@bastani/atomic-ai": "0.10.15",
123
- "@bastani/atomic-agent-core": "0.10.15",
124
- "@bastani/atomic-codemode": "0.10.15",
125
- "@bastani/atomic-tui": "0.10.15",
126
- "@bastani/atomic-schema": "0.10.15",
127
- "@bastani/atomic-telemetry": "0.10.15",
121
+ "@bastani/atomic-natives": "0.10.16-alpha.1",
122
+ "@bastani/atomic-ai": "0.10.16-alpha.1",
123
+ "@bastani/atomic-agent-core": "0.10.16-alpha.1",
124
+ "@bastani/atomic-codemode": "0.10.16-alpha.1",
125
+ "@bastani/atomic-tui": "0.10.16-alpha.1",
126
+ "@bastani/atomic-schema": "0.10.16-alpha.1",
127
+ "@bastani/atomic-telemetry": "0.10.16-alpha.1",
128
128
  "@silvia-odwyer/photon-node": "0.3.4",
129
129
  "chalk": "6.0.0",
130
130
  "glob": "14.0.6",
@@ -1079,6 +1079,10 @@
1079
1079
  ],
1080
1080
  "description": "Session-affinity header format. Defaults are API-specific or auto-detected."
1081
1081
  },
1082
+ "sendIdempotencyKey": {
1083
+ "type": "boolean",
1084
+ "description": "Send an Idempotency-Key across retries of the same openai-completions or openai-responses request. Enable only if the endpoint documents support. Default: false."
1085
+ },
1082
1086
  "promptCacheKeyMode": {
1083
1087
  "anyOf": [
1084
1088
  {
@@ -1129,6 +1133,23 @@
1129
1133
  "description": "Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it.",
1130
1134
  "default": true
1131
1135
  },
1136
+ "thinkingDisplay": {
1137
+ "anyOf": [
1138
+ {
1139
+ "type": "string",
1140
+ "const": "updates"
1141
+ },
1142
+ {
1143
+ "type": "string",
1144
+ "const": "summarized"
1145
+ },
1146
+ {
1147
+ "type": "string",
1148
+ "const": "omitted"
1149
+ }
1150
+ ],
1151
+ "description": "Default Anthropic thinking display for this model. Use summarized to prefer reasoning summaries over separately visible progress updates."
1152
+ },
1132
1153
  "supportsEagerToolInputStreaming": {
1133
1154
  "type": "boolean",
1134
1155
  "description": "Whether the provider accepts per-tool eager_input_streaming. When false, the Anthropic provider omits tools[].eager_input_streaming and sends the legacy fine-grained-tool-streaming-2025-05-14 beta header for tool-enabled requests.",
@@ -372,6 +372,19 @@
372
372
  "type": "boolean",
373
373
  "default": false
374
374
  },
375
+ "anthropicThinkingDisplay": {
376
+ "anyOf": [
377
+ {
378
+ "type": "string",
379
+ "const": "updates"
380
+ },
381
+ {
382
+ "type": "string",
383
+ "const": "summarized"
384
+ }
385
+ ],
386
+ "description": "On supported Claude models, choose visible progress updates or reasoning summaries."
387
+ },
375
388
  "externalEditor": {
376
389
  "type": "string",
377
390
  "description": "Command for Ctrl+G external editor; takes precedence over VISUAL and EDITOR."
@@ -974,7 +987,7 @@
974
987
  "pattern": "^(?:[dD][iI][sS][aA][bB][lL][eE][dD]|[0-9]+(?:[mM][sS]|[smhSMH])?)$"
975
988
  }
976
989
  ],
977
- "description": "Maximum idle gap between two provider stream events as milliseconds, a duration such as \"30s\", or \"disabled\"; 0 or \"disabled\" disables it."
990
+ "description": "Maximum wait for provider stream progress (keepalives do not count), as milliseconds, a duration such as \"30s\", or \"disabled\"; 0 or \"disabled\" disables the progress timer."
978
991
  },
979
992
  "queueMode": {
980
993
  "anyOf": [