dsh-task-control

August 30, 2026 · View on GitHub

Awesome DSH Plugin

English | 中文

dsh-task-control whale-girl hero illustration

Adds task pause, resume, and cancel controls to DSH Web. Supports safe and force pause, then resumes from the pause point without repeating completed work.

Currently adapted to DSH v0.1.1-rc.2 (latest version).

Installation

dsh plugin --profile web add github:p2coder/dsh-task-control

After installation, fully restart dsh web, then refresh the browser.

Quick start

Three persistent buttons appear beside the input box while a task is running:

ButtonActionAvailable when
⏸ PausePause using the configured defaultRunning
▶ ResumeContinue from the pause pointPaused
⏹ CancelStop the current turn immediatelyRunning or paused

Gray buttons are unavailable; dark buttons are clickable.

Location and states of the Pause, Resume, and Cancel buttons

Pause modes

ModeBehaviorBest for
safe wait (default)Waits for reasoning and tools to finish naturallyLong tasks, migrations, tests
safe stopWaits for tools, but may interrupt current reasoningFaster pauses
forceImmediately interrupts reasoning and in-flight toolsEmergencies

Change the default under Settings → Task control. Saving applies it immediately:

Steps for configuring task pause granularity

Commands

CommandDescription
/pausePause using the configured default
/pause forceForce pause
/pause safe waitSafe pause without interrupting reasoning
/pause safe stopSafe pause that may interrupt reasoning
/resumeResume the task
/resume confirm rerunRe-run an interrupted or deferred tool, then resume
/resume confirm skipSkip that tool, then resume
/cancelCancel the current turn

Using task controls with a slash command

Plugin API

Get the service with ctx.get("taskControl"):

APIAction
pause(sessionId, options?)Pause a task
resume(sessionId, options?)Resume a task
cancel(sessionId)Cancel a task
state(sessionId)Read idle, running, or offline status and pause details

Pause state is stored under ~/.dsh/task-control/ and survives restarts. Tests can override the directory with DSH_TASK_CONTROL_STATE_DIR.

Notes

SituationBehavior
Force pauseA tool may have partial side effects; choose re-run, skip, or stay paused before resuming
Deferred tools under safe waitResume requires choosing re-run or skip
New messages while pausedStart a new turn; pause controls only the current turn
Scheduled remindersDue dsh-schedule reminders still wake the session
SubagentsAlready-dispatched subagents are not interrupted with the parent
State syncThe browser polls every 2 seconds; restart dsh web after plugin changes

Test

node test/host-smoke.mjs