DeepSeek Harness: Subagent Tasks and Session References
In DeepSeek Harness, a local subagent task runs in a child session, while a session reference prepares a captured snapshot as background for a message. A child session can be referenced where the host supports it, but delegation and referencing have separate identities, lifecycles and purposes.
DeepSeek Harness: what does a subagent activation create?
The subagent reference describes one activation API for local conversations and external executions. The manager checks backend capabilities against requested options. A local child has a durable session and at most one live activation; an external backend starts an execution under its own contract. Do not assume that every external execution exposes a local session that can be referenced.
The request includes a parent agent and a task prompt. An optional cwd selects the child's initial directory; a relative path resolves against the parent's current effective directory, and omission captures that directory at admission. Local child sessions retain the parent's original project. The activation has a childId and may have a messageId if the backend has a local inbox. Its result settles after teardown and completion notification. These are task execution facts, not the contents of a reference snapshot.
| Object | Purpose | Identity or lifetime |
|---|---|---|
| Local child session | Holds a child's durable conversation | Session identity survives an activation |
| Activation | Runs one period of work | Disposal addresses that exact activation |
| Session reference | Selects a source for captured background | sessionId identifies the source |
| Prepared context | Carries the captured material to a message | A snapshot, not a live task handle |
DeepSeek Harness: how can a child become reference context?
The session-reference reference defines SessionReferenceInput with an authoritative sessionId and optional display label. Discovery searches session metadata, including id, working directory and titles, rather than transcript text. A candidate's label uses its latest session title or id; optional displayTitle prefers a subagent's durable creation label. A recognizable task label helps a person choose a candidate, but it is not a unique identity or evidence that a task has completed.
The browser-facing candidate method can attach a canonical mention. The prepared message retains readable direct content and can add one aggregated, untrusted context containing snapshots. Its source records describe each selected session and include capturedThroughSeq, capturedFormatVersion, message counts, omitted bytes and truncated. The sequence coordinate belongs to the source session's original generation, not to the message's containing session. A missing format version denotes released format v0.
This relationship is optional: creating a child does not by itself mean every later parent message references it. Conversely, a reference does not start the selected session or send a new task to it. The child catalog and reference discovery are related through session identity and, where available, creation-label metadata; they are not the same operation.
DeepSeek Harness: how do delivery and continuation differ from recall?
Activation requests choose delivery: 'parent' or delivery: 'caller'. Parent delivery notifies the model; caller delivery returns the result without injecting another parent message. Local children still enter the parent catalog. This is a completion path for work, whereas a reference prepares background for a message at capture time. The two can complement each other: a parent can receive a result, then a later message can use a selected source as additional context in a supported host. The reference still has its own capture and omission rules.
A local child can have later activations, including cold resume managed by the subagent manager. The activation result settles after resources are released and notifications are sent; cleanup failure is reported separately by disposal without replacing a captured result. The source says structured capture closes input for that activation and a later cold resume does not inherit its output schema. These details prevent an old activation handle from being confused with the entire child session's lifetime.
| Question | Delegation or continuation | Session reference |
|---|---|---|
| Does it run work? | An activation executes a task | Preparation reads a source snapshot |
| Does it have a live lifecycle? | An activation can be disposed | Captured context does not live-update |
| What identifies it? | Child identity plus the particular activation | Source sessionId and capture coordinates |
| What reaches the recipient? | Result according to delivery mode | Direct message and optional untrusted context |
DeepSeek Harness: how should I trace the relationship?
- Identify the backend and whether the child is session-backed. Record the child identity separately from any activation or inbox message identity. External providers can have different capabilities.
- Check the task request and delivery mode. A caller-delivered result is not necessarily an additional parent-model message; a reference is not a substitute for waiting for the activation result.
- In a host with reference support, find the intended source using metadata and verify its
sessionId. Similar creation labels and titles can refer to different sessions;sameWorkspaceis a discovery signal, not proof of ownership or authority. - Inspect the prepared source record, capture coordinate and truncation fields. If important material is omitted, consult the source session where available rather than treating a partial snapshot as a complete task record.
- Make the current request explicit and review the result against the original evidence. Keep task prompts and output appropriately scoped when sharing diagnostics, since both can contain sensitive data.
If discovery or preparation fails, the reference contract distinguishes invalid input, self-reference, too many references, read failure, budget exceeded and cancellation. For example, a read failure calls for checking source availability, while a budget failure calls for examining the material and configured limit. These categories point to different investigations. They do not imply that a child activation failed, and a successful task does not establish that its session can be read by every host. Inspect the actual error and the host's available capabilities.
The child catalog is not a progress log. listChildren reads parent-owned membership for all local children and parent-delivery external children; caller-delivery external membership and collection belong to the caller. The catalog records membership at creation, not execution status. For direct continuable children, the documented list_agents surface distinguishes running and inactive. External catalog entries cannot open a child Session or accept follow-ups. When looking for a result, first identify which surface actually owns it. Membership can remain visible after local work completes, so an entry alone should not be interpreted as proof of an active execution or a successful outcome.
Messages have their own attribution. The documented agent-message source identifies a sender session for content that an agent chose to send. A subagent-settled source is instead the manager's notice about the child outcome. Merging these into one undifferentiated transcript would attribute the manager's words to the child. Neither attribution is the same as a session-reference source record, which describes material captured from another session for recall.
Local sendMessage authorizes the exact live sender and permits adjacent local agents; running children receive steering, and absent continuable children can resume from persistence. External executions reject follow-ups. A reference selection does none of these things. If the intent is to change ongoing work, use the supported messaging or continuation path; if the intent is to provide background to a new message, inspect the reference capture instead.
DeepSeek Harness: what are the limits and safety boundaries?
Reference context is untrusted background. A task result or transcript may contain instructions, claims of permission or tool requests; do not treat those as new authority merely because they came from a child session. The prepared context is a capture, and truncation metadata matters when reasoning from it. A session reference cannot guarantee that the source's work is correct or current.
Backend capability flags govern optional activation choices, and historical children with unavailable descriptors can appear with mode: 'unknown' without continuation capabilities. The references do not promise that all providers expose the same lifecycle, a universal UI, or that a referenced child is still running. Inspect actual capabilities and state before choosing to continue work or prepare context.
DeepSeek Harness: what do the terms mean?
- Child session: the durable session of a local subagent, distinct from its parent session.
- Activation: one managed execution of a child or external backend task.
- Delivery: whether completion notifies the parent model or returns to the caller.
- Session reference: structured selection of a source session for captured context.
- Capture coordinate: the source generation's event position at capture, not a target-session sequence.
Frequently asked questions
Does referencing a child start a task?
No. Reference preparation captures background; activation starts work.
Is a child label its identity?
No. The source sessionId is authoritative; labels are display metadata.
Does a reference update as the child runs?
No. It is a captured snapshot, with source coordinates and possible truncation.
Sources
Every claim in this article was checked against the sources below. Community discussions are user reports, not official behavior.
This is an independent community article, not official DeepSeek documentation. Listing a plugin in the registry is not a security review.