deepseek-ai/deepseek-harness · error
acp: continuable subagent teardown failed: ${String(error)}
Error message
acp: continuable subagent teardown failed: ${String(error)} What it means
Error "acp: continuable subagent teardown failed: ${String(error)}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/acp/acp/src/index.ts:490
// available. session/event enqueues output synchronously before idle.
await Promise.all(records.map(async (record) => {
await record.inflight?.admissionDone
await record.agent.whenIdle()
await record.outputTail
}))
// Continuable subagents outlive the turn that started them, and their
// Activations own descendant teardown. Drain only these sessions' forests
// child-first BEFORE disposing the top-level agents, so no descendant is
// left holding a runtime its owner already released and another frontend
// sharing this Context remains live.
// Read the one teardown method structurally: the bridge needs no other
// part of the subagent seam, so it does not depend on that package.
const subagents = ctx.get('subagents') as ContinuableDrain | undefined
if (subagents !== undefined) {
try {
await subagents.drainContinuableDescendants(records.map(record => record.agent))
} catch (error: unknown) {
logger.warn(`acp: continuable subagent teardown failed: ${String(error)}`)
}
}
const disposals = await Promise.allSettled(records.map(record => record.dispose()))
const failures: unknown[] = []
for (const result of disposals) {
if (result.status === 'rejected') failures.push(result.reason as unknown)
}
if (failures.length > 0) {
// The production consumer logs this AggregateError through `String`,
// which renders only its message. Embed every per-session diagnostic,
// including nested causes and aggregate members, in that message.
const detail = failures.map(failure => errorChain(failure)).join('; ')
throw new AggregateError(
failures,
`ACP agent teardown failed for ${failures.length} session(s): ${detail}`,
)
}
})()View on GitHub (pinned to b150a551b8)
Solutions
- Inspect the teardown error; the failure is logged and teardown continues, but fix the underlying resource release issue.
When it happens
Trigger: Thrown at packages/acp/acp/src/index.ts:490 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/3a95eecf26646032.
Report an issue: GitHub.