DeepSeek Harness

DeepSeek Harness: How Agent Goals Guide Continuation

· 6 min read · 中文版

A DeepSeek Harness goal records an objective and gives a continuation consumer a bounded way to start further rounds in the same session. Durable goal phase, live activation and the round budget answer different questions, so an active objective alone does not guarantee another round will start.

DeepSeek Harness: what does a goal add to a session?

The goal reference describes a human-requested objective and a durable lifecycle associated with a session. A continuation consumer can attribute admitted user-message turns to that goal. The goal supplies a reason to continue working toward an outcome across rounds; the existing session still supplies the conversation and its recorded events.

The agent lifecycle reference separates durable replay facts in session/event from live control and state in agent/*. That distinction matters when reading a goal: history records what happened, while current process state determines whether a consumer has continuation authority now. A persisted objective is not a promise that the process is running or that a later request will succeed.

Goal phase, activation and remaining rounds determine whether continuation can be admitted

DeepSeek Harness: which states control continuation?

State or fieldQuestion it answers
active, paused, blocked, completeWhat durable phase is the objective in?
ActivationIs the process-local continuation consumer eligible to start another round?
maxGoalRoundsHow many goal rounds may be admitted in total?
roundsStartedWhat is the highest admitted goal-round number so far?
blockedReasonWhy did a policy stop a blocked goal?

The reference says activation is process-local and never persisted. A durable active phase and live activation are therefore separate facts. The service can disarm continuation without changing the durable phase or revision. Its resume operation can arm a stopped goal or rearm an active goal after a session-start edge, while the round budget has capacity. A human-authorized resume is part of that documented activation boundary.

A blocked reason has a stable lower-kebab-case code and a human-readable message. blocked is the durable stopped-by-a-problem phase; paused and complete express different outcomes. A display that shows only “active” omits the activation and budget context needed to reason about whether a continuation is eligible.

DeepSeek Harness: how are rounds counted and recorded?

Each admitted continuation turn is attributed with the goal identity, the current revision and a positive sequential round number. Only those admitted user/message events advance roundsStarted. Replay rejects gaps, non-positive numbers, stale revisions, stopped phases and cap overflow. The cap is the total admitted goal-round cap, not a claim about the number of tool calls, model tokens or successful tasks.

Every durable goal mutation is recorded as a goal/change event: a full post-mutation snapshot, or a tombstone for a clear. The projection derives lifecycle state from those events. An inbox mutation does not itself change goal state. The goal's id remains stable and a GoalRef combines it with the exact revision; accepted durable mutations increment the revision. A stale reference cannot be treated as permission to overwrite a newer change.

For a developer investigating a stopped run, compare the current goal view with the session's admitted rounds rather than counting every assistant response. The lifecycle reference separately explains that successful provider calls settle as assistant/message, while failed attempts without a surface message may settle as assistant/attempt. Those are useful execution evidence, but they are not the documented counter for admitted goal rounds.

DeepSeek Harness: how should I follow a goal through its lifecycle?

  1. Describe the human-requested objective clearly enough to tell when it is achieved. The creation request includes the objective and may include maxGoalRounds; when omitted, the service resolves the deployment's configured default.
  2. Inspect the current goal view: phase, activation, round cap and roundsStarted together provide more information than the objective alone. A blocked view also contains a reason.
  3. While the goal is active and armed, let the continuation consumer admit eligible rounds. Review the actual work and resulting session events; admission is not evidence of success.
  4. Pause when work should stop temporarily, block when a policy records a problem, and complete only when the objective is achieved. These operations disarm continuation according to the service contract.
  5. When continuation is authorized again, use the documented resume path and check remaining capacity. If the objective or cap changes, an edit must contain at least one replacement field and uses the current goal revision.

The service permits a completed goal to be replaced; another current phase must be cleared or resumed instead. Clearing leaves a durable tombstone and history. These are service-level contracts, not instructions to assume a particular button or command is present in every client. The deployment and interface decide how the user reaches these operations.

Why does a mutation need an exact revision?

A view can become stale while another actor changes the goal. The identity and revision in GoalRef let the service reject a mutation aimed at an older snapshot. The caller can then read the current view and decide what should happen. This protects the meaning of a state change; it does not promise that every client provides automatic conflict resolution.

DeepSeek Harness: what are the limits and safety boundaries?

A goal does not override tool permissions, approval decisions, session boundaries or the need to inspect results. A continuation may encounter an external dependency, fail a model request, or exhaust the round cap before achieving the objective. Marking a goal complete is a state transition, not independent verification that the outcome exists. Check the work against the objective before relying on it.

The cited reference does not prescribe a universal default round cap or promise automatic resumption after a process restart. Activation is local to the process, and the documented resume operation has a capacity condition. It also does not turn all messages into goal rounds: only attributed, admitted continuation messages advance the counter. Keep that distinction when interpreting a long transcript.

DeepSeek Harness: what do the terms mean?

  • Objective: the human-requested outcome recorded in a goal.
  • Phase: the durable state of the goal's lifecycle.
  • Activation: process-local eligibility for continuation.
  • GoalRef: goal identity plus the exact revision expected by a mutation.
  • Round cap: the maximum number of admitted goal rounds.
  • Tombstone: the durable record that the current goal was cleared.

Frequently asked questions

Does active mean another round will start?

Not by itself: process-local activation and available round capacity also matter.

What does the round cap count?

It caps admitted goal rounds, not individual tool calls or tokens.

Does clearing erase goal history?

No. A clear writes a durable tombstone.

Sources

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

  1. Same-session goals
  2. Agent lifecycle

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