dsh-todo-freshness-guard
by lamost423
防止 todo_write 状态过期的树外守卫插件
Out-of-tree DeepSeek Harness guard that prevents stale todo_write state
安装
dsh plugin --profile web add github:lamost423/dsh-todo-freshness-guardGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
English | 简体中文
Problem it solves: During long agent turns, the model may keep calling tools without updating its unfinished todo_write list. The visible plan then stops matching the work actually being done.
Most painful failure: The agent is still active, but the user is looking at stale status—completed work still appears pending, new blockers are missing, and the next step is unclear. This removes progress visibility exactly when a long task needs it most.
How it fixes it: This out-of-tree DeepSeek Harness Guard reminds the model to reconcile the complete Todo list, then blocks ordinary tools if the list remains stale. todo_write and the outer run_code recovery path always remain available.
**解决的问题:**Agent 在长任务中可能持续调用工具,却不更新未完成的 todo_write 列表,导致用户看到的计划与真实执行状态脱节。
**最痛的问题:**Agent 明明还在运行,用户看到的却是过期状态——已完成事项仍显示未完成,新阻塞没有记录,下一步也无法判断。任务越长,进度越不可信。

Behavior
After a successful todo_write contains unfinished items, the Guard counts non-bookkeeping tool attempts for that Session:
- At
reminderAfterCalls, it injects one model-visible reminder to reconcile the complete todo list. - After
blockAfterCalls, it denies ordinary tools until another completetodo_writereplaces the list. - Native calls and Code Mode SDK sub-dispatches share the counter.
todo_writealways remains reachable.- The outer
run_codetransport remains reachable so Code Mode can calltodo_write. - A completed or empty todo list disables enforcement.
This plugin fixes stale todo_write state. It does not replace or patch the filesystem Write tool.
Compatibility
- DeepSeek Harness:
0.1.0-rc.6 - Node.js:
^22.19.0 || >=24.0.0 - Package status: community preview
Install
Install the compatible DSH CLI, then add the release archive to the profile that should enforce the Guard:
npm install --global @deepseek-ai/dsh@0.1.0-rc.6
dsh plugin --profile web add https://github.com/lamost423/dsh-todo-freshness-guard/releases/download/v0.1.1/dsh-todo-freshness-guard-0.1.1.tgz
dsh web
To install from a checkout instead:
git clone https://github.com/lamost423/dsh-todo-freshness-guard.git
cd dsh-todo-freshness-guard
corepack enable
pnpm install --frozen-lockfile
pnpm build
dsh plugin --profile web add .
dsh web
The package contributes this default patch layer:
- insert:
- id: todo-freshness-guard
name: dsh-todo-freshness-guard
config:
reminderAfterCalls: 5
blockAfterCalls: 8
Profile and command-line patch layers applied after this bundle may replace the row configuration. blockAfterCalls must be an integer greater than reminderAfterCalls; both values must be positive integers.
Remove it with:
dsh plugin --profile web remove dsh-todo-freshness-guard
Verify
pnpm check
pnpm pack --pack-destination /tmp
The test suite covers the native and Code Mode policies, concurrent resets, Loader composition, the packed Bundle contract, and an actual Web startup through official DSH 0.1.0-rc.6.
License
MIT. Derived portions retain the DeepSeek Harness license; see NOTICE.
原始 README: https://github.com/lamost423/dsh-todo-freshness-guard/blob/main/README.md ↗
同类插件
查看全部 →
dsh-anchored-standard
两阶段 DeepSeek Harness 预设:先 Minimal 对齐的 bootstrap,再切完整 Standard 工具(Project2 98/99)

PicGo-Core
极致的图片上传引擎,CLI 与 API 双支持

awesome-deepseek-harness
DeepSeek Harness(DSH)及其优秀社区插件的精选指南。

awesome-deepseek-harness
DeepSeek Harness (DSH)生态系统:来自dsh-external/hub和公共dsh-plugin主题的精选插件、工具和基础设施。

AI-Novel-Writer
本地优先 AI 小说创作工作台,提供 Windows/macOS 桌面版与 DeepSeek Harness 插件开发预览,支持角色、大纲、章节蓝图、审稿修稿和本地模型。

mcp-for-stata
MCP-for-Stata:把 Stata 集成进你的 agent