dsh-hold: Wait for the session to be truly idle before sending the draft

Preface

In DeepSeek Harness (DSH), when the main agent is still running tools, sub-agents, or background tasks, the Composer’s built-in queuing mechanism often releases your next queued message as soon as the “main agent stops talking.” Since sub-agents and background tasks are invisible to the Composer, the queue might hand over the message before the actual work has finished.

If you wish to send a message only after “the main agent, sub-agents, and background tasks have all stopped running,” or if you want to save drafts on the host side (so they aren’t lost when closing a tab), additional capabilities are required. The following introduces the community plugin dsh-hold (maintainer TetraSsky), categorized under workflows. It independently reads and writes its own data files and does not depend on other plugins.

What is this?

The function of dsh-hold is to Hold (temporarily store) messages you have written in the Composer and send them only after specific conditions are met. The default Harness queue cannot express the dimension of “Wait idle”; this plugin adds that option and stores the pending messages on the host side to avoid relying solely on the browser session.

Environment Requirements

  • DeepSeek Harness with the web profile.
  • If there is no job or sub-agent service, the corresponding checks will simply report “no running tasks,” and the plugin can still be installed and used.

Installation and Activation

  1. Add the plugin using the official command (web profile):
dsh plugin --profile web add github:TetraSsky/dsh-hold
  1. Add dsh-hold to dsh.profile.bundles in $DSH_HOME/profiles/web/package.json and restart the Harness. The cordis.patch.yml inside the package will insert the necessary bundle lines.

Before installing, please review the source code and the MIT license on the GitHub repository. The plugin runs with the permissions of the current DSH process, so it should only be installed from trusted sources.

Core Features

Hold Button on the Composer

A Hold button appears next to the send button in the Composer toolbar. After entering a message and clicking Hold, a configuration window pops up where two axes can be combined independently:

Axis Meaning
Send at Toggle. Default off: no earliest send time is set, and the message is sent as soon as other conditions are met. When turned on, you can select a date from a calendar and use two dropdowns to select hour and minute (manual input is disabled to avoid invalid times; dates prior to today cannot be selected; if the selected time has already passed upon confirmation, it will be rejected).
If the AI is still working Dropdown: Queue (Default) · Wait idle · Send now (Steer)

The UI controls use Harness’s native Button, Switch, Menu, etc.; the calendar is assembled from similar buttons; the body is a multi-line textarea. The width of the window and the staging list follows the Composer, consistent with the drag handle in the conversation area.

The three sending semantics align with the Harness:

  • Queue (Default): Normal queuing for the next turn.
  • Wait idle: Same delivery method, but sent only after the session truly finishes (the headline scenario for this plugin).
  • Send now (Steer): Inserts at the nearest step boundary; equivalent to queuing if the agent is already idle, and will not “steer” an agent that has already stopped.

For example: setting “15th of next month, 09:30” and selecting Wait idle means that if the session is still in progress at that time, it will continue waiting until completion before sending; setting no time but selecting Wait idle means “send as soon as idle”—a combination that the native Harness queue cannot achieve.

How “finished” is determined

Before sending, the plugin queries the in-memory registry, and all three items must be satisfied to consider it finished:

Check Item Source
No running main agent agent.status is idle (including the entire turn with tool calls)
No live sub-agents Sub-agents under this session’s name with status still running
No background jobs ctx.jobs.list(agent), excluding completed / killed / failed

Continuable sub-agents are judged by agent status, not by whether they are resident, to avoid blocking the send indefinitely by sub-agents that have finished but are still resident. Pending approvals, questions, or plan confirmations will keep the main agent running, so separate checks are not needed.

If there are no live agents in the current session, the message will be retained and delivered after the session runs again; it will not be discarded.

Staging List (held list)

Held messages for the current session are displayed above the Composer, with no limit on quantity. If there is only one, it is displayed directly; if there are two or more, they are collapsed into {n} held messages (with a queue icon and chevron). The expanded list is scrollable with a maximum height of approximately 180px.

Each item can be Edited (reopen the window to correct body, attachments, and axes), Sent now (send immediately, ignoring wait conditions), or Deleted. The row indicates what it is waiting for (e.g., main agent, background job) or if it is ready; if there is a scheduled time, a countdown is displayed.

When multiple messages are due simultaneously, they are sent one by one from oldest to newest. After a Wait idle message is sent, the session may become busy again, and the next message will wait for the next completion; Queue or Steer are not gated by idleness and follow oldest-first within the same turn. Send at only determines when a message becomes ready, not how many are sent at the same moment.

Language and Attachments

The window and rejection prompts follow the interface language (English or Chinese). Hold includes images and files already staged in the Composer; you can preview and remove attachments in the window before confirming. Images are stored as bytes for list thumbnails; files are parsed into durable references when the upload receipt is still valid, otherwise the Hold is rejected. After entering Hold, attachments are removed from the Composer bar to prevent accidental sending with the next regular message. Holding is not possible while uploading or if upload fails, and the reason will be given.

Typical Usage

  1. Long-running agent tasks (including sub-agents or background jobs) are in progress, and you want to add instructions without interrupting the current turn: Write the content → Click Hold → Select Wait idle for If the AI is still working → Confirm. The message will be sent automatically after the main agent, sub-agents, and related jobs are all idle.

  2. You want to send later but still avoid busy times: Turn on Send at, select date and time → Combine with Wait idle or Queue. After confirmation, you can Edit / Send now / Delete in the held list.

  3. When you need to steer: Select Send now (Steer) to insert at a step boundary; if idle, the behavior is consistent with queuing.

Use Cases and Notes

  • Suitable for: Web sessions relying on sub-agents or background jobs; scenarios requiring “truly idle before adding another sentence”; needing to retain pending drafts after closing the page.
  • Notes: The plugin only reads and writes its own files; if there are no sub-agents/jobs, the idle check remains usable but the corresponding items are always empty. The community directory SkillHub plugin page and DeepSeek / High-Flyer have no official affiliation. The DSH ecosystem is an independent community distribution method where “everything is a plugin.”

Conclusion

dsh-hold adds Wait idle, scheduled Send at, and host-side staging on top of the native Harness queue, defining “finished” as having no main stream, no running sub-agents, and no unfinished jobs. Installation commands and bundle configuration are listed above; details are subject to the README.

  • Directory Page: https://www.skillhub.cn/plugins/TetraSsky/dsh-hold
  • GitHub: https://github.com/TetraSsky/dsh-hold
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye