DeepSeek Harness

DeepSeek Harness: Plan Mode and Tool Approval

· 6 min read · 中文版

DeepSeek Harness plan mode changes the guidance sent to the model; tool permissions, approval decisions and sandbox restrictions remain separate controls. A reviewed plan is not an authorization for every later action.

DeepSeek Harness: what changes when planning is active?

The plan-mode reference describes optional, per-agent collaboration state. When active it adds the deployment's plan:policy section to each model request. This is soft guidance, so its exact content matters: the deployment supplies the text. The agent loop does not require the plan plugin, and the presence of the mode does not establish that any particular tool is unavailable.

Neither the sandbox nor the approval service reads or writes plan state. Their policies must be configured and interpreted independently. A deployment may ask the model to investigate and propose a plan while separate controls decide what a particular tool call may do. The model's adherence to an instruction is not equivalent to enforcement by those controls.

Planning guidance and action approval follow separate paths

MechanismQuestion answeredScope of the answer
Plan guidanceHow should the agent approach the work?Guidance in model requests while active
Plan reviewShould the proposed plan be accepted?A pending mode transition, not every future call
Approval serviceMay this particular action proceed?A single request and its outcome
SandboxWhat restrictions apply to execution?Separately configured execution boundary

DeepSeek Harness: can tools still run during planning?

Plan mode changes the prompt section, not the request tool catalog. In particular, exit_plan_mode remains registered even when plan mode is inactive; invoking it outside plan mode fails. Whether other tools are available depends on the deployment and its policies. The plan-mode reference does not promise a universal read-only tool set, an automatic approval for every call, or a blanket ban on writes.

A specific action that reaches approval is decided separately. The approval service defines allowed-once, rejected, cancelled and unavailable; documented consumers including the tools registry fail closed unless the outcome is allowed-once. That grant applies only to the requested action. It is still necessary to inspect subsequent policy and execution results before saying that the action actually ran.

A practical example is a planning request that includes examining a repository. The guidance can encourage investigation before editing, but the effective tool and sandbox settings govern what the agent can actually do. If a tool request needs approval, the action's own question must be resolved. A permission prompt is not a substitute for reading the proposed plan, and a plan review is not a substitute for inspecting an action's arguments.

DeepSeek Harness: how does plan review affect the next step?

When the optional command service is composed, /plan selects plan mode, /plan off selects inactive, and /plan followed by a message selects the mode and submits that text. Availability depends on composition. While active, exit_plan_mode requires a complete Markdown plan beginning with a # heading and presents it through the user-questions interface.

Approval returns { approved: true } and records a pending exit. The exit is applied at the next accepted in-turn pre-step; the plan guidance therefore remains active for the rest of the current assistant tool batch. Choosing to keep planning produces a failed call carrying feedback so the model can revise. Dismissing review returns { approved: false }, ends the turn and leaves planning active. An unavailable interaction channel or a service reload during review also fails the call.

The distinction between selected and effective state matters during diagnosis. Clients can receive active and pending; a selection made after the last accepted pre-step may wait for a later turn. The reference warns that a process-local pending selection can be lost if the process exits before another accepted pre-step. Do not infer that the current batch has already switched merely because an exit was accepted.

DeepSeek Harness: how should you handle an action approval?

  1. Check whether the question is a review of the plan or approval of a specific tool action. Read the plan as a proposal; inspect the requested action and its arguments separately.
  2. Check the effective approval policy. Under ask, the service delegates to its configured answerers; without a usable answerer the outcome is unavailable. Under never, an ask is rejected before answerers run.
  3. Decide the individual request in context. allowed-once is limited to that request; rejection, cancellation and unavailability do not grant it. Cancellation withdraws the question, and a late answer is discarded.
  4. Observe the resulting tool outcome and any later checks. If a call fails or is denied, do not report the requested side effect as completed merely because it was proposed or approved.
  5. If a plan was accepted, follow the actual mode transition and review later changes against that plan. If the plan needs revision, return feedback through the review rather than assuming dismissal accepted it.

The service records a paired approval/asked and approval/decided in the session log with a fresh request ID. The events are log-only; the model sees the caller's derived tool result and the runtime-context snapshot. A request requires an open turn, and a failure to commit the audit pair can reject the request. These details explain why an absent prompt or a service error needs investigation rather than being interpreted as consent.

DeepSeek Harness: what are the limits and safety boundaries?

Review the effective sandbox and approval settings for the task independently of the plan state. A plan can be sensible while an individual call is too broad, and a one-shot approval cannot establish that subsequent calls are appropriate. The documentation does not claim that plan mode itself confines file, network or process effects.

The review channel may be missing, and deployments may omit the optional plan package. Preserve that distinction when documenting a workflow: describe which capabilities are actually composed and how the operator verifies an outcome. Logs and tool arguments may contain sensitive information, so check them before sharing a reproduction. For the related comparison with orchestration, see plan mode and workflows.

DeepSeek Harness: which terms matter?

  • Plan mode: per-agent state that adds deployment-owned guidance to model requests.
  • Pending selection: a state change awaiting application at an accepted in-turn pre-step.
  • Plan review: a user-questions interaction for a proposed Markdown plan.
  • Approval policy: per-session choice governing how an action approval request is answered.
  • allowed-once: a grant for the particular requested action, not a general permission.

Frequently asked questions

Does plan mode disable all tools?

No. It changes guidance, while tool availability and restrictions depend on the deployment.

Does plan approval authorize every later action?

No. Specific action approvals are separate and a one-shot grant applies only to that action.

When does an approved plan exit take effect?

It is pending until the next accepted in-turn pre-step; guidance remains active for the current tool batch.

Sources

Every claim in this article was checked against the sources below. Community discussions are user reports, not official behavior.

  1. Plan
  2. Approval

This is an independent community article, not official DeepSeek documentation. Listing a plugin in the registry is not a security review.

← Back to all articles

DeepSeek Harness: Plan Mode and Tool Approval