In DeepSeek Harness, the official agent loop processes one queued message at a time by default. If the agent is executing a task while you queue multiple follow-up messages, the system processes them sequentially: execute one, notice an issue and redo it, then execute the next one and correct it again. This patchwork-style redo can interrupt context and consume more tokens.
The dsh-queue-merge plugin solves this problem. It provides a third queue consumption strategy: merging. When the conditions are met, the plugin merges multiple queued messages into a single formal prompt for the agent to process in the next round, avoiding the cumbersome process of redoing message by message.
Plugin Introduction¶
dsh-queue-merge is a workflow plugin maintained by keyiadiannao. Its core value is to consolidate multiple queued follow-up messages into a single formal prompt for the agent to process in the next round, instead of making the agent repeatedly revise each message.
Core Features¶
The main features of this plugin are introduced below.
- Merging follow-up messages: The plugin rewrites multiple queued follow-up messages into one formal prompt, and the agent only needs to process it once.
- Transactional zero-loss: The merge operation is transactional; concatenation occurs only after a successful merge. If merging fails, the queued messages are retained, and the agent automatically falls back to the official message-by-message processing loop.
- Protecting attachments and system messages: The plugin does not merge images, files, or system messages. If the queue contains non-text content, merging is skipped.
- Queue identity guard: Before concatenation, the plugin checks whether the message queue has been modified by the user. If a change is detected, the merge operation is aborted to prevent incorrect concatenation.
- UI language following: The language of the merged prompt follows the current UI language setting (Simplified Chinese or English).
- Original message traceability: A traceability badge is displayed next to the merged message, allowing you to view the original messages and preserving traceability of intent.
Installation and Enabling¶
Use the following command to add the plugin to the Web configuration file:
dsh plugin --profile web add "github:keyiadiannao/dsh-queue-merge#master"
After installation, you need to specify the default policy in the configuration file. Add the following content to the DSH configuration file:
- id: dsh-queue-merge
config:
defaultMode: merge
Here, defaultMode: merge indicates that the batch merge strategy is enabled.
Notes¶
- Trigger condition: The plugin activates only when two or more messages are queued.
- Lossy rewrite: Merging is essentially the process of the model rewriting text, and the original text is replaced. However, regardless of the rewrite result, the queue itself will not be lost on failure.
- Permission boundary: The plugin does not expand the agent’s permissions. It only rewrites text and does not create operation permissions that the agent has never been granted.
Summary¶
dsh-queue-merge reduces repeated redo by the agent during multi-turn interactions by merging queued messages, improving processing efficiency. You can view more details in the Skill Center Directory, or view the source code on GitHub.