dsh-pause-button
Manifest validPause or resume the running task from a 28 px button beside the DSH composer: safe pause lets the current step finish, holds the next agent/pre-step boundary, and resumes the same turn without a conti
dsh-pause-button
English | 中文
A minimal pause/resume control beside the DSH composer, plus /pause and /resume commands.

The button is 28 × 28 px, icon-only, borderless, and inherits the composer tool-row color. It stays at 68% opacity while running, uses one low-saturation blue only when paused, pulses while a safe pause is pending, and fades to 26% when there is no running task. It sits in conversation.input.right, immediately left of Send.
What pause guarantees
- While paused, no new model request is issued. Instant pause cancels the in-flight request; safe pause holds before the next
agent/pre-step. - Completed work is never replayed. Resume continues from the durable conversation and the retained partial output.
- Safe pause also holds live in-process subagents at their own pre-step boundaries. Instant pause cancels the addressed turn; child tool calls bound to that turn are aborted by the runtime.
- A paused session also gates a brand-new turn, including an automatic goal round or a queued prompt, until you resume.
There is one unavoidable cost: DSH model APIs are stateless. Resuming after an instant pause must send the conversation context again, so it costs one request's prompt tokens. The model continues from the checkpoint rather than from the beginning, and completed tool calls/steps are not repeated. Safe resume does not send an extra message.
Pause modes
Instant (default, force / stop / instant)
- Calls
agent.cancel({ kind: 'user' }, { keepInbox: true })immediately: the current model stream and running tools stop now. - The partial assistant output and every completed tool result remain in the session.
- Resume sends one continuation prompt asking the model to continue from the interruption, not to redo finished work.
Safe (safe / wait)
- The current step (including a running tool) is allowed to finish.
- The next
agent/pre-stepis held at its very start, before compaction, context snapshots, or any other listener can issue a model request. - Resume releases that exact boundary and runs pre-step preparation once, continuing the same turn without a continuation message. This is the lowest-token resume path, at the cost of waiting for the current step.
Install
Requires DSH 0.2.2-rc.1 through 0.2.x.
From GitHub:
dsh plugin --profile web add github:trammels51/dsh-pause-button
Or from the prebuilt release tarball:
dsh plugin --profile web add https://github.com/trammels51/dsh-pause-button/releases/latest/download/dsh-pause-button.tgz
Refresh the Web page if the button does not appear after installation.
Commands
| Command | Action |
|---|---|
/pause | Pause using the configured default (instant by default) |
/pause instant / /pause force / /pause stop | Stop thinking and tools now, overriding the default |
/pause safe / /pause wait | Wait for the current step, then hold the next boundary |
/pause status | Show phase, current mode, and default mode |
/pause resume | Same as /resume |
/resume | Resume the paused session and any subagents held by a safe pause |
/pause force also escalates a pending safe pause instead of being a no-op.
Settings
Open Settings → General → Pause granularity:
- Instant (stop) — stop the current thinking/tools now; resume continues from the breakpoint with one context resend.
- Safe (wait) — finish the current step, then stop; no model requests while paused, and resume continues in place.
The choice is stored in $DSH_HOME/dsh-pause.json. The composer button and bare /pause follow it; /pause safe or /pause instant overrides it once.
Implementation
- Host half —
lib/index.js- Registers
/dsh-pause/state,/pause,/resume, and/configroutes. - The safe-pause
agent/pre-steplistener is prepended and holds beforenext(), so downstream compaction or context listeners cannot run while paused. - Instant pause cancels the active turn, retains history, and resumes with one continuation prompt.
- Safe pause recursively holds live descendants reported by
ctx.agents.isOwnedBy; a paused session gates new turns. - Registers
/pauseand/resumethroughctx.commands.
- Registers
- Browser half —
lib/client.js- A hand-written
window.__ModuleLoader__.loadbundle using the officialconversation.input.rightandsettings.general.itemslots. - Polls the current Session state every 900 ms and pauses polling while the page is hidden.
- Requires only the platform-provided
react; no extra npm dependency.
- A hand-written
Verification
npm test runs both suites:
test/host.test.mjs— instant default, cancel + continuation, safe hold beforenext(), safe resume with no extra prompt, subagent pause/resume, new-turn gating, settings writes, origin fence, and force escalation.test/client.test.mjs— bundle exports, both slot registrations, and the pause-state source shape.
Limitations
- Safe pause covers the addressed Agent and its live in-process descendants. Instant pause aborts the addressed turn and its bound child calls; separate-process or remote subagents cannot be reached.
- Instant resume still needs one new model request (context resend), because the provider stream is not resumable. Completed steps are not re-run.
- During a safe pause the Agent status remains
runningbecause the same turn is held. Stop/cancel releases the hold and ends that turn. - Requires the Web host services
webServerandagents; it is not a headless/ACP plugin.
License
MIT
Comments
Loading…
Similar plugins
by p2coder
Pause / resume / cancel the in-flight conversation task from the composer area: forced pause interrupts immediately and remembers the interrupted tool, safe pause lands after the tool or reasoning fin
★ 10
↓ 370/wk
MIT
JavaScript
Oct 19, 2026
dsh plugin --profile web add dsh-task-controlRestart DSH only after every agent and background job is idle, then wake the original session: a cancelable countdown, an occupancy check at the deadline, and a file handoff to a bundled PowerShell re
★ 0
dsh plugin --profile web add dsh-autonomous-restartAdds a one-click Continue button beside Send that resumes a stopped turn by sending the "continue" prompt; hidden while a turn is running or the session is empty.
★ 0
dsh plugin --profile web add dsh-continue-buttonby Mr54233
One-click full-app restart for the DSH desktop client: a sidebar footer button and a settings section with a live config form (master switch, confirm dialog, delay, target executable). Restart is perf
★ 4
JavaScript
Nov 5, 2026
dsh plugin --profile web add dsh-restart-nowby yaopushen
Antigravity-style run_command for DSH: short commands return inline within a configurable wait window (default 10s) while longer ones auto-promote into ctx.jobs for later collection and completion not
★ 1
MIT
TypeScript
Nov 8, 2026
dsh plugin --profile web add dsh-plugin-background-tasksby SanYe-SanJiu
Windows-only process control for the harness: a sidebar button that shuts DSH down through the host's own graceful exit path, an app-window / normal-tab switch on the Plugins card that rewrites the de
★ 0
MIT
JavaScript
Oct 21, 2026
dsh plugin --profile web add dsh-power-switch