DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

shuaichewang /

shuaichewang/dsh-quit-idle-fix

Verified

用来修复dsh的退出提示bug

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@c45ecc11

dsh-quit-idle-fix

Stop the DeepSeek Harness desktop app from warning that running tasks will be interrupted when the only thing left in the idle inbox is a system notice.

The false alarm

The desktop quit check in @deepseek-ai/dsh-desktop-host counts any pending next-step inbox message as active work:

agent.status === "running" ||
agent.inbox.nextTurn.length > 0 ||
agent.inbox.nextStep.length > 0

But several host features queue purely informational messages with agent.inject(), which does not wake an idle agent. When the approval policy, working directory, plan mode, or a Cordis plugin changes while a conversation is idle, the notice waits in next-step forever. The quit check then sees a pending message and warns about interrupted work even though no turn and no job is running.

This is an interaction bug in the harness itself (the official dsh-desktop-host predicate plus the official notice producers), not a conflict caused by another installed plugin.

What this plugin does

While an agent is idle, it consumes next-step messages whose source.kind is one of:

  • user-approval — approval policy changed
  • working-directory — working directory changed or recovered
  • cordis-host-runner — plugin add/remove/run result
  • plan-mode — plan mode switched

The approval policy and working directory are already stated in the runtime context, and plan mode is reflected in the prompt. Cordis plugin state can be inspected again with the plugin tools. Running agents are never touched, so a notice queued mid-turn still reaches the next step. If a user turn is already queued, the sweep backs off and lets that turn consume the notices.

It checks every 500 ms, does an immediate sweep on load, and keeps no state. Agents with a queued next-turn user message are skipped.

Install

From npm (recommended once published):

dsh plugin --profile desktop add dsh-quit-idle-fix

From GitHub:

dsh plugin --profile desktop add github:shuaichewang/dsh-quit-idle-fix

Or install it from the plugin marketplace. Restart the desktop app if the change does not take effect immediately.

Uninstall

dsh plugin --profile desktop remove dsh-quit-idle-fix

Restart the app afterwards.

Verify

node test.mjs
# ok: idle notices removed, running agent untouched, timer disposed

Then make sure no conversation is running and no background job is active, and quit the desktop app. The interrupt warning should no longer appear. If a real job or turn is running, the warning still appears — that is intended.

Scope and limitations

  • Desktop only. The web profile has no quit-confirmation dialog.
  • Only the four notice kinds above are cleared. A future feature (or a third-party plugin) that injects a different kind while idle can still trigger the false alarm; open an issue if that happens.
  • It does not touch next-turn, real user messages, running agents, jobs, or scheduled tasks.
  • It reads the in-memory agent list and inbox only. No network, no file access, no credentials.

Upstream fix

The cleaner fix belongs in dsh-desktop-host: do not count notice-shaped next-step messages as active work, or avoid leaving non-waking notices in the inbox. This plugin is a workaround that survives app signature checks because it installs as a profile bundle instead of modifying app.asar.

中文说明

DeepSeek Harness 桌面端退出前会把任何待处理的 next-step 消息都当成“有任务”。 但切换审批策略、工作目录、计划模式或增删插件时,官方功能用 agent.inject() 投递的只是提示消息,并不会唤醒空闲会话,于是提示永远留在队列里,退出时就会 误弹“当前正在运行的任务将会中断”。

这个插件只在 agent 空闲时清掉上述四类提示;正在运行的会话完全不受影响。 真实任务、后台作业和已排程提醒仍会正常触发退出警告。

安装:

dsh plugin --profile desktop add dsh-quit-idle-fix

卸载:

dsh plugin --profile desktop remove dsh-quit-idle-fix

License

MIT. Not affiliated with DeepSeek.

—/ 5

No ratings yet

Verified DSH bundle

Commit c45ecc1159c7

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout