dsh-messages-sanitizer
Auto-repairs the messages array after a tool-dispatch crash (orphaned tool_calls / tool messages), preventing 400 INVALID_REQUEST session lock-ups.
工具调度崩溃后自动修复 messages 数组(孤儿 tool_calls / tool 消息),防止 400 INVALID_REQUEST 会话卡死。
How to install
dsh plugin add dsh-messages-sanitizer About
dsh-messages-sanitizer **🔧 你在 DeepSeek Harness 里创建 / 加载插件,对话崩了吗?本插件专治这个。** > 开发或加载本地插件时,一次工具调度崩溃(Cannot read properties of undefined (reading 'prepare'))就会在会话里留下孤儿 tool_calls,之后**每一轮**都被 400 INVALID_REQUEST 拒绝、重试无效、会话卡死。**本插件自动把 messages 数组修回 合法,让对话继续,不再卡死。** 💥 Before ✅ After (安装本插件后) 插件崩溃 插件崩溃 ↓ ↓ 留下孤儿 tool_calls messages 自动修复 ↓ ↓ 400 INVALID_REQUEST 死循环 对话继续 ↓ 对话卡死 DeepSeek Harness 消息数组自动矫正插件:**防止一切因 messages 数组不合法导致的聊天崩溃**。 背景:你遇到的那个崩溃 OpenAI 兼容协议要求工具调用成对出现,且 tool 消息必须**紧邻**其 assistant tool_calls 消息(中间不能插入任何 user / assistant 消息): assistant { content: ..., tool_calls: [{ id: "call_A", ... …
Recommendation signals
Meta
- License
- MIT
- Language
- JavaScript
- GitHub stars
- 3
- mo. downloads
- 828
- Last push
- 2026-09-04
- Created
- 2026-08-15
Links
Basic safety check
- Findings
- None
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- ai-agent, coding-agent, deepseek, deepseek-harness, deepseek-harness-plugin, dsh-plugin, message-repair, openai-compatible, tool-calling
Related plugins
DSH-EasyRewrite
Renzic-Stone/DSH-EasyRewrite
Inline-edit and recall your own user messages in dsh web — lazily and seamlessly, with a version pager and per-session draft persistence.
dsh-web
zhu1090093659/dsh-web-ui/tree/main/packages/dsh-chat-recovery
Chat recovery for DSH: edit the last finished user message and explicitly retry failed turns, both via session-fork branches that leave the original conversation untouched.
dsh-nested-followups
sluminositys/dsh-nested-followups
Keep branching from any completed answer at any depth while the main session stays untouched.
dsh-session-sync
PerryLink/dsh-session-sync
Cross-device session sync for DeepSeek Harness — syncs sessions and settings between machines through git.