deepseek-ai/deepseek-harness · error

workflow-worker-thread: child dispose failed: ${renderThrown

Error message

workflow-worker-thread: child dispose failed: ${renderThrown(error)}

What it means

Error "workflow-worker-thread: child dispose failed: ${renderThrown(error)}" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/workflow/workflow-worker-thread/src/host.ts:443

  /**
   * Start (or join) one registered child's disposal; the registry entry
   * leaves when it settles. Memoized per callId: the worker's dispose RPC,
   * the dispose() host drive, and the reap can all land on the same child —
   * the child's `dispose()` runs once and every caller awaits that one
   * settlement. A rejection is contained (the subagent seam's dispose() is
   * not supposed to reject, but a backend that does anyway must not break
   * quiescence): logged, and the child still leaves the registry.
   * @param callId - the child's registry key.
   * @param record - the registered child (the caller looked it up).
   * @returns resolves when the disposal settled either way; never rejects.
   */
  private disposeChild(callId: number, record: ChildRecord): Promise<void> {
    if (record.disposal !== undefined) return record.disposal
    record.disposal = Promise.resolve()
      .then(() => record.run.dispose())
      .catch((error: unknown) => {
        this.ctx.logger.warn(`workflow-worker-thread: child dispose failed: ${renderThrown(error)}`)
      })
      .then(() => { this.finishChild(callId) })
    return record.disposal
  }

  /** Drop a child record and release quiescence waiters when all work ends. */
  private finishChild(callId: number): void {
    this.children.delete(callId)
    this.notifyChildQuiescence()
  }

  /** Retire one provider startup transaction. */
  private finishPendingStart(task: Promise<void>): void {
    this.pendingStarts.delete(task)
    this.notifyChildQuiescence()
  }

  /** Release waiters only after both pending starts and published children end. */

View on GitHub (pinned to b150a551b8)

Solutions

  1. Investigate the dispose error and manually clean up the worker thread to avoid resource leaks.

When it happens

Trigger: Thrown at packages/workflow/workflow-worker-thread/src/host.ts:443 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/2407d808b0d6edb3. Report an issue: GitHub.