One-click restart (or close-only) for the DSH desktop client from six entries: a sidebar panel, the sidebar footer, the conversation header, a Windows title-bar menu item, a Settings → General row, and the /restart slash command. The five UI entries can be toggled individually; the slash command is always available. Before stopping, the helper verifies the target process identity and can wait for running tasks (plugin installs are hard-blocked). Settings save live with an official toast, a read-only preflight snapshot shows what a restart would affect, and results land in a receipt. Adapts to the platform session authentication change in DSH 0.2.3-alpha.2. Windows and macOS.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-restart-now
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Mr54233/dsh-restart-now
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
One-click restart plugin for the DSH desktop app (Windows 10/11 and macOS 12+). After installing or updating plugins, or when the app gets stuck, one click closes and relaunches it — no tray menu, no hunting for the shortcut.

Install
Same command on Windows (PowerShell) and macOS (Terminal):
dsh plugin --profile desktop add dsh-restart-now
Restart DSH after installing. Run the same command again to upgrade.
Entry points
One restart action, six entries:
| Entry | Where |
|---|---|
| Sidebar panel | Sidebar "Extensions" list → Restart app |
| Sidebar footer | The ⟳ at the very bottom of the sidebar |
| Conversation header | The action area of the conversation title bar |
| Title-bar menu | Next to "Edit" in the Windows title-bar menu; depends on the current desktop shell's menu structure |
| Settings row | Settings → General → Restart app |
| Slash command | /restart (supports --force / --wait) |





Of the six entries, the five UI entries can each be turned off in Settings → Restart app (they disappear from the UI immediately);
/restart is not affected by these entry switches, but it needs the host command service and is still subject to the master switch and environment/safety gates.
The settings page also shows a running-version self-check, the last restart result (stage timings or failure reason),
a read-only pre-restart preflight, and a unified in-progress state across entries (spinner + "Restarting…/Closing…",
synchronized disabling to prevent double-clicks). A progress overlay appears after a restart or close is dispatched;
waiting for idle remains cancellable.
The sidebar panel and the settings page also offer Close only: after confirmation the app exits and does not relaunch — you reopen it manually. When busy, you can force-close or cancel; there is no wait option. Restarting interrupts running output and tasks; wait mode lasts at most 30 minutes, after which a restart is dispatched even if tasks are still running. The helper reuses the original launch arguments when they can be parsed safely; otherwise it starts without arguments. If relaunching fails, reopen the app manually.
Restart safety and diagnostics
- Process identity verification: before stopping the main process, the helper checks path, start time and related information; on mismatch it aborts and records the reason, reducing the risk of wrong-process operations. The check and the termination are not atomic, so races cannot be fully excluded.
- Visible failures: exceptions after dispatch (identity mismatch, process not stopping, unconfirmed outcome) are surfaced in a dialog instead of failing silently.
- Read-only preflight: one click in Settings shows the current environment, target executable, install lock, tasks and cooldown state. It is an instant snapshot; it does not guarantee a later restart will be safe, and process identity and launch arguments are not verified in preflight.
| Receipt | Meaning |
|---|---|
| No record | No readable receipt for a previous operation; nothing inferred |
| Dispatched, unconfirmed | Request recorded, no completion or failure result yet |
| Completed | The new process passed a short liveness check; does not prove all plugins are ready |
| Failed | The helper recorded a failure reason |
| Closed | A "close only" completed; no relaunch |
Listening and HTTP probing are observational only: a 2xx response on a local port does not prove the response comes from the target app, let alone that the app is ready. A hot reload is not a restart request of this plugin and does not update the receipt.
What it does
- While a plugin install/uninstall is in progress, restarts are blocked. With active tasks you can wait, force, or cancel.
- The helper stops the main process first, leaving the host time to exit and flush data; on timeout the host may be force-stopped and unsaved data may be lost.
- The helper relaunches the app, reusing the original launch arguments when they can be parsed safely; otherwise it starts without arguments.
- The outcome is written to a receipt; the settings page shows downtime or the failure reason.
Both platforms share the same "helper confirm → main process exit → relaunch" flow with different primitives:
Windows stops the main process with taskkill /F, observes listening via PowerShell and shows dialogs via PowerShell;
macOS sends SIGTERM first (escalating to SIGKILL after 10 seconds), observes via lsof, and shows dialogs via osascript.
Security boundary: action endpoints check loopback origin and same-origin information, and platform session authentication is attempted by default. When the platform auth service is unavailable, throws, or is turned off, the fence check alone applies — other local programs are not guaranteed to be blocked.
Configuration
Switches in the Settings → Restart app section save automatically; the executable path is validated and saved on blur.
Configuration is written to the current profile's restart-now.config.json, and can also be set in the config block
of the profile's cordis.patch.yml entry; the file takes precedence over the patch. Default locations:
- Windows:
%USERPROFILE%\.dsh\profiles\desktop\restart-now.config.json - macOS:
~/.dsh/profiles/desktop/restart-now.config.json
| Key | Default | Description |
|---|---|---|
allowRestart |
true |
Master switch; false makes the action endpoint return 403 disabled |
confirm |
true |
Ask for confirmation before restarting |
entryPanel |
true |
Sidebar panel entry |
entryFooter |
true |
Sidebar footer button (replaces the deprecated hideSidebarButton) |
entryHeader |
true |
Conversation header button |
entrySettingsRow |
true |
Settings → General row |
entryTitlebar |
true |
Windows title-bar menu "Restart" item |
platformAuth |
true |
Attempt platform session auth by default; falls back to the fence check when unavailable or off. Set false to recover if the UI itself reports unauthorized |
exePath |
'' |
Absolute path to the app executable; blank = auto-detect from the running install (Windows DeepSeek Harness.exe; macOS the binary inside the .app) |
Scope
- OS: Windows 10/11 and macOS 12+ (Intel / Apple Silicon); on other systems the plugin mounts no entries.
- DSH Desktop: declares
>=0.2.0-0; this is a declared range, not a guarantee that every future version is verified. Version 1.5.0 adapts to the platform session authentication interface change in0.2.3-alpha.2; the changes in this release have not been fully verified on real macOS hardware. The settings page shows the actual version and warns when it is outside the declared range. Does not apply to the Web profile /dsh web. macOS support needs contributors with real hardware — the maintainer has no macOS machine. See CONTRIBUTING if you can help. - No system Node required: the helper uses the app's bundled runtime (on macOS that is the app binary itself
with
ELECTRON_RUN_AS_NODE=1).
Development
npm test # node:test, runs on Windows / macOS, no process side effects
npm pack --dry-run # verify tarball contents (CI runs on Windows / macOS)
Architecture and implementation details (gate chain, restart mechanism, client slots, errata history)
are in the docs/ directory (in Chinese).
Links
More in this category
yjh051108/dsh-routing-suite★ 7027
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3950
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
first-fluke/oh-my-agent#dsh★ 1494
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
MichengAI/dsh-skills-manager★ 631
Manages local DeepSeek Harness skills in Settings and shows shared Agent skills as read-only.
hust-open-atom-club/oh-dsh★ 326
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
Fishquito7/dsh-skill-mcp-panel★ 291
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.