Introduction

When developing with DeepSeek Harness (DSH), two alternating needs often arise: sometimes you want the agent to look up information, modify files, and run commands, completing the full agent loop; other times, you only want a concise answer, keeping control in your own hands.

Changing the agent preset can alter behavior, but that is a session-level replacement, which isn’t suitable when the session is halfway through. dsh-autonomy fills this gap: it changes the autonomy level of the current session without replacing the session’s model, preset, history, sandbox, or permission policy. The DSH ecosystem’s philosophy is “everything is a plugin”, and this capability is integrated as a plugin.

Below is an introduction to the installation, usage, and limitations of this plugin.

What is this

dsh-autonomy is a DSH plugin maintained by JinkaiLiu, licensed under MIT, with the current package version being 0.1.2. One-sentence positioning: switch between Chat and Agent modes without leaving the current DeepSeek Harness session.

The package contains a DSH host plugin and a browser client bundle (web platform, injecting @deepseek-ai/dsh-client-ui-conversation), added to a specific profile at once via the dsh plugin command.

Core Features

Persistent Toggle Control: Provides a persistent Chat | Agent control on a dedicated row above the Web composer, without overwriting the text input area or occupying the composer’s tool row space.

State Follows Session: The mode selection is bound to the current session, persisting after reload or recovery, and following forks via persistent session logs.

Chat Mode Three-Layer Protection:

  1. Limit the tools inherited by the agent;
  2. Remove all tool schemas from the final model request, including the reserved Code Mode transport;
  3. Implement execution guards for tool calls that are not announced or come from memory.

Chat mode also attaches a brief system instruction, instructing the model to answer directly in text and prompting the user to switch to Agent when execution is required. Since tool schemas are not included in the request and the execution gate acts as a second layer, this mode reduces unexpected token consumption.

Agent Mode Restoration: Restores the original DSH toolset and execution strategy upon switching back.

Switching Takes Effect Immediately: Every valid switch (including during an ongoing turn) is immediately written to the DSH built-in command log. This record drives the UI state and immediately changes the strategy gating, without waiting for the next model call.

Command Entry: Provides two commands: /autonomy chat and /autonomy agent.

Installation and Activation

Runtime environment requirements: Node.js ^22.19.0 or >=24.0.0. Regarding version compatibility, the released 0.1.1 supports DSH 0.1.0-rc.6+ and 0.1.1-rc.1+ API families; the current development line additionally supports the redesigned 0.1.2 family, verified via 0.1.2-alpha.5 and 0.1.2-rc.1.

First, confirm that the DSH CLI is available; no global installation is required:

npx @deepseek-ai/dsh --version

Install and start from npm:

npx @deepseek-ai/dsh plugin --profile web add dsh-autonomy
npx @deepseek-ai/dsh web

If DSH Web is already running during installation, you need to stop it with Ctrl+C and restart; existing processes will not hot-load newly installed plugins. If the default port is occupied, you can stop the old process or start on a different port:

npx @deepseek-ai/dsh web --port 3081

When installing from a local checkout, build first and add using an absolute path:

pnpm install
pnpm run build
npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-autonomy
npx @deepseek-ai/dsh web

Note: When installing from GitHub source, you need to retry after allowing the package’s prepare build script in the corresponding profile; npm releases or packaged tarballs include build artifacts and do not require build permissions during installation.

To uninstall, remove it from the same profile and restart DSH Web:

npx @deepseek-ai/dsh plugin --profile web remove dsh-autonomy
npx @deepseek-ai/dsh web

The plugin does not maintain an independent database or configuration directory. After removal, historical /autonomy records remain in the session log but no longer take effect.

Typical Usage

Two switching methods: click the Chat or Agent button above the composer; or run commands:

/autonomy chat
/autonomy agent

When you need to adjust default behavior, override the config item with id autonomy 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.

defaultMode defaults to agent; the default wording for chatGuidance and denyMessage is equivalent to the example above.

If you want to participate in development, the repository provides two check scripts:

pnpm run check
pnpm run pack:check

Applicable Scenarios and Notes

Suitable for: Developers who often need to toggle between “letting the agent do the work” and “just getting an answer” within the same session; especially those who want to lower unexpected token consumption without rebuilding session context.

Several boundaries need to be known in advance:

  • Switching to Chat only blocks tool calls that haven’t passed the execution gate yet; it does not cancel running tool instances or rollback previous side effects. If you want the current operation to complete, no action is needed; to cancel the current turn, use the existing Stop control.
  • Chat mode does not weaken or replace DSH’s sandbox and permission policies. Agent mode restores the original tool behavior; what tools can do is still determined by existing policies.
  • The plugin itself makes no network requests, collects no telemetry, does not read provider credentials, and does not read or write workspace files; mode changes are only recorded via DSH’s existing session command log.

Handling two common issues:

  • After installation, the toggle control is not visible: restart the DSH Web process, confirm the plugin has been added to the web profile, and then refresh the browser.
  • Prompt unknown command: /autonomy: the Web client loaded but the host bundle did not load. Stop all old DSH processes and start again with the same profile.

Security Reminder: Installing any third-party DSH plugin executes its code with DSH process permissions. In environments containing sensitive data, you should review the source code and package contents before installing. dsh-autonomy is MIT licensed, and its source code is publicly available.

Summary

dsh-autonomy turns the “autonomy level of the session” into a switch you can toggle at will: context stays put, strategy doesn’t change; switch to Chat when you need an answer to save tool execution overhead, and switch back to Agent when you need execution to restore full capabilities.

Project Address: https://github.com/JinkaiLiu/dsh-autonomy ; Community Directory Page: https://www.skillhub.cn/plugins/JinkaiLiu/dsh-autonomy . The directory is independently maintained by the community and has no official affiliation with DeepSeek or High-Flyer.