dshbase

Plugin directory / Developer / dsh-zombie-gc

dsh-zombie-gc

Verified · install-tested on dsh DosterBool

✓ Actively maintained Builds on 1 official DSH packages

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
—Language
2026-08-22Last push
Cross-platformPlatform

What it does

DSH 插件:开机清理僵尸 agent(已收尾会话仍挂 registry,导致退出重进后输入框卡死)

✅
Our take
Works — verified, early-stage project

DSH 插件:开机清理僵尸 agent(已收尾会话仍挂 registry,导致退出重进后输入框卡死) It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-zombie-gc · 僵尸 agent 清理

DeepSeek Harness (dsh) 插件:开机自动清理"已收尾但 agent 仍挂 registry"的僵尸会话,防止客户端"退出重进后输入框卡死"。

背景:这个 Bug 是什么

dsh 0.1.1 启动时会恢复所有持久化会话(restore 机制,为每个会话补写 session/end-seed)。恢复的"已结束"会话在 agents registry 里被挂上 live agent 条目——但该 agent 没有活干,处于空闲僵尸态(registry 保留它,这是缓存复用设计,不清理)。

之后用户退出再进入该会话:客户端订阅到僵尸 agent → 输入相位被锁 → 输入框表现为"能聚焦但打不进字"。日志证据:会话以 turn/end + session/end-seed 正常收尾(挂起回合 = 0),列表却显示 running: True。

工作原理

插件在 bundle 挂载 12 秒后(等待恢复过程完成)执行一次:

  1. 枚举 agents registry 里有条目的会话
  2. 从会话对象自带 log 读事件尾部,判定是否已正常收尾(回扫最后 30 条:遇到 turn/end/session/end-seed → 已结束;遇到 turn/start/step/start/agent/request → 仍在跑)
  3. 已收尾的调用 agent.cancel({ kind: 'user' }) + 等待 whenIdle,让 agent 结算退出

绝不触碰真正运行中的会话(尾部仍是进行态事件的会被跳过)。

安装

dsh plugin --profile web add file:D:/path/to/dsh-zombie-cleaner

重启 DSH 生效。插件本身零依赖(只需 Node 24 的 node:zlib)。

已知边界

  • running 红点标记可能仍显示(agent 空闲态计算结果显示,不影响功能)。这是 registry 缓存复用的设计,非本插件可清
  • 只清理"日志已收尾"的确定性僵尸;运行中的会话一律保留

License

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-zombie-gc for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:DosterBool/dsh-zombie-gc

Headless (CLI) profile:

dsh plugin --profile headless add github:DosterBool/dsh-zombie-gc

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7819 plugins →