dsh-client-auto-continue 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.20.1](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.20.1) — 2026-11-16
4
+
5
+ ### Fixed
6
+
7
+ - The startup sweep of stored sessions could run the host out of memory on a large profile: it decoded the full log of every stored session before checking whether the last turn was recent, and the host then restarted and did the same again. One host start now reads at most 32 stored logs, most recently active first (from the projection checkpoint cache, falling back to creation time). The checkpoint only orders the reads, so freshness is still decided by the tail of the log. Each session counts once even when its read is retried ([#91](https://github.com/HsiangNianian/dsh-auto-continue/pull/91), thanks @anthonyhann)
8
+
9
+ [Upgrade instructions and validation](docs/releases/v0.20.1.md) · [Full changes](https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.20.0...v0.20.1)
10
+
11
+ ## [0.20.0](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.20.0) — 2026-11-16
12
+
13
+ ### Added
14
+
15
+ - **Cold resume for failed subagents** (with `resumeSubagentSessions` on): DSH disposes a background subagent as soon as a turn fails, so a live resend never reached it. The engine now asks the host's subagent service to resume the child from its persisted session and delivers the continuation to the child itself, under the child's own cooldown and retry cap. The main conversation is not woken ([#90](https://github.com/HsiangNianian/dsh-auto-continue/pull/90), thanks @kesha4)
16
+ - When the host cannot resume the child (no persistence, no live parent, or an older host without the service), the failure is handed to the main conversation as one message, at most once every five minutes. It waits if the main conversation is not loaded, and stays silent while the main conversation is recovering itself so its own continuation is not cancelled ([#90](https://github.com/HsiangNianian/dsh-auto-continue/pull/90))
17
+
18
+ ### Fixed
19
+
20
+ - Child hand-offs are sent like any other continuation (configured message source, tracked as the plugin's own echo), so the main conversation does not treat them as the user stepping in and reset its retry and loop counters
21
+
22
+ [Upgrade instructions and validation](docs/releases/v0.20.0.md) · [Full changes](https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.19.0...v0.20.0)
23
+
3
24
  ## [0.19.0](https://github.com/HsiangNianian/dsh-auto-continue/releases/tag/v0.19.0) — 2026-11-13
4
25
 
5
26
  ### Added
package/README.md CHANGED
@@ -73,7 +73,7 @@ To update, let running work finish, stop DSH, run the same command again, then r
73
73
 
74
74
  | DSH runtime | Plugin version | Settings location |
75
75
  | --- | --- | --- |
76
- | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.19.0 verified | **Plugins → dsh-client-auto-continue** |
76
+ | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.20.1 verified | **Plugins → dsh-client-auto-continue** |
77
77
  | 0.2.0-rc.1 | 0.12.1 or newer | **Plugins → dsh-client-auto-continue** |
78
78
  | 0.1.7-rc.2 | 0.11.9 or newer | **Plugins → dsh-client-auto-continue** |
79
79
  | Older hosts with the legacy settings API | legacy UI | **Settings → Plugins → Plugin configuration** |
@@ -211,7 +211,7 @@ Times are in milliseconds. Text fields left empty use the built-in text in the c
211
211
  | Show auto-continue switch in the composer | `showComposerToggle` | `true` | Only hides or shows the controls |
212
212
  | Send continue messages with plugin source | `usePluginSource` | `false` | Off sends as the `user` source; on marks messages as `plugin:dsh-client-auto-continue` |
213
213
  | Resume silent turns | `resumeSilentTurns` | `true` | Resume turns that had model activity but no visible output; they still count toward **Max consecutive** |
214
- | Resume subagent sessions | `resumeSubagentSessions` | `false` | Resume a failed, cut-off or silent subagent while it's still loaded, using its main conversation's mode. DSH usually closes a failed background subagent right away, so this mostly helps subagents that stay loaded |
214
+ | Resume subagent sessions | `resumeSubagentSessions` | `false` | Resume a failed, cut-off or silent subagent, using its main conversation's mode. When DSH already disposed the child, the engine cold-resumes it from its persisted session through the host subagent service; if the host cannot resume it, the failure is handed to the main conversation instead |
215
215
  | Default session mode | `resumeCompletedTurns` | `false` | `false` = Recovery only, `true` = Autonomous loop, for sessions on Follow default |
216
216
  | Autonomous loop round limit | `loopMaxIterations` | `0` | Loop rounds per session, `0` = no limit. Resets when you send a message or turn the loop back on |
217
217
  | Browser notifications | `notify` | `false` | Notifications for sends, skips, give-ups and saved settings. The browser asks for permission the first time |
@@ -319,10 +319,12 @@ Patterns are plain substrings, not regular expressions. Cooldown and **Max conse
319
319
  6. **Offline hold.** For network errors, the host checks for a non-loopback network interface and one resolvable public name. While offline it waits and re-checks every `offlineCheckMs`, then goes through grace and cooldown again. With `HTTP(S)_PROXY` or `ALL_PROXY` set, only interfaces are checked.
320
320
  7. **Send.** The engine picks the text for the reason, appends the idempotency-guard note, and sends it with `agent.followup` using the session's preset and model. If user turns are already queued, the continue message is moved ahead of them while their order is kept. With `resumeGoals` on, a goal the restart disarmed is re-armed.
321
321
 
322
- **Child sessions.** Outside of **Resume subagent sessions**, subagent and team-member sessions are never resumed directly, and that setting only covers live ones. After a restart, with **Wake child sessions after restart** on, the startup scan collects children a restart interrupted (at most 8 child logs per pass) and sends their root session one message listing them, once per batch. The root decides whether to continue or wrap up. A root still mid-turn is left to normal recovery, and a root you stopped yourself is never woken.
322
+ **Child sessions.** Outside of **Resume subagent sessions**, subagent and team-member sessions are never resumed directly. With the setting on, a failed child is recovered in two steps: the engine first asks the host to cold-resume the disposed child from its persisted session, delivering the continuation to the child itself, so the main conversation is not woken; when the host cannot resume it (no persistence, no live parent, or a child that is not continuable), the failure is handed to the main conversation as one message, at most once per five minutes. That hand-off stays silent while the main conversation is recovering itself, because any user message cancels its queued continuation. If the main conversation has no live agent at that moment, the hand-off is kept until it is live again. A manual **Resume now** also cold-resumes a disposed child. After a restart, with **Wake child sessions after restart** on, the startup scan collects children a restart interrupted (at most 8 child logs per pass) and sends their root session one message listing them, once per batch. The root decides whether to continue or wrap up. A root still mid-turn is left to normal recovery, and a root you stopped yourself is never woken.
323
323
 
324
324
  **Unreadable sessions.** If a session's history cannot be read during the startup scan, that session is skipped and an error is logged; other sessions still recover ([#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58)). Repair it and restart DSH within the scan window to try again.
325
325
 
326
+ **Cold-read budget.** A stored session is judged by its whole log, so the sweep decodes one full history per session. To keep a large profile from exhausting the host heap, one host instance reads at most 32 stored logs, most recently active first. The order comes from the projection checkpoint cache (`timeContext.lastMessageTime`, then `sessionListMetadata.lastPromptAt`), falling back to the session creation time. Each session counts once, even if its read is retried. The order is the same on every start, so sessions past the budget are skipped rather than queued; they are the least recently active ones, and the freshness window (15 minutes by default) has almost always passed for them. A checkpoint can lag behind a log but never lead it, so it only orders the reads: freshness is still decided by the events at the tail of the log.
327
+
326
328
  ## Troubleshooting
327
329
 
328
330
  | Symptom | What to check |
package/README.ru.md CHANGED
@@ -73,7 +73,7 @@ dsh web
73
73
 
74
74
  | Среда DSH | Версия плагина | Где настройки |
75
75
  | --- | --- | --- |
76
- | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.19.0 проверена | **Plugins → dsh-client-auto-continue** |
76
+ | 0.2.2-rc.1, 0.2.1-rc.2, 0.2.1-alpha.1 | 0.20.1 проверена | **Plugins → dsh-client-auto-continue** |
77
77
  | 0.2.0-rc.1 | 0.12.1 и новее | **Plugins → dsh-client-auto-continue** |
78
78
  | 0.1.7-rc.2 | 0.11.9 и новее | **Plugins → dsh-client-auto-continue** |
79
79
  | Старые хосты с устаревшим API настроек | старый интерфейс | **Settings → Plugins → Plugin configuration** |
@@ -213,7 +213,7 @@ dsh plugin --profile web remove dsh-client-auto-continue
213
213
  | Показывать переключатель авто-продолжения в поле ввода | `showComposerToggle` | `true` | Только показывает или скрывает элементы |
214
214
  | Отправлять сообщения автопродолжения с меткой плагина | `usePluginSource` | `false` | Выкл. — сообщения уходят с источником `user`; вкл. — помечаются как `plugin:dsh-client-auto-continue` |
215
215
  | Продолжать ходы без вывода | `resumeSilentTurns` | `true` | Продолжать ходы, в которых модель работала, но видимого ответа нет; они учитываются в **Максимум подряд** |
216
- | Продолжать сессии субагентов | `resumeSubagentSessions` | `false` | Продолжать упавший, обрезанный или пустой ход субагента, пока он ещё загружен, в режиме его основного диалога. DSH обычно сразу закрывает фоновый субагент после сбоя, так что это помогает в основном субагентам, которые остаются загруженными |
216
+ | Продолжать сессии субагентов | `resumeSubagentSessions` | `false` | Продолжать упавший, обрезанный или пустой ход субагента в режиме его основного диалога. Если DSH уже освободил субагент, движок холодно поднимает его из сохранённой сессии через сервис субагентов хоста; когда хост не может его поднять, сбой передаётся основному диалогу |
217
217
  | Режим сессии по умолчанию | `resumeCompletedTurns` | `false` | Для бесед в режиме «Как по умолчанию»: `false` — «Только восстановление», `true` — «Автономный цикл» |
218
218
  | Лимит раундов автономного цикла | `loopMaxIterations` | `0` | Раундов цикла на сессию, `0` — без лимита. Счёт начинается заново, когда вы пишете сообщение или снова включаете цикл |
219
219
  | Уведомления браузера | `notify` | `false` | Уведомления об отправках, пропусках, отказах и сохранении настроек; при первом включении браузер попросит разрешение |
@@ -321,10 +321,12 @@ dsh plugin --profile web remove dsh-client-auto-continue
321
321
  6. **Ожидание сети.** Для сетевых ошибок хост проверяет, есть ли сетевой интерфейс кроме loopback и разрешается ли хотя бы одно публичное имя. Без сети отправка ждёт, проверка повторяется каждые `offlineCheckMs`, а потом снова проходят пауза и интервал. Если задан `HTTP(S)_PROXY` или `ALL_PROXY`, проверяются только интерфейсы.
322
322
  7. **Отправка.** Движок выбирает текст по причине остановки, добавляет заметку о последнем инструменте и отправляет через `agent.followup` с пресетом и моделью сессии. Если в очереди уже есть ходы пользователя, сообщение встаёт перед ними, а их порядок сохраняется. При включённом `resumeGoals` снятая перезапуском цель снова взводится.
323
323
 
324
- **Дочерние сессии.** Кроме **Продолжать сессии субагентов** (только для ещё загруженных субагентов), сессии субагентов и участников команды напрямую не продолжаются. После перезапуска, если включено **Будить дочерние сессии после перезапуска**, стартовое сканирование собирает прерванные перезапуском дочерние сессии (не больше 8 логов за проход) и отправляет их корневой сессии одно сообщение со списком, один раз на пачку. Корневая сессия сама решает, продолжать или сворачиваться. Корень, у которого ещё идёт ход, остаётся обычному восстановлению, а корень, который вы остановили сами, не будится никогда.
324
+ **Дочерние сессии.** Кроме **Продолжать сессии субагентов**, сессии субагентов и участников команды напрямую не продолжаются. Когда настройка включена, упавший ребёнок восстанавливается в два шага: движок сначала просит хост холодно поднять освобождённого ребёнка из сохранённой сессии и доставляет продолжение самому ребёнку, не будя основной диалог; если хост не может его поднять (нет персистентности, основной диалог неактивен или ребёнок не продолжается), сбой передаётся основному диалогу одним сообщением, не чаще раза в пять минут. Пока основной диалог восстанавливается сам, передача молчит: любое пользовательское сообщение отменяет его запланированное продолжение. Если в этот момент у основного диалога нет активного агента, передача сохраняется до его появления. Ручное **Продолжить сейчас** тоже холодно поднимает освобождённого ребёнка. После перезапуска, если включено **Будить дочерние сессии после перезапуска**, стартовое сканирование собирает прерванные перезапуском дочерние сессии (не больше 8 логов за проход) и отправляет их корневой сессии одно сообщение со списком, один раз на пачку. Корневая сессия сама решает, продолжать или сворачиваться. Корень, у которого ещё идёт ход, остаётся обычному восстановлению, а корень, который вы остановили сами, не будится никогда.
325
325
 
326
326
  **Нечитаемые сессии.** Если историю сессии не удаётся прочитать при стартовом сканировании, она пропускается с ошибкой в логе, а остальные сессии восстанавливаются ([#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58)). Исправьте её и перезапустите DSH в пределах окна сканирования, чтобы попробовать снова.
327
327
 
328
+ **Бюджет холодных чтений.** Хранимая сессия оценивается по всему журналу, поэтому сканирование раскодирует полную историю каждой сессии. Чтобы большой профиль не исчерпал кучу хоста, один экземпляр хоста читает не более 32 сохранённых журналов, начиная с самых недавно активных. Порядок берётся из кэша проекционных контрольных точек (`timeContext.lastMessageTime`, затем `sessionListMetadata.lastPromptAt`), а без них — из времени создания сессии. Каждая сессия учитывается один раз, даже если чтение повторяется. Порядок одинаков при каждом запуске, поэтому сессии за пределами бюджета пропускаются, а не откладываются: это самые давно активные сессии, и окно свежести (по умолчанию 15 минут) для них почти всегда уже прошло. Контрольная точка может отставать от журнала, но не опережать его, поэтому она задаёт только порядок: свежесть по-прежнему определяется событиями в хвосте журнала.
329
+
328
330
  ## Решение проблем
329
331
 
330
332
  | Симптом | Что проверить |
package/README.zh.md CHANGED
@@ -73,7 +73,7 @@ dsh web
73
73
 
74
74
  | DSH 内核 | 插件版本 | 设置入口 |
75
75
  | --- | --- | --- |
76
- | 0.2.2-rc.1、0.2.1-rc.2、0.2.1-alpha.1 | 0.19.0 已验证 | **插件 → dsh-client-auto-continue** |
76
+ | 0.2.2-rc.1、0.2.1-rc.2、0.2.1-alpha.1 | 0.20.1 已验证 | **插件 → dsh-client-auto-continue** |
77
77
  | 0.2.0-rc.1 | 0.12.1 及以上 | **插件 → dsh-client-auto-continue** |
78
78
  | 0.1.7-rc.2 | 0.11.9 及以上 | **插件 → dsh-client-auto-continue** |
79
79
  | 仅有旧版设置 API 的宿主 | 旧版界面 | **设置 → 插件 → 插件配置** |
@@ -211,7 +211,7 @@ dsh plugin --profile web remove dsh-client-auto-continue
211
211
  | 在会话区显示自动继续开关 | `showComposerToggle` | `true` | 只控制显示与隐藏 |
212
212
  | 以插件来源发送继续消息 | `usePluginSource` | `false` | 关闭时以 `user` 来源发送;开启后标记为 `plugin:dsh-client-auto-continue` |
213
213
  | 续跑无输出回合 | `resumeSilentTurns` | `true` | 有模型活动但没有可见输出的回合也继续;仍计入 **最大连续次数** |
214
- | 续跑子代理会话 | `resumeSubagentSessions` | `false` | 子代理还在加载时,失败、被截断或无输出的回合按主会话的模式续跑。DSH 通常会在后台子代理失败后立即关闭它,所以主要对仍保持加载的子代理有用 |
214
+ | 续跑子代理会话 | `resumeSubagentSessions` | `false` | 子代理失败、被截断或无输出时,按主会话的模式续跑。DSH 已经释放子代理时,引擎通过宿主的 subagent 服务从持久化会话冷恢复它;宿主无法恢复时,改为把失败交给主会话 |
215
215
  | 默认会话模式 | `resumeCompletedTurns` | `false` | 用于“跟随默认”的会话:`false` 为仅故障恢复,`true` 为自主循环 |
216
216
  | 自主循环轮数上限 | `loopMaxIterations` | `0` | 每个会话的循环轮数,`0` 为不限。你发消息或重新开启循环后重新计数 |
217
217
  | 浏览器通知 | `notify` | `false` | 发送、跳过、放弃以及设置保存时通知;首次开启时浏览器会请求权限 |
@@ -319,10 +319,12 @@ dsh plugin --profile web remove dsh-client-auto-continue
319
319
  6. **断网挂起。** 对网络类错误,宿主会检查是否有非回环网卡,以及能否解析任一公共域名。断网时等待,每隔 `offlineCheckMs` 复检,恢复后重新经过宽限期和冷却。设置了 `HTTP(S)_PROXY` 或 `ALL_PROXY` 时只检查网卡。
320
320
  7. **发送。** 按原因选择继续文本,附上幂等护栏提示,用会话原有的 preset 和模型通过 `agent.followup` 发出。如果已有排队的用户回合,继续消息会排到它们前面,用户回合之间的顺序不变。开启 `resumeGoals` 时,会重新 arm 被重启 disarm 的 goal。
321
321
 
322
- **子会话。** 除了 **续跑子代理会话**(只管仍在加载的子代理)之外,子代理和团队成员会话从不直接续跑。重启后,开启 **重启后唤醒子代理会话** 后,启动扫描会收集被重启打断的子会话(每轮最多读取 8 个子会话日志),给它们的根会话发一条清单消息,同一批只发一次,由根会话决定继续还是收尾。根会话自己还在运行时交给常规恢复;你手动停止的根会话不会被唤醒。
322
+ **子会话。** 除了 **续跑子代理会话** 之外,子代理和团队成员会话从不直接续跑。开启该设置后,失败的子会话分两步恢复:引擎先请求宿主从持久化会话冷恢复已释放的子代理,把续跑消息直接投递给子代理本身,不唤醒主会话;宿主无法恢复时(没有持久化、主会话不在线或子会话不可续跑),把失败作为一条消息交给主会话,每五分钟最多一次。主会话正在自行恢复时这条移交保持沉默,因为任何用户消息都会取消它排队的续跑。如果此时主会话没有 live agent,移交会暂存到它重新可用为止。手动 **立即续跑** 也会对已释放的子代理执行冷恢复。重启后,开启 **重启后唤醒子代理会话** 后,启动扫描会收集被重启打断的子会话(每轮最多 8 个子会话日志),给它们的根会话发一条清单消息,同一批只发一次,由根会话决定继续还是收尾。根会话自己还在运行时交给常规恢复;你手动停止的根会话不会被唤醒。
323
323
 
324
324
  **无法读取的会话。** 启动扫描时如果某个会话的历史读不出来,会跳过它并记录错误,其他会话照常恢复([#58](https://github.com/HsiangNianian/dsh-auto-continue/issues/58))。修复后在扫描时间窗内重启 DSH 即可重试。
325
325
 
326
+ **冷读配额。** 已存储的会话要按整份日志裁决,所以扫描为每个会话解码一次完整历史。为了不让会话很多的环境把宿主堆打满,一个宿主实例最多冷读 32 个会话日志,最近活动过的优先。顺序取自投影检查点缓存(`timeContext.lastMessageTime`,其次 `sessionListMetadata.lastPromptAt`),没有检查点时按会话创建时间。每个会话只计一次,读取重试不重复扣配额。每次启动的顺序都一样,所以超出配额的会话是被跳过而不是排队等下次:它们是最久没有活动的那些,新鲜窗口(默认 15 分钟)对它们几乎总是早已过去。检查点只会落后于日志、不会超前,因此只用来排序:是否新鲜仍然由日志尾部的事件决定。
327
+
326
328
  ## 常见问题
327
329
 
328
330
  | 现象 | 排查 |
@@ -0,0 +1,46 @@
1
+ Failed subagents can now actually be resumed: the plugin brings the child back from its saved session instead of finding it already gone
2
+
3
+ ## Cold resume for failed subagents
4
+
5
+ Contributed by @kesha4 in [#90](https://github.com/HsiangNianian/dsh-auto-continue/pull/90). This only applies with **Resume subagent sessions** (`resumeSubagentSessions`) turned on, which is still off by default
6
+
7
+ In 0.19.0 that setting rarely did anything: DSH closes a background subagent the moment one of its turns fails, so by the time the plugin wanted to send "continue", there was no subagent left to send it to
8
+
9
+ Now, when the child is already closed, the plugin asks DSH's subagent service to reopen it from its saved session and gives the continue message to the child itself
10
+
11
+ - The child uses its own cooldown and retry limit, the same as a live resume
12
+ - The main conversation is not woken up for this
13
+ - **Resume now** in a notification also works for a closed child
14
+
15
+ If DSH can't reopen the child (no saved session, the main conversation isn't loaded, or an older DSH without the service), the plugin tells the main conversation instead, with one short message per child at most every five minutes
16
+
17
+ - If the main conversation isn't loaded, the message waits until it is
18
+ - If the main conversation is busy recovering itself, the plugin stays quiet, since any new message would cancel that recovery. DSH already tells it which child failed
19
+
20
+ The hand-off goes in like any other continue message. It follows **Send continue messages with plugin source** and doesn't count as you typing, so it never resets the main conversation's retry or loop counters
21
+
22
+ ## Upgrade
23
+
24
+ Let current work finish, stop DSH, then update the profile you use
25
+
26
+ ```bash
27
+ dsh plugin --profile web add dsh-client-auto-continue@0.20.0
28
+ dsh web
29
+ ```
30
+
31
+ Desktop app users should update through the app's Plugins page and restart the app, since it uses its own profile
32
+
33
+ - Reload open browser tabs after restarting
34
+ - No setting changed. If **Resume subagent sessions** is off, nothing behaves differently
35
+
36
+ ## Validation
37
+
38
+ - Typecheck, build (committed `lib/` reproduces byte for byte), the full regression suite and the DSH runtime compatibility tests for `0.1.7`, `0.2.0`, `0.2.0-rc.2`, `0.2.1`, `0.2.1-rc.2` and `0.2.2-rc.1`
39
+ - Simulated hosts cover a successful cold resume, falling back to the hand-off when resume fails, no duplicate requests while one is in flight, Resume now on a closed child, waiting for an unloaded main conversation, staying quiet while it recovers, and the hand-off's message source
40
+ - @kesha4 checked it on a real host with the network cut: the failed child was reopened from its saved session, got the continue message, and eventually finished its task
41
+
42
+ The cold resume uses DSH's subagent control interface (`subagents.prompt`), which isn't a documented plugin API yet. The plugin checks it's there before calling it, and any error falls back to the hand-off
43
+
44
+ Thanks @kesha4 for building and live-testing this
45
+
46
+ **Full changes:** https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.19.0...v0.20.0
@@ -0,0 +1,39 @@
1
+ A fix for hosts that crash on startup when the profile has a lot of saved sessions
2
+
3
+ ## Startup no longer runs out of memory
4
+
5
+ Reported and fixed by @anthonyhann in [#91](https://github.com/HsiangNianian/dsh-auto-continue/pull/91)
6
+
7
+ When DSH starts, the plugin looks through saved sessions for ones that were cut off by the restart. To decide, it read each session's whole log, and only then checked whether the last turn was recent enough to resume (15 minutes by default). On a profile with a few hundred sessions that's gigabytes of decoding. On their machine the host ran out of memory, restarted, tried again, and never came up
8
+
9
+ Now one start reads at most 32 saved sessions, the most recently active first
10
+
11
+ - The order comes from DSH's session checkpoint cache, or the session's creation time if there's no cache
12
+ - The cache only decides the order. Whether a session gets resumed is still decided by what's at the end of its log, same as before
13
+ - A session whose read fails and is retried only counts once
14
+ - Sessions past the 32 are skipped. They're the ones that have been idle longest, so they're almost always outside the 15-minute window anyway
15
+
16
+ Live sessions and subagent sessions aren't affected
17
+
18
+ ## Upgrade
19
+
20
+ Let current work finish, stop DSH, then update the profile you use
21
+
22
+ ```bash
23
+ dsh plugin --profile web add dsh-client-auto-continue@0.20.1
24
+ dsh web
25
+ ```
26
+
27
+ Desktop app users should update through the app's Plugins page and restart the app, since it uses its own profile
28
+
29
+ No settings changed
30
+
31
+ ## Validation
32
+
33
+ - Typecheck, build (committed `lib/` reproduces byte for byte), the full regression suite and the DSH runtime compatibility tests
34
+ - New tests cover stopping at 32 reads with the most recently active sessions first, and a few broken logs being retried without pushing healthy sessions out of the budget
35
+ - @anthonyhann measured it against a real profile with 903 saved sessions: the 32 most recent hold 3.3 MB of compressed logs, and the six largest logs (7 to 23 MB each) have no checkpoint, sort last, and aren't read at startup
36
+
37
+ Thanks @anthonyhann for tracking this down with heap numbers instead of just a "it crashes" report
38
+
39
+ **Full changes:** https://github.com/HsiangNianian/dsh-auto-continue/compare/v0.20.0...v0.20.1
package/lib/client.js CHANGED
@@ -172,7 +172,7 @@ var zh = {
172
172
  "field.resumeSilentTurns": "续跑无输出回合",
173
173
  "field.resumeSilentTurnsHint": "已观察到模型活动但没有可见输出时续跑;不把空回合、图片或扩展内容误判为静默,冷却与连续上限照常生效。",
174
174
  "field.resumeSubagentSessions": "续跑子代理会话",
175
- "field.resumeSubagentSessionsHint": "当子代理所属主会话启用自动继续时,自动续跑其中断的子代理会话。子代理不会进入自主循环、不会被循环守卫重启,也不会由启动扫描恢复。默认关闭。只对仍处于加载状态的子代理生效:DSH 通常会在后台子代理失败后立即关闭它,并把失败结果交给父会话。",
175
+ "field.resumeSubagentSessionsHint": "当子代理所属主会话启用自动继续时,自动续跑其中断的子代理会话。子代理不会进入自主循环、不会被循环守卫重启,也不会由启动扫描恢复。默认关闭。DSH 已释放子代理时,引擎会通过宿主的子代理服务从持久化会话冷恢复它;宿主无法恢复时,把失败交给主会话处理,并在主会话自行恢复期间保持安静。",
176
176
  "field.resumeCompletedTurns": "默认会话模式",
177
177
  "field.resumeCompletedTurnsHint": "用于未单独设置模式的会话。仅故障恢复继续中断和无输出回合;自主循环还会在正常完成后继续。无输出和失败回合仍计入连续重试次数。",
178
178
  "field.resumeInterruptedChildren": "重启后唤醒子代理会话",
@@ -339,7 +339,7 @@ var en = {
339
339
  "field.resumeSilentTurns": "Resume silent turns",
340
340
  "field.resumeSilentTurnsHint": "Resume observed model activity without visible output. No-op turns, images and extension blocks are not treated as silent; cooldown and retry limits still apply.",
341
341
  "field.resumeSubagentSessions": "Resume subagent sessions",
342
- "field.resumeSubagentSessionsHint": "Auto-continue interrupted subagent sessions when their main conversation has auto-continue enabled. Subagents never start the autonomous loop, are never loop-guard restarted, and are not recovered by the startup scan. Off by default. Only applies while the subagent is still loaded: DSH usually closes a background subagent as soon as it fails and reports the failure to its parent.",
342
+ "field.resumeSubagentSessionsHint": "Auto-continue interrupted subagent sessions when their main conversation has auto-continue enabled. Subagents never start the autonomous loop, are never loop-guard restarted, and are not recovered by the startup scan. Off by default. When DSH already disposed the subagent, the engine cold-resumes it from its persisted session through the host subagent service; if the host cannot resume it, the failure is handed to the main conversation, staying silent while that conversation recovers itself.",
343
343
  "field.resumeCompletedTurns": "Default session mode",
344
344
  "field.resumeCompletedTurnsHint": "Applies to sessions without their own mode. Recovery only resumes interruptions and silent turns; autonomous loop also continues after normal completions. Silent and failed turns still count toward the consecutive retry limit.",
345
345
  "field.resumeInterruptedChildren": "Wake child sessions after restart",
@@ -504,7 +504,7 @@ var ru = {
504
504
  "field.resumeSilentTurns": "Продолжать ходы без вывода",
505
505
  "field.resumeSilentTurnsHint": "Продолжать при наблюдаемой активности модели без видимого вывода. Пустые ходы, изображения и блоки расширений тихими не считаются; задержка и лимиты повторов действуют.",
506
506
  "field.resumeSubagentSessions": "Продолжать сессии субагентов",
507
- "field.resumeSubagentSessionsHint": "Автоматически продолжать прерванные сессии субагентов, если в их основном диалоге включено авто-продолжение. Субагенты не запускают автономный цикл, не перезапускаются защитой от циклов и не восстанавливаются сканированием при запуске. По умолчанию выключено. Работает, только пока субагент ещё загружен: DSH обычно закрывает фоновый субагент сразу после сбоя и сообщает об ошибке родительскому диалогу.",
507
+ "field.resumeSubagentSessionsHint": "Автоматически продолжать прерванные сессии субагентов, если в их основном диалоге включено авто-продолжение. Субагенты не запускают автономный цикл, не перезапускаются защитой от циклов и не восстанавливаются сканированием при запуске. По умолчанию выключено. Если DSH уже освободил субагент, движок холодно поднимает его из сохранённой сессии через сервис субагентов хоста; когда хост не может его поднять, сбой передаётся основному диалогу, и пока тот восстанавливается сам, передача молчит.",
508
508
  "field.resumeCompletedTurns": "Режим сессии по умолчанию",
509
509
  "field.resumeCompletedTurnsHint": "Для сессий без собственного режима. «Только восстановление» не трогает обычные завершения; «Автономный цикл» продолжает после них. Тихие и неудачные ходы по-прежнему расходуют бюджет повторов.",
510
510
  "field.continueTextLoop": "Текст продолжения (автономный цикл)",