Skip to content
Agentic Control Plane

DeepSeek Harness (dsh) Hooks and Permissions Reference

David Crowe David Crowe · · Updated · 11 min read
dsh deepseek-harness hooks permissions reference
Share X HN LinkedIn

Just want the answer? dsh has no shell-hook config to write. The ACP plugin is a native Cordis plugin. Install it into a profile and every tool call is checked and recorded from the next boot. A deny stops the call; read the limits below for what the plugin does not cover.

dsh plugin --profile <your-profile> add @agenticcontrolplane/dsh
export ACP_BEARER_TOKEN=gsk_...   # or keep it in ~/.acp/credentials
dsh --profile <your-profile>

Full dsh install guide →  ·  the controls reference →

Updated 2026-11-21. A deny stops the call on dsh. Until today this page said it did not. That was wrong: plugin versions before 0.1.6 recorded dsh’s own refusal text as if it were tool output, so the log looked like the call had run. The Deny section below is corrected.

Most coding agents add control with a shell hook: a subprocess that gets JSON on stdin. DeepSeek Harness works differently. dsh is built on Cordis, a plugin framework. Its built-in tools, its policy layer and anything you add are all plugins on the same typed pipeline. This post covers that pipeline: what each stage carries, what the ACP plugin does with it, how ask, deny and allow map to dsh’s approval flow, and what the plugin does not cover.

The two interception points

Every tool call in dsh goes through one pipeline: tool/call, then tools/pre-execute, then tools/execute, then tools/post-execute, then tool/result. That covers bash, pwsh, read, write, edit, glob, grep, web_fetch, web_search, subagent spawns, and the sub-calls inside Code Mode. MCP tools use the same pipeline as mcp__<server>__<name>.

Two stages matter for control:

Extension point Fires Can
tools/pre-execute before every tool call return a typed allow, ask or deny; a deny skips the call, with the reason recorded in dsh’s session log
tools/post-execute after every tool call inspect the result and replace its content before the model reads it

Both are ordinary Cordis registrations, the same kind dsh’s own tools use. They run in-process, with no subprocess and no JSON format to keep in sync across dsh releases.

What each stage can return

tools/pre-execute returns one of three decisions:

  • { kind: 'allow' } lets the call through.
  • { kind: 'deny', reason } is meant to skip the call and show the model the reason.
  • { kind: 'ask', reason } goes to dsh’s own approval flow (ctx.approval) instead of a separate prompt.

tools/post-execute can accept the result, block it, or replace the content. That matters because most harnesses’ post-hooks only observe. By the time you notice a leaked credential in a tool result, the model has read it. dsh’s post-execute point can change the result first.

What the ACP plugin does

@agenticcontrolplane/dsh registers on both points. tools/pre-execute posts to /govern/tool-use and gets back allow, ask or deny. tools/post-execute posts to /govern/tool-output to scan the result. A server-side block becomes corrective feedback to the model, and a redact replaces the content the model reads.

Override the settings in your profile’s cordis.patch.yml:

- id: acp
  name: "@agenticcontrolplane/dsh"
  config:
    governBase: https://govern.agenticcontrolplane.com  # or self-hosted
    agentTier: interactive   # default: interactive when an approval service is mounted, background otherwise
    timeoutMs: 4000

ACP_GOVERN_BASE, ACP_BEARER_TOKEN, ACP_AGENT_TIER and ACP_SHADOW=off work as environment variables.

Two dsh facts to know before installing. dsh needs Node 24.9 or newer. Under an older Node it fails at boot with errors that don’t say why. And a bare npx dsh can’t find a plugin installed in a profile, because npx looks up bare package names in its own cache. A --patch overlay that loads the plugin by file path works everywhere, and a normal dsh install resolves fine.

How allow, ask and deny behave

Allow. The call runs with no prompt.

Ask. If an approval service is mounted, the human gets dsh’s own prompt, so they see one consistent prompt no matter who raised it. If none is mounted, dsh denies the ask itself. The hold then waits on the console Approvals page and in the approval email. Approve it there, then ask the agent to retry.

Deny. A deny stops the call. dsh does not run it, and the agent gets the denial reason back as the tool result. In the harness source, the pipeline skips dispatch on a pre-execute deny for every tool. The live check covered one bash call. The safety floor works the same way: a call it blocks does not run. Checked on dsh 0.2.2-rc.1 with plugin 0.1.6: the agent called bash with a command the floor blocks, dsh did not run it, and the agent saw the reason.

Until 2026-11-21 this page said a deny was not enforced. Plugin versions before 0.1.6 recorded dsh’s refusal text as if it were the tool’s output, so the log looked like the tool had run. In the four logged cases behind the original report, the recorded “output” was exactly the refusal text. The coverage matrix has the current status.

The ask behavior with nobody there is dsh’s own, and it is a good default. A headless composition with no approval service resolves ask to deny, so an unattended agent can’t approve itself.

On the output side, the /govern/tool-output response can also carry shadow-mode notices. These show what an enforcement decision would have done to a result before you turn blocking on for that rule.

If ACP is unreachable

Interactive sessions fail open. Calls run, with a loud [ACP] ⚠ UNGOVERNED warning and an entry in ~/.acp/lapse.log. Unattended tiers fail closed, which means the plugin returns a deny. That deny takes the same path as a policy deny. We read that in the plugin and harness source and have not run it live.

--local mode isn’t supported

Unlike the plugins for Claude Code, Cursor, Codex and opencode, the dsh plugin has no on-device fallback. It needs a workspace credential. Run the installer with --local and dsh is detected and skipped, with this message: “DeepSeek Harness detected — skipped in --local mode (its ACP plugin needs a workspace; local decisions aren’t wired there yet).” With no credential at all, the plugin doesn’t block anything. It prints a [ACP] ⚠ UNGOVERNED: no credential warning at boot and stays out of the way.

Known limits

  • Model spend isn’t metered. There is no proxy path for dsh’s model calls, so nothing prices tokens. What is recorded is each tool-call decision: name, input preview, decision, reason, latency, and session and workspace attribution. It shows in the console next to dsh’s own trajectory log.
  • dsh core has no policy engine. Presets such as dsh-permission-presets pair a sandbox mode with an approval setting. Rules come from plugins, and the ACP plugin is one of them.
  • The Claude Code hooks bridge is a compatibility path. dsh’s hooks-claude-code bridge runs an unmodified hooks.json and honors deny and ask, but not input rewriting. The native plugin covers both points and rewriting, so use it instead.
  • dsh is in developer preview and ships breaking changes. After each upgrade, confirm the plugin mounted with dsh --profile <name> --dump-config.

Frequently asked questions

What are dsh's typed interception points?

tools/pre-execute and tools/post-execute, two stages in dsh’s Cordis dispatch pipeline that every tool call passes through: built-in tools, custom plugins, and the serialized sub-calls inside Code Mode. tools/pre-execute returns a typed allow, ask or deny decision before the call runs. tools/post-execute can inspect and replace the result content before the model reads it.

What happens to an ask when dsh runs headless?

It denies itself. In a composition with no approval service mounted, dsh resolves ask to deny by design. This is the harness’s own behavior, not something a plugin adds. An unattended agent cannot approve its own call.

Does the ACP plugin stop a call that policy denies on dsh?

Yes. A deny stops the call: dsh does not run it, and the agent gets the denial reason back as the tool result. Checked on dsh 0.2.2-rc.1 with plugin @agenticcontrolplane/dsh 0.1.6. An earlier version of this page said a deny was not enforced; plugin versions before 0.1.6 logged dsh’s refusal text as tool output, which made it look like the call had run.

Does the ACP plugin for dsh support --local mode?

No. @agenticcontrolplane/dsh needs a workspace credential. Run the installer with --local and dsh is skipped with a message saying so. On-device decisions are not wired into the dsh plugin the way they are for Claude Code, Cursor, Codex or opencode.

Is model spend metered for dsh today?

No. There is no proxy path for dsh’s model calls, so nothing prices tokens. What is recorded is every tool-call decision: tool name, input preview, decision, reason, latency, and session and workspace attribution. It shows in the console next to dsh’s own trajectory log.

Running dsh? One command adds a native plugin. Each tool call is checked and recorded. A deny stops the call, and the agent gets the reason back.

macOS · Linux · WSL
curl -fsSL https://agenticcontrolplane.com/install.sh | bash
Windows · PowerShell
irm https://agenticcontrolplane.com/install.ps1 | iex

What the installer writes  ·  dsh guide  ·  free up to 5 agents

Share X HN LinkedIn
Get the next data drop
What agents actually cost, new tool-surface captures, and the occasional incident post-mortem — sent when we publish something worth your inbox, not on a schedule. Unsubscribe anytime.
Share: Twitter LinkedIn
Related posts

← back to blog