Leeminjing/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.
dsh-messages-sanitizer repairs a DeepSeek Harness conversation that breaks while creating or loading a plugin. The README describes the failure precisely: one tool-dispatch crash (Cannot read properties of undefined reading 'prepare') leaves an orphaned tool_calls in the session, after which every subsequent turn is rejected with 400 INVALID_REQUEST, retries do nothing, and the session is stuck. With the plugin installed, the messages array is automatically repaired back to a valid state so the conversation continues instead of freezing. The README presents a before/after diagram of the orphaned-tool_calls failure and publishes the repo layout showing package.json's dsh.bundle entry point.
Install
dsh plugin --profile web add github:Leeminjing/dsh-messages-sanitizernpm package dsh-messages-sanitizer 0.1.1 (registry re-verified 2026-09-29; repository field points back at github.com/Leeminjing/dsh-messages-sanitizer). Update with dsh plugin --profile web update dsh-messages-sanitizer. The repo's package.json declares the dsh.bundle entry point used by dsh plugin add.
Compatibility
DeepSeek Harness Web plugin. The README frames it as a repair for a specific tool-dispatch crash in DSH sessions; it declares its install entry point through the repo's package.json dsh.bundle field.
Details
- Repo: Leeminjing/dsh-messages-sanitizer
- Category: Sessions & Messages
- Stars: 4
- Version: npm dsh-messages-sanitizer 0.1.1 (registry re-verified 2026-09-29); git spec also documented
- Last push: 2026-08-24
- First seen: 2026-08-15
Recent updates
The README documents the exact orphaned-tool_calls failure mode and 400 INVALID_REQUEST symptom it repairs, and shows package.json declaring the dsh.bundle entry point. Version 0.1.1.
FAQ
- What problem does dsh-messages-sanitizer fix?
- Per the README, one tool-dispatch crash while creating or loading a plugin (Cannot read properties of undefined reading 'prepare') leaves an orphaned tool_calls in the session, after which every turn is rejected with 400 INVALID_REQUEST; the plugin repairs the messages array automatically.
- How do I install it?
- Run dsh plugin --profile web add github:Leeminjing/dsh-messages-sanitizer (npm dsh-messages-sanitizer 0.1.1 also exists), and update with dsh plugin --profile web update dsh-messages-sanitizer.
- Does it change my conversation content?
- The README describes it as repairing the messages array back to a valid state so the session continues, not as rewriting the conversation.
Alternatives
beijingwahw/dsh-companion · chouyong/dsh-fork-graph · dream12347/dsh-session-manager