Preface¶
When developing agents with DeepSeek Harness (DSH), conversations often become very long. Sometimes a prompt is sent incorrectly, a specific AI response is unsatisfactory, or tool call results clutter the subsequent context, yet you don’t want to fork the session or start over from scratch. DSH session logs are append-only. While the official compaction feature can fold history, there is no built-in entry point to “edit a specific message in place.” The following introduces the community plugin dsh-message-recall (maintainer kyle123740, client-side category). It provides Recall, Delete, and Delete from here on every message. By utilizing the same surface replacement mechanism as the official compaction, it synchronously removes deleted content from both the model context and the interface.
What is this¶
dsh-message-recall is a client-side plugin for DeepSeek Harness. The npm package name is @kyle123740/dsh-message-recall (current documented version 0.2.1, MIT License). Hovering over any message reveals a set of small buttons in the top right corner. Operations are completed within the current session without creating new windows or forking sessions.
It is unrelated to the bare name dsh-message-recall on npm (a different Web recall plugin by Jipcon). When installing and uninstalling, ensure you use the scoped full name @kyle123740/dsh-message-recall.
Core Features¶
Three Actions¶
| Action | Applicability | Behavior |
|---|---|---|
| Recall | Only messages sent by yourself (including steering messages during execution) | Removes the message from model context and interface; automatically fills the original text back into the input box. You can edit and resend it directly, leaving no trace in the conversation. |
| Delete | Any message (AI reply, tool line, etc.) | Deleting an AI reply also removes the tool results for that step (one model call + its tool executions). Clicking a tool line traces back to delete the associated reply. Requires two clicks to confirm. |
| Delete from here | Any message | Truncates from this message to the end of the session, clearing the latter part in place. |
Interface diagram (from README):
Your Question [ Recall ] [ Delete ] [ Delete from here ]
AI Reply [ Delete ] [ Delete from here ]
Tool Call Line [ Delete ] [ Delete from here ]
How it Works¶
- In-place effect: No forking, no new session, no window switching.
- Real deletion: Deleted content disappears from both the model context and the interface. It remains absent after refresh or restart (depending on surface replay via tombstone events).
- Non-destructive to logs: The original text remains in the append-only session log; the plugin writes tombstones using the same
surfaceOp: replacemechanism as official compaction. - No placeholder in UI: Deleted lines disappear directly from the transcript without inserting “deleted” notification lines (different from earlier plugin versions).
Compatibility¶
The declared minimum requirement is dsh >= 0.1.7-alpha.1 (written in package.json under dsh.engines.dsh). The README documents successful testing with DSH 2.0 Desktop (0.2.0-rc.1) and the 0.1.7 line (core 0.1.7-rc.2) on Node 22.23. Versions 0.1.6 and earlier are unverified.
Check local version:
dsh --version
Installation and Activation¶
In the DSH built-in terminal or any terminal capable of executing dsh, choose either npm or GitHub as the source. The only difference between Desktop and Web versions is the profile.
# Install from npm (scoped package, Desktop version)
dsh plugin --profile desktop add @kyle123740/dsh-message-recall
# Install from GitHub (Desktop version)
dsh plugin --profile desktop add github:kyle123740/dsh-message-recall
# Web version: change profile to web
dsh plugin --profile web add @kyle123740/dsh-message-recall
Examples for pinning versions:
dsh plugin --profile desktop add @kyle123740/dsh-message-recall@0.2.1
dsh plugin --profile desktop add github:kyle123740/dsh-message-recall#v0.2.1
dsh plugin forwards arguments to pnpm and does not have enable/disable subcommands. The toggle is located in “Settings → Plugins”. After installation, restart the profile once (for the Host to re-import) and refresh the interface (for the Client to re-fetch the bundle). Verify installed version:
dsh plugin --profile desktop why @kyle123740/dsh-message-recall
Uninstallation (uses package name, not plugin id):
dsh plugin --profile desktop remove @kyle123740/dsh-message-recall
After uninstallation, no plugin state remains. When tombstones are no longer active, deleted content will reappear in the interface, but the session log remains readable.
The plugin runs with the permissions of the current DSH process and may execute code during installation. Please review the source code and license before installing.
Typical Usage¶
- Install and enable the plugin in settings; restart the profile and refresh the interface as described above.
- Open the target session, hover over the message line you wish to handle, and click Recall, Delete, or Delete from here.
- After clicking Recall, edit the backfilled text in the input box and resend directly.
- When deleting AI replies or tool-related lines, follow the interface’s secondary confirmation. If the Agent is currently executing a step, the buttons do not appear. If the Host is busy, it returns
423 AGENT_BUSYrather than silently queuing the request.
If you need to troubleshoot tombstones from disk logs (for development/debugging; scripts are not included in the npm package), the README provides:
node scripts/explain-session.mjs <log_path>
node scripts/scan-replace.mjs <session_root_directory>
The session log path looks like $DSH_HOME/sessions/<project>/<session_id>/session.v4.jsonl.zstd.
How it Works (Brief Overview)¶
On the Host side, the plugin locates the message interval in the surface and appends a user/message tombstone with surfaceOp: { op: 'replace', startSeq, endSeq } (using placeholder text [Recalled], which is non-empty to avoid 400 errors from some upstreams). Session.deriveMessages derives the model history strictly from the surface, ensuring masked content is not included in the next request; original events remain in the log, and foldSurface ensures consistency when reopening the session.
On the Client side, it hooks into conversation.input.overlay, decorating lines based on DOM markers like data-chat-flow, and calls the local route POST /dsh-message-recall registered by this plugin (using same-origin fetch, no external network requests).
Use Cases and Caveats¶
Suitable for: DSH users (Desktop or Web profiles) who need to delete incorrect prompts, unsatisfactory replies, or truncate the latter half of a conversation, while expecting consistency between model context and interface that persists after refresh.
Boundaries and Limitations (all from README):
- System prompts (surface node 0) cannot be recalled or deleted.
- Old turns already folded by compaction cannot have individual steps deleted; the plugin will indicate interleaving with other content (possibly compressed).
- Recall/Delete cannot be undone via the interface. The original text remains in the log and can be manually recovered by reading the log if necessary.
- The surface cannot be modified while the Agent is running.
- Capabilities and Network: The Client only accesses local routes on this instance; Host persistence goes through the DSH Session API without direct disk read/write; no subprocesses or credential access at runtime.
Conclusion¶
dsh-message-recall turns “editing conversations by message” into hover buttons on the DSH client. It uses append-only tombstones to synchronize the model view and interface, making it ideal for daily prompt debugging and clearing error turns. For more information and issues, see GitHub. The community directory page facilitates searching for plugins in the same ecosystem (the directory site is not officially affiliated with DeepSeek / 幻方).
- Directory Page: https://www.skillhub.cn/plugins/kyle123740/dsh-message-recall
- Repository: https://github.com/kyle123740/dsh-message-recall