deepseek-ai/deepseek-harness · error
acp: connection-close teardown failed
Error message
acp: connection-close teardown failed: ${String(error)} What it means
Contained teardown diagnostic: the quiesce step that follows connection close itself threw. Logged as a warning only; like the close rejection it never aborts application teardown, it just records that connection-close cleanup did not finish cleanly.
Solutions
- Inspect the teardown error; fix the underlying cleanup failure so future closes are clean.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/acp/acp/src/index.ts:519 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/18ecd1ff39754302.
Report an issue: GitHub.
Appendix: source
Thrown at packages/acp/acp/src/index.ts:519
// 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}`,
)
}
})()
return quiescing
}
/* v8 ignore start -- production transport rejection and teardown failure. */
void conn.closed
.catch((error: unknown) => {
logger.warn(`acp: connection closed with an error: ${String(error)}`)
})
.then(quiesce)
.catch((error: unknown) => {
logger.warn(`acp: connection-close teardown failed: ${String(error)}`)
})
/* v8 ignore stop */
ctx.effect(() => quiesce, 'acp.connection')
}
/**
* Build per-agent options from plugin config without assigning absent optional fields.
* @param config - ACP provider/model configuration.
* @returns the configured fields only.
*/
function agentOptions(config: AcpConfig): { provider?: string; model?: string } {
return {
...config.provider !== undefined ? { provider: config.provider } : {},
...config.model !== undefined ? { model: config.model } : {},
}
}
View on GitHub (pinned to b150a551b8)