
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
dsh-autonomy
Advanced tools
Switch between Chat and Agent without leaving your DeepSeek Harness session.
English | 简体中文
Switch between Chat and Agent without leaving your DeepSeek Harness session.
dsh-autonomy adds an always-visible Chat | Agent control on a dedicated row above the Web composer. It never overlays the text area or consumes space in the composer's tool row. The selection belongs to the current session, survives reloads and resumes, and follows a fork through the durable session log.
Sometimes you want the harness to investigate, edit files, run commands, and keep going. Sometimes you only want a concise answer while you stay in control.
Changing agent presets does not solve that mid-session. dsh-autonomy changes the current session's autonomy without replacing its model, preset, history, sandbox, or permission policy.
The plugin was built in response to DeepSeek Harness Discussion #1644.
Chat mode can reduce accidental token spend when you only need an answer, explanation, or tightly guided collaboration.
It does this in two ways:
This can avoid the kind of runaway agent session described in DeepSeek Harness Discussion #1644.
dsh-autonomy is not a token budget manager or a hard usage limit. Conversation history, prompt size, model output, and provider pricing still determine the final cost. It gives you direct control over when agentic execution is allowed.
| Mode | Model sees tools | Tool execution | Typical turn |
|---|---|---|---|
| Chat | No | Denied | One text response |
| Agent | Original DSH tool set | Original DSH policy | Normal agent loop |
The plugin supports both active DeepSeek Harness prerelease API families: 0.1.0-rc.6+ and 0.1.1-rc.1+. It is verified against 0.1.0-rc.6, 0.1.0-rc.7, and 0.1.1-rc.2. Use Node.js ^22.19.0 or >=24.0.0, matching current DSH releases.
You need a working DeepSeek Harness CLI. Verify it without requiring a global installation:
npx @deepseek-ai/dsh --version
If your existing Harness setup does not provide a global dsh command, keep using the npx @deepseek-ai/dsh form shown below. It invokes the official CLI directly, so a separate global dsh installation is not required.
From npm:
npx @deepseek-ai/dsh plugin --profile web add dsh-autonomy
npx @deepseek-ai/dsh web
If DSH Web was already running during installation, stop it with Ctrl+C and start it again. An existing process does not hot-load newly installed plugins. If the default port is already occupied, stop the old DSH process or test on another port with npx @deepseek-ai/dsh web --port 3081.
From a local checkout:
pnpm install
pnpm run build
npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-autonomy
npx @deepseek-ai/dsh web
The package declares a DSH bundle, so dsh plugin adds both its host behavior and Web client control to the selected profile.
For a GitHub install, DSH's pnpm profile must allow this package's prepare build before retrying the add. A registry release or packed tarball ships built files and needs no install-time build permission.
Remove the bundle from the same profile where it was installed, then restart DSH Web:
npx @deepseek-ai/dsh plugin --profile web remove dsh-autonomy
npx @deepseek-ai/dsh web
The plugin does not keep a separate database or configuration directory. Historical /autonomy command records remain part of the session log, but have no effect after the plugin is removed.
Click Chat or Agent above the composer, or run:
/autonomy chat
/autonomy agent
Every valid switch is recorded immediately through DSH's built-in command log, including during an open turn. That same record drives the UI, survives reloads, and changes the policy gates without waiting for another model step.
Chat mode uses three aligned layers:
It also adds a short system instruction telling the model to answer directly and ask the user to switch to Agent when action is required.
This is intentionally stronger than a prompt-only "please do not use tools" mode. It is also more reliable than rejecting step two: a model can request a tool in its first response, so step-count limiting alone does not create Chat mode.
Switching to Chat prevents tool calls that have not passed the execution gate yet. A tool body that is already running is not cancelled by the mode change, and earlier side effects are not rolled back. No action is required if you want that operation to finish; use the existing Stop control only when you want to cancel the active turn.
Chat mode does not weaken or replace DSH sandbox and permission policies. Agent mode restores the composed tool behavior; the existing policies still decide what those tools may do.
dsh-autonomy runs in the DSH host process, as other trusted Cordis plugins do. It:
/autonomy chat or /autonomy agent from the browser control to the local DSH command service.Installing any third-party DSH plugin executes its code with the privileges of the DSH process. Review the source and package contents before installing it in an environment that holds sensitive data.
web profile, then refresh the browser.unknown command: /autonomy: the Web client loaded but the host bundle did not. Stop every old DSH process and start the same profile again.npx @deepseek-ai/dsh web --port 3081.prepare script in that profile, or use the prebuilt npm release.When reporting a problem, include the DSH version, plugin version, install command, active profile, operating system, and the first relevant host error.
Override the installed row in the profile's cordis.patch.yml:
- id: autonomy
config:
defaultMode: agent
chatGuidance: >-
You are in Chat mode. Answer directly in text. Do not use tools or take actions.
Ask the user to switch to Agent mode when the request requires execution.
denyMessage: >-
Chat mode does not allow tool execution. Switch to Agent mode to use tools.
Defaults are defaultMode: agent and the guidance shown above in equivalent wording.
pnpm install
pnpm run check
pnpm run pack:check
The package contains one DSH host plugin and one browser client bundle. Tests use the real DSH session, command, system-prompt, tool, agent-scope, and execution services; only the Agent object is kept minimal.
CI runs type checking, the host and client test suites, a production build, packed-file inspection, and publint package validation.
MVP for the DeepSeek Harness developer preview. Compatibility-breaking upstream changes are expected while DSH remains in preview.
FAQs
Switch between Chat and Agent without leaving your DeepSeek Harness session.
We found that dsh-autonomy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.