Preface¶
When running a long task in DSH Web, canceling directly usually ends the current turn. If you only want to pause temporarily and continue from the current position later, you need finer control such as task pause, resume, and cancel.
dsh-task-control adds task pause, resume, and cancel capabilities to DSH Web. It supports safe pause and force pause, and resumes from the pause point without repeating completed work.
What This Is¶
dsh-task-control is a DSH plugin hosted at p2coder/dsh-task-control.
It targets DSH Web session tasks and provides three main capabilities:
- Pause the current task
- Resume from the pause point
- Cancel the current turn
It is currently adapted for DSH v0.1.1-rc.2 (latest version). Licensed under MIT.
Core Features¶
Buttons Next to the Input Box¶
While a task is running, pause, resume, and cancel buttons appear next to the input box.
These three buttons control the current turn: pause temporarily stops the task, resume continues from the pause point, and cancel terminates the current turn.
Pause Modes¶
The plugin provides three pause modes:
safe wait: the default mode, waits for reasoning and tools to finish naturally before pausing.safe stop: pauses after tools finish; can interrupt current reasoning.force: immediately interrupts reasoning and in-flight tools.
You can change the default mode in Settings → Task Control.
Slash Commands¶
Common slash commands include:
/pause
/pause force
/pause safe wait
/pause safe stop
/resume
/resume confirm rerun
/resume confirm skip
/cancel
Here, /pause pauses according to the default mode in settings; /pause force forces a pause; /resume confirm rerun resumes after re-executing interrupted or undelivered tools; /resume confirm skip resumes while skipping those tools; /cancel cancels the current turn.
API for Other Plugins¶
Other plugins can obtain the service via ctx.get("taskControl") and then call the following methods:
pause(sessionId, options?)
resume(sessionId, options?)
cancel(sessionId)
state(sessionId)
state(sessionId) is used to query idle, running, or offline status and pause information.
State Persistence¶
Pause state is stored in:
~/.dsh/task-control/
It is not lost after restart.
For testing, you can change the storage directory with DSH_TASK_CONTROL_STATE_DIR.
Installation and Enablement¶
First, install the plugin:
dsh plugin --profile web add github:p2coder/dsh-task-control
After installation, fully restart dsh web, then refresh the browser page.
You also need to restart dsh web after modifying the plugin.
Typical Usage¶
-
While a task is running, click the pause, resume, or cancel buttons next to the input box.
-
To pause using the default mode, use:
/pause
- To stop immediately, use:
/pause force
- When resuming, if interrupted or undelivered tools are encountered, you can choose as needed:
/resume confirm rerun
This re-executes those tools before resuming.
To resume while skipping those tools, use:
/resume confirm skip
-
Change the default pause mode in Settings → Task Control.
-
Other plugins can obtain the task control service via
ctx.get("taskControl")and then callpause,resume,cancel, andstate.
Applicable Scenarios and Notes¶
Suitable for the following situations:
- Long tasks, migrations, or testing that require temporary pauses.
- Wanting to pause faster rather than waiting for all tools to finish naturally.
- Needing to stop a task urgently.
- Wanting to continue from the pause point rather than redoing completed work.
- Other plugins needing to query or control the current task state.
Please note the following:
- The plugin runs with the current dsh process permissions. Review the source code and license before installation.
- With force pause, tools may have already produced partial side effects; before resuming, you can choose to re-run, skip, or stay paused.
- Undelivered tools in
safe waitmode require choosing whether to re-run or skip when resuming. - Sending a new message during a pause starts a new turn; pause only controls the current turn.
dsh-schedulescheduled reminders will still wake up after expiration.- Dispatched sub-agents are not paused by the parent task.
- The browser polls every 2 seconds; restart
dsh webafter modifying the plugin.
Conclusion¶
The value of dsh-task-control is bringing “pause for a moment, continue execution, cancel the current turn” operations in DSH Web down to buttons, slash commands, and plugin APIs. Before installing, it is recommended to review the repository source code and the MIT license before deciding whether to enable it.
Repository addresses:
- GitHub: https://github.com/p2coder/dsh-task-control
- Directory page: no valid URL was available from the materials verified this time; you can search for
dsh-task-controlto view the corresponding community directory.
DSH’s plugin ecosystem emphasizes “everything is a plugin.” The community directory is an independent site with no official affiliation to DeepSeek / 幻方, and should not be regarded as an official app store.