description: "The out-of-process ACP subagent backend for users and maintainers choosing a delegation provider, configuring a child ACP agent command, or debugging remote child runs."
English | 中文
Use this package to delegate a task to an ACP-compatible agent running in a fresh subprocess with its own runtime, session, model, and tools. Each run shares only the selected working directory, sends the task over ACP, and returns the child's final answer or a safe error; intermediate messages and tool traffic stay outside the parent conversation. Permission prompts are answered by configured policy without human interaction. Choose it when delegation needs process isolation or a non-Harness ACP agent, and choose an in-process backend when the child must share parent capabilities.
Mount this provider when a composition needs a fully isolated, out-of-process child that speaks the Agent Client Protocol. The common path is explicit: mount the seam, mount this provider, and give it a command that starts an ACP agent.
Choose this backend when the child must run with its own runtime, model, and tools in a separate process — for example an ACP agent from another project — or when you want delegation that cannot touch the parent harness. Choose an in-process backend when the child must share the parent's composition or honor parent-enforced capabilities: this provider advertises no optional start-time capabilities, so the seam rejects requests for agentOptions, structured output, depth caps, tool filters, or personas rather than silently omitting them.
| Field | Default | Meaning |
|---|---|---|
providerName |
acp |
Registry name on ctx.subagents |
command |
required | Executable spawned for each run (the child ACP agent) |
args |
[] |
Command arguments |
cwd |
parent session cwd | Working-directory override for the child process and its ACP session |
permission |
reject |
Auto-answer permission requests by rejecting, or choosing the first allow_once or allow_always option (allow) |
env |
{} |
Explicit child environment layered over the credential-scrubbed parent environment |
disposeEofGraceMs |
6000 |
Grace after stdin EOF before platform termination |
disposeGraceMs |
3000 |
Bound for observing structured process facts after failure and, on POSIX, the SIGTERM-to-SIGKILL grace |
The generated configuration catalog is the exhaustive source for every accepted field and its JSDoc.
A DeepSeek Harness child uses the product launcher and an explicit absolute DSH_HOME. The isolated home prevents a nested runtime from discovering the launching person's profiles or credentials; the generic ACP provider does not impose this requirement on non-DSH agents.
- id: subagent-acp
name: '@deepseek-ai/dsh-subagent-acp'
config:
providerName: acp
command: dsh
args: ['--profile', 'acp', '--patch', '/absolute/path/to/acp.patch.yml']
permission: reject
env:
DSH_HOME: /absolute/path/to/isolated-child-home
DEEPSEEK_API_KEY: !!js process.env.DEEPSEEK_API_KEY
A successful run returns the child's final streamed assistant text as the result output. The child's session, model, and tools come from the child process itself — the parent supplies only the task and the working directory. The stop reason maps end_turn to completed, max_tokens to max-tokens, refusal to refusal, cancelled to aborted, and every other value to error. A failed published run preserves partial assistant text in output and returns safe structured detail separately in diagnostic.
A spawn, initialization, or new-session failure rejects before publication, ordinarily after the managed range is proven quiescent. If cleanup also fails, the rejection preserves ordered safe startup and teardown facts without claiming whole-range quiescence. Non-cancellation errors expose only fixed provider, stage, and category facts; the original failure stays on the internal cause chain and in Host diagnostics. After publication, a prompt, transport, or early-process failure resolves as error with a safe diagnostic, while local cancellation resolves as aborted without failure detail.
A generic diagnostic uses one fixed line: Subagent failure (provider: ACP; stage: <stage>; category: <category>; ...). Optional stop reason, exit code, and signal come only from closed protocol or managed-process facts. Stderr, exception text, task content, tool input, paths, environment values, credentials, and protocol payloads never enter the diagnostic; the shared result boundary limits it to 4096 UTF-8 bytes. A non-completed run that requested permission can add one fixed policy, tool-kind, and decision line. Successful runs and local cancellation omit it.
Read these pages when the package-level contract is not enough. They move from this backend to the seam it plugs into and the protocol it drives.
The remote child receives the standalone task content through ACP plus its own process's configured system prompt, tools, and fresh session. It receives no parent conversation. This provider advertises no optional start-time capabilities, so the local service rejects requests for agentOptions, persona, tool filtering, depth enforcement, or structured output instead of silently omitting them.
The child pays for an independent full context and its own multi-step history. These tokens never enter the parent's context.
Independent of the parent request cache. Each ACP child can reuse only prefixes identical under its own provider, model, composition, and history; child steps otherwise grow append-only.
Through dsh-tool-subagent, the parent receives only the child's final streamed assistant text or that consumer's exact stop-reason error, not intermediate messages or tool traffic. Non-completed results present the safe diagnostic before separately preserved partial assistant output. A request already cancelled before publication becomes exactly Error: subagent request was aborted before the ACP child started; another start failure contains only the fixed Subagent failure (...) line.
Parent input grows only by the final result or error, which is data-dependent and retained until compaction. This provider adds no parent schema itself.
Append-only; newly visible content follows the reusable request prefix and does not invalidate existing KV-cache entries.
These limits define when this backend is a poor fit or needs special operational care. They are current package constraints, not a general ACP comparison or a task backlog.
agentOptions, outputSchema, a depth cap, a tool filter, or a persona inside the remote process, so the seam rejects requests that require them.agent_message_chunk text is collected — the automation server keeps reasoning, tool activity, plans, and other trace data in the child session log rather than emitting them on ACP.permission: allow | reject) — no human is surfaced a child's session/request_permission.Runtime invariant: No companion is published. This package exposes no independent event sequence or mutable data relation beyond contracts enforced at its owning seam.