Stop a running background job from the session-header job list, with a confirmation dialog that restates the full command.
Install
# from npm (prebuilt)
dsh plugin --profile web add @gorban/dsh-job-stop
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/gorban/dsh-job-stop/releases/latest/download/dsh-job-stop.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:gorban/dsh-job-stop
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Stop a running background job from the DeepSeek Harness web session header — hover its row in the background-job list, click the stop sign, confirm in a dialog that restates the full command.

Hovering a running row covers its animated state dot with a stop button; the dialog restates the command, kind, status, elapsed time, and job id before anything is cancelled.
What it does
The session header's background-job list becomes actionable for the human, not just readable:
- Hover a running row and the animated state dot is covered by a red stop button, with a tooltip and an accessible name that both name the job (
Stop background job: <command>). - Activate it and the house confirmation dialog opens — the same
Modal+Buttoncomposition the session rename and workspace delete dialogs use — restating the full command, the job kind, its status, how long it had been running, and its registry id before anything is cancelled. - Confirm and the host kills the job through
ctx.jobs, the row flips tostoppingand thenkilledfrom the ordinary pushed frame, and the owning agent is told that a human stopped its job.
Everything is localized (English and Simplified Chinese) and keyboard reachable: the stop button takes focus and reveals itself on :focus-visible, Escape closes the dialog, and prefers-reduced-motion disables the fades.
Why it exists
ctx.jobs already ran every background bash/pwsh/PTY/subagent job, and dsh-tool-jobs already exposed job_kill — to the model. The web list (dsh-client-ui-jobs) was a deliberately read-only projection, and its own README named the reason cancellation was deferred:
Rows are read-only — … Cancellation additionally owes a model-facing decision the seam does not answer:
kill()marks terminal delivery reported, so an interrupt written against the current contract would leave the model believing its job is still running.
That is the whole problem this plugin solves, and the design note 2026-08-08-web-background-job-display left stopping in the wire union precisely so this phase would not need a wire change. Two consequences shape the implementation:
- The model must be told.
JobRegistry.killsetsreported = true, anddsh-tool-jobsskips its completion notice for a reported job. So after a successful kill this plugin injects its own plugin-sourced notice (injectwhile the agent is busy,followupwhen it is idle andnotice: wakeup), or the model would keep waiting on a job that no longer exists. - A job that already ended must not be killed. Calling
killon a terminal record also setsreported, which would swallow the completion notice the model is still owed. So the endpoint reportsalready-finishedwithout callingkillwhenever the job has leftrunning.
Install
From npm — prebuilt, so the install needs no build step and no allowBuilds approval:
dsh plugin --profile web add @gorban/dsh-job-stop
From GitHub — no npm account involved:
dsh plugin --profile web add github:gorban/dsh-job-stop
From a release tarball — for a host that cannot reach npm or a GitHub source archive:
dsh plugin --profile web add https://github.com/gorban/dsh-job-stop/releases/latest/download/dsh-job-stop.tgz
Then restart dsh (a plugin row is mounted at profile load). The command adds the dependency and, because package.json declares dsh.bundle, lists the package in dsh.profile.bundles so its cordis.patch.yml row is applied.
Requires dsh 0.1.2-alpha.1 or newer, declared as engines.dsh so the Plugin Market's host-aware filter can read it: both the jobsBySession mirror this list renders from and the ctx.connection.fetch route seam the stop endpoint is claimed on first shipped in that release.
The shipped @deepseek-ai/dsh-client-ui-jobs row can stay enabled: this plugin registers its list under that entry's own slot cell id (job-list) at a lower priority, so the header keeps exactly one control and the read-only list is shadowed rather than duplicated. This plugin also renders correctly with that row disabled, because it reads the same jobsBySession mirror.
How it works
Host half (src/index.ts) claims one authenticated route on the Connection fetch registry:
ctx.connection.fetch.register({
path: '/api/dsh-job-stop/kill',
methods: ['POST'],
requestBody: 'buffered',
fetch: request => handleStop(ctx, config, request),
})
That registry is deliberate, and it is not the obvious choice. ctx.webServer.register({ kind: 'exact', path: '/api/...' }) — the pattern a plugin reaches for first — matches the web server's exact table before Connection's /api prefix route, so it runs ahead of requestRejection and therefore outside the host/Origin trust and browser-authentication fence. That is fine for a prompt toggle and wrong for a mutating kill, so this endpoint is claimed on the shared fetch handler instead, where the fence has already run.
The handler then:
- validates
{ sessionId, jobId }and rejects malformed bodies (400); - resolves the Session's exact live Agent with
ctx.agents.get(...)and refuses when there is none (409) — ids are predictable, so authorization, not secrecy, is the boundary, and the registry fenceskillby that Agent; - reads the job with
ctx.jobs.get(...), neverctx.jobs.read(...):readconsumes the job's single output cursor and would silently take bytes the model'sjob_outputwill never see; - reports
already-finishedfor a job that has leftrunning, otherwise callsctx.jobs.kill(...)and, onrequested, delivers the notice.
Browser half (src/client/) shadows the built-in list entry and adds the hover affordance. It talks to the registry only through that one POST; job state still arrives through the pushed jobsBySession mirror, so no polling or optimistic row state is involved.
Configuration
- id: job-stop
name: "@gorban/dsh-job-stop"
config:
notice: wakeup # or: quiet
maxConsecutiveWakes: 3 # turns this plugin may open per agent between its own inputs
| Option | Default | Meaning |
|---|---|---|
notice |
wakeup |
wakeup opens a turn on an idle owning agent so it learns immediately (one model request, the same default dsh-tool-jobs ships for its own completion notices). quiet leaves the account pending until something else wakes the agent. A busy agent is injected either way. |
maxConsecutiveWakes |
3 |
How many turns this plugin may open on one agent between that agent's own human inputs. Mirrors dsh-tool-jobs' bound of the same name and for the same reason: a burst of stops should not spend a model request each. Past the budget the account is injected instead, so the model still learns — it just is not woken for it. |
Requirements
Every dependency is provided by the dsh installation this plugin runs inside, and is resolved from the host's module graph — the plugin pins itself to no harness build:
| At runtime | Used for |
|---|---|
ctx.jobs, ctx.agents |
the registry and the owner fence |
ctx.connection.fetch |
the authenticated route (@deepseek-ai/dsh-client-connection) |
@deepseek-ai/dsh-jobs, dsh-session, dsh-llm, schemastery |
job/session ids, the identified notice message, config schema |
@deepseek-ai/dsh-client-ui-primitives, dsh-client-ui-slots, dsh-client-locale, dsh-client-ui-conversation, React |
the list, the dialog, and the slot contract |
These are deliberately not declared as peerDependencies. Declaring them makes a standalone pnpm install try to fetch harness packages from npm, and at least one published range currently resolves to a build whose tree depends on @deepseek-ai/dsh-type-meta, which is not on the public registry. The plugin therefore installs with no network resolution of harness code at all.
Development
pnpm install
pnpm build # host half -> lib/index.js, browser half -> lib/client.js
pnpm test # builds, then runs the host-half behavior suite (node --test)
Both halves are built by tsdown through build/tsdown.client.ts, which emits the browser bundle as a window.__ModuleLoader__.load({ id, factory }) closure whose id is this package's published name — the browser module system rejects a bundle that registers any other id.
Releasing
npm version patch # or minor/major; commits and tags
git push --follow-tags
Then publish a GitHub Release for the tag. That one action attaches the prebuilt dsh-job-stop.tgz asset (which the tarball install route above points at) and, once NPM_PUBLISH_ENABLED is set, publishes to npm. The release notes are what the Plugin Market shows for an update, so write them for users rather than as a commit log. .github/workflows/release.yml documents the npm trusted-publisher setup that has to exist once.
The client half is not typechecked by the build (the published rc packages on npm predate the slot contract and the jobsBySession mirror this plugin targets). To typecheck against a real checkout instead:
DSH_CHECKOUT=/path/to/deepseek-harness node scripts/typecheck-harness.mjs
That project spans the plugin and the harness sources and fails only on errors inside this repo's src/; the harness's own guest diagnostics are reported as a note. It is worth running after touching the slot registration or the host route, because those are the two places where a stale published type would hide a real mistake.
Known limitations
- Only
runningrows offer the stop affordance. Astoppingjob is already ending; offering to stop it again would be a second request for the same outcome. - The dialog restates what the registry published. For
bashthat is the complete command (args.command, untruncated), which is why the dialog is worth opening. A producer that publishes a truncated label gives the dialog only that. - A Session with no live Agent cannot have its jobs stopped (
409). The kill is fenced by that exact owner instance, and guessing one would be an authorization hole. - Stopping a job does not remove its
run_in_backgroundcard from the transcript; the card was never live-updating, and the list is where the outcome is legible. - The shadow depends on one cell id. If upstream renames the
job-listslot entry, this plugin's entry stops replacing it and both lists would render. The fix is a one-line id change here. - The recorded kill reason is a fixed English string (
stopped by the user from the background-job list), kept stable so it greps in logs and in a job's terminaldetail; it is not user-facing copy.
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 7907
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 7907
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
omdsh-dev/DSH-better-sidebar★ 3701
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
ccch1mneyyy/dsh-TUI★ 3136
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 2895
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
Devin-AXIS/deepseek-design#deepseek-idesign★ 1434
Visual design studio for websites, app prototypes, posters, cards, reports, and magazines, with templates, direct element editing, selection-aware AI draft handoff, and export.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.