
omdsh-dev/dsh-revive
30Last commit Aug 13, 2026
dsh-revive DSH plugin
dsh-revive is a DSH plugin that detects sessions interrupted by crashes, OOM, or other kills. It cold-restores them from persistent logs, reattaches the original preset, and sends a resume command. Supports a browser button, slash commands, and model tool invocation.
How to install the dsh-revive DSH plugin
dsh plugin --profile web add dsh-revive@0.1.4Copying does not run this command. Review the repository and version before installing the dsh-revive DSH plugin.
dsh-revive DSH plugin data source
dsh-revive DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-revive DSH plugin can do
- Scan all persistent sessions and identify interrupted ones based on deterministic rules (killed-mid-turn, pending-user-message, aborted, interrupted, error, max-tokens, blocked).
- Cold-restore sessions: rebuild from raw artifact logs, reattach the original preset combination, and resume with the last used model.
- Send a configurable resume prompt (default: '继续') to each revived session to continue the unfinished task.
- Trigger revival via a browser dock button, slash commands (/revive, /revive list, /revive <sessionId>), or a model tool (revive_sessions).
- Skip sub-agent sessions (they are automatically managed by the parent) and currently running sessions.
- Configurable auto-revival on startup with delay and cache TTL.
Where the dsh-revive DSH plugin fits
- After a DSH crash (OOM, SIGKILL, etc.), revive all interrupted sessions with one click to continue work.
- During development, frequently restart DSH and quickly restore all affected sessions without manual intervention.
- Recover specific interrupted sessions individually using the slash command or model tool.
- Automatically restore sessions on DSH startup (with autoReviveOnStartup) to minimize downtime in production.
- List all interrupted sessions to review which ones need attention before revival.
Who the dsh-revive DSH plugin is for
- DSH users who run long-lived agent tasks and need resilience against process crashes.
- Developers who frequently restart DSH during testing and want to avoid manually resuming sessions.
- Operators managing many sessions who require a scalable way to recover from interruptions.
dsh-revive DSH plugin limitations
- Revived sessions use the last recorded model; switching models must be done via the official web selector, which does not include revived sessions.
- Cold scanning only works with persistence backends that expose raw artifacts (e.g., not SQLite); such backends cause sessions to be skipped.
- Peak memory scales with the largest single artifact size, as raw artifacts are temporarily held in memory.
- Sessions without a title will display the session ID in the UI.
dsh-revive DSH plugin: from the repository README
Quoted from the omdsh-dev/dsh-revive README, the upstream source of the dsh-revive DSH plugin. Copyright remains with the original authors.
DSH 进程经常在跑任务时被杀死(自己杀自己、OOM、崩溃……),重启之后每个被打断的会话都要手动点开、手动发一句「继续」。这个插件把这件事变成**一键**: - 扫描全部持久化会话,识别「被打断」的(回合没跑完、消息没处理、上次回合以中止/出错/阻塞/超长收尾的); - 按官方 GUI 同款路径冷恢复它们:从持久化日志重建会话、挂回它原来的 preset 组合、沿用上次的模型; - 给每个被打断的会话发送「继续」指令,让它们接着干活; - 子代理会话不直接复活(它们会随父会话的恢复被自动接管),正在运行的会话不动。 ## 触发方式(三选一,同一套核心逻辑) | 入口 | 用法 | |---|---| | **浏览器一键按钮** | 每个会话输入框下方的 dock 区有一个「⚡复活」按钮,角标显示被打断会话数,点一下全部复活 | | **斜杠命令** | `/revive`(复活全部)、`/revive list`(只列出)、`/revive <sessionId>`(只复活一个) | | **模型工具** | 对任意会话说「把被打断的会话都复活」,模型会调用 `revive_sessions` 工具 | ## 被打断的判定 对每个会话日志折叠出以下结论之一: | 结论 | 含义 | 是否复活 | |---|---|---| | `killed-mid-turn` | 日志末尾停在未结束的回合里(进程被杀) | ✅ | | `pending-user-message` | 有用户消息从未被处理 | ✅ | | `aborted` / `interrupted` / `error` / `max-tokens` / `blocked` | 上一回合非正常收尾 | ✅ | | `completed` | 上一回合正常完成 | ❌(避免无谓烧 token) | | 空日志 | 从未动过的会话 | ❌ | ## 安装 ```bash # 已登录私有 npm registry 的 DSH 部署机 dsh plugin --profile web add dsh-revive@0.1.4 # 本地开发 checkout dsh plugin --profile web add link:/path/to/dsh-revive ``` 插件自带 Profile Bundle;`dsh plugin` 会自动维护 profile 依赖和 `dsh.profile.bundles`。不要手工编辑 profile manifest,也不要再插入同名 `revive` loader entry,否则会触发 `duplicate loader entry id`。重启 DSH 后,任意会话输入框 下方出现「⚡复活」按钮即安装成功。 ## 兼容性 | 组件 |
Read the full READMERepository license: BSD-3-Clause
dsh-revive DSH plugin questions
How do I install dsh-revive?
Run `dsh plugin --profile web add dsh-revive@0.1.4` on a DSH deployment machine that has access to the private npm registry. Alternatively, use `dsh plugin --profile web add link:/path/to/dsh-revive` for local development. After installation, restart DSH and you should see a ⚡ button in the conversation input area.
Why are some sessions not revived?
Sessions that are currently running, have a completed last turn, or have empty logs are skipped. Also, sub-agent sessions are not revived directly (they are managed by the parent). Additionally, if your persistence backend does not support raw artifacts (e.g., SQLite), those sessions will be skipped and not fall back to full log reading.
Can I configure the resume prompt text?
Yes, you can set the `resumePrompt` option in the plugin's configuration (e.g., in `cordis.patch.yml`). The default value is '继续'. You can change it to any string you want to send to the revived session.
Does dsh-revive automatically revive sessions on DSH startup?
By default, no. You need to set `autoReviveOnStartup: true` in the plugin configuration. Be cautious: if DSH repeatedly crashes, this could cause a crash loop where sessions are revived and then killed again. You can also adjust `startupDelayMs` and `scanTtlMs` to control behavior.
What model is used for revived sessions?
Revived sessions use the last recorded model from the original session. However, the revived session is not registered in the web model selector, so you cannot switch models through the UI. You would need to use the official model selection entry to change it.