Introduction¶
Running agents in DeepSeek Harness (dsh) defaults to a “read-and-edit” behavior: reading files, writing patches, and calling tools. It is easy to inadvertently modify the repository during a conversation turn. Sometimes, you only want to ask for clarification—where the configuration is, why the retry value is 3, or what might break if you change a setting—without wanting the model to modify any files. Products like Cursor offer an “Ask” read-only mode; DSH includes slash commands like /plan, but lacked a similar “answer-only, no changes” entry point. This article introduces the community plugin dsh-helper-plugin-command-ask (maintained by x102201), which adds the /ask mode to the Harness: a read-only Q&A turn with citations, strict prohibition on editing, and a tool guard that intercepts write operations even if the model “forgets the rules.”
What is this¶
dsh-helper-plugin-command-ask is a client-side plugin mounted on the DSH web profile (Category: Client). In short: it triggers read-only Q&A with /ask <question>, automatically returning to normal working mode after the turn ends; you can also use /ask off to exit early. The implementation references the mode-switching approach of DSH’s built-in /plan and the interaction expectations of Cursor’s Ask.
The plugin is released under the MIT license. The current package version is 0.2.0 (The README badge indicates 82 tests passed under the dsh 0.1.5-rc.2 environment). It introduces no additional runtime dependencies, is pure ESM, and requires no build step.
Core Features¶
/ask Slash Command¶
Type /ask in the Composer, and the slash menu will show /ask Enter or leave ask mode (read-only Q&A). Typical usage:
/ask why is the retry budget 3? # Answers the question in read-only mode, then returns to normal mode
/ask # Arms ask mode for the next turn (can be used without a question)
/ask off # Cancels early (manual 'off' is not required at the end of a normal turn)
- Scope: Defaults to
<scope: turn>, covering only one turn; the Harness releases the mode atturn/end, and the next message without/askis assembled as a normal session. - Optional session scope (Config option): Similar to the “persistent stance” of
/plan, lasting until/ask off; entering standing ask mode exits plan mode to avoid conflicting stances. - The command can include questions and supports attachments like images and files (consistent with the README description).
Read-only Policy and Tool Guard¶
While active, an ask:policy prompt segment is injected into the request, explaining the read-only guidelines for this deployment; this segment disappears when closed.
Read-only guard is enabled by default: It rejects mutating tools configured via the monotonic ctx.tools.guard() and prompts the model to answer based only on readable content when rejected. If you explicitly request file changes during an ask turn, the model should explain how to do it rather than writing directly; rejected tool calls will report ask mode is read-only.
State Persistence¶
The ask state is derived from a collapsed projection of command/run, command/done, and turn/end for /ask in the session log; the plugin does not write session event types undefined by the Harness. Every switch is checkpointed via ctx.sessions.flush() and can be restored after a restart.
The plugin also provides a programmatic interface ctx.askMode: get(agent), set(agent, active) (via real command dispatch), isActive(session).
Relevant to 0.1.x Upgrades (If you installed an older version)¶
Version 0.1.x persisted ask/mode events, which might cause logs containing these events to fail loading in the current Harness. 0.2.0 no longer writes such events; if historical logs need repair, the repository provides scripts/repair-ask-mode-logs.mjs (see GitHub README “Upgrading from 0.1.x”). New installations can ignore this section.
Installation and Activation¶
Prerequisites: dsh plugin passes parameters to pnpm, so ensure pnpm is in your PATH (e.g., corepack enable pnpm). Node >= 20 is required.
Install from GitHub (Common)¶
dsh plugin --profile web add github:x102201/dsh-helper-plugin-command-ask
To pin a version, add a revision: github:x102201/dsh-helper-plugin-command-ask#<tag-or-commit>.
Install from Local Directory (Development/Debugging)¶
The path must be absolute or relative to the working directory where you execute the command:
dsh plugin --profile web add link:/absolute/path/to/dsh-helper-plugin-command-ask
link: creates a symlink to the checkout. After modifying index.js / lib/*.js, simply restart dsh web for changes to take effect; no reinstallation is needed.
Mounting and Restart¶
add installs via pnpm within $DSH_HOME/profiles/web and writes packages declaring dsh.bundle.patch into the profile manifest; on the next startup, the patch layer inserts the host line command-ask. Restart the web profile after installation:
dsh web
Try without Installing¶
dsh --profile web --patch <checkout>/examples/standalone.patch.yml
Verification¶
dsh --profile web --dump-config | grep -A2 command-ask
Enter /ask in the Web UI; you should see Ask mode on (read-only). Use /ask off to leave.; requesting an edit during an ask turn should result in explanation only. You can also use the repository script scripts/verify-live.mjs to perform HTTP RPC verification on a running instance (see README for full parameter descriptions).
Uninstall (See the name field in package.json for the package name):
dsh plugin --profile web remove dsh-helper-plugin-command-ask
Typical Usage¶
- Start
dsh weband enter in the session Composer:/ask why is the retry budget configured as 3? - Read the read-only answer with citations; after this turn ends, simply send:
change the budget to 5 and update the corresponding tests—— no/ask offis needed, the next turn will be in normal editing mode. - If session-level ask is configured or you armed the next turn with a manual
/askwithout a question, you can use/ask offto exit early if you change your mind.
Demo GIF/MP4 available in the GitHub repository docs/assets/ (Recorded on the dsh-helper workbench): In the same environment, /ask refuses to write files, and only a subsequent normal “do it” message creates the file.
Use Cases and Notes¶
Who it is for: Developers who use DSH web daily for in-repo Q&A, code walkthroughs, and troubleshooting, and want zero side effects by default; those accustomed to Cursor Ask who want the same mental model within the Harness.
Permissions and Security: The plugin runs with the same permissions as the current dsh process. The guard only blocks “mutating tools within the configuration” and cannot replace your review of source code and licenses. Please read the GitHub Repository and the MIT license before installation; the community directory SkillHub Plugin Page is an independent index and has no official affiliation with DeepSeek / High-Flyer.
Ecosystem Background: DSH advocates “everything is a plugin”; this plugin injects the command-ask host into the web bundle via cordis.patch.yml, serving as a client-side extension that does not alter the core Harness distribution.
Conclusion¶
dsh-helper-plugin-command-ask turns “ask without changing” into a enforceable single-turn mode with a single /ask: prompt policy + tool guard + automatic release at turn boundaries. It naturally separates the workflow, allowing you to let the agent make code changes after asking questions. For details, configuration, and upgrade instructions, see the GitHub README (including Chinese README.zh.md).
- Directory Page: https://www.skillhub.cn/plugins/x102201/dsh-helper-plugin-command-ask
- Source Code: https://github.com/x102201/dsh-helper-plugin-command-ask