{"record":{"id":"2407d808b0d6edb3","repo":"deepseek-ai/deepseek-harness","slug":"workflow-worker-thread-child-dispose-failed-re","errorCode":null,"errorMessage":"workflow-worker-thread: child dispose failed: ${renderThrown(error)}","messagePattern":"workflow-worker-thread: child dispose failed: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/host.ts","lineNumber":443,"sourceCode":"\n  /**\n   * Start (or join) one registered child's disposal; the registry entry\n   * leaves when it settles. Memoized per callId: the worker's dispose RPC,\n   * the dispose() host drive, and the reap can all land on the same child —\n   * the child's `dispose()` runs once and every caller awaits that one\n   * settlement. A rejection is contained (the subagent seam's dispose() is\n   * not supposed to reject, but a backend that does anyway must not break\n   * quiescence): logged, and the child still leaves the registry.\n   * @param callId - the child's registry key.\n   * @param record - the registered child (the caller looked it up).\n   * @returns resolves when the disposal settled either way; never rejects.\n   */\n  private disposeChild(callId: number, record: ChildRecord): Promise<void> {\n    if (record.disposal !== undefined) return record.disposal\n    record.disposal = Promise.resolve()\n      .then(() => record.run.dispose())\n      .catch((error: unknown) => {\n        this.ctx.logger.warn(`workflow-worker-thread: child dispose failed: ${renderThrown(error)}`)\n      })\n      .then(() => { this.finishChild(callId) })\n    return record.disposal\n  }\n\n  /** Drop a child record and release quiescence waiters when all work ends. */\n  private finishChild(callId: number): void {\n    this.children.delete(callId)\n    this.notifyChildQuiescence()\n  }\n\n  /** Retire one provider startup transaction. */\n  private finishPendingStart(task: Promise<void>): void {\n    this.pendingStarts.delete(task)\n    this.notifyChildQuiescence()\n  }\n\n  /** Release waiters only after both pending starts and published children end. */","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/host.ts#L425-L461","documentation":"Error \"workflow-worker-thread: child dispose failed: ${renderThrown(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/host.ts:443 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Investigate the dispose error and manually clean up the worker thread to avoid resource leaks."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}