{"record":{"id":"cbb9af15e966e18d","repo":"deepseek-ai/deepseek-harness","slug":"workflow-worker-thread-refused-child-dispose-fail","errorCode":null,"errorMessage":"workflow-worker-thread: refused child dispose failed: ${renderThrown(error)}","messagePattern":"workflow-worker-thread: refused child dispose failed: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/host.ts","lineNumber":380,"sourceCode":"            },\n          }\n          : {},\n      })\n    } catch (error: unknown) {\n      const failure = this.childAdmissionFailure()\n      this.post(HostToWorkerType.ChildStartError, {\n        callId,\n        rendered: failure?.rendered ?? renderThrown(error),\n      })\n      return\n    }\n    const failure = this.childAdmissionFailure()\n    if (failure !== undefined) {\n      this.post(HostToWorkerType.ChildStartError, { callId, rendered: failure.rendered })\n      try {\n        await run.dispose()\n      } catch (error: unknown) {\n        this.ctx.logger.warn(`workflow-worker-thread: refused child dispose failed: ${renderThrown(error)}`)\n      }\n      return\n    }\n\n    const record: ChildRecord = { run }\n    this.children.set(callId, record)\n    // Attach result forwarding before publishing the child handle. Because the\n    // callback itself runs in a later microtask, ChildStarted is still posted\n    // first even for an already-settled scripted provider.\n    const forwardResult = run.result.then<() => void, () => void>(\n      (result) => {\n        try {\n          const snapshot = snapshotJsonValue<ChildResult>({\n            output: result.output,\n            ...result.structured !== undefined ? { structured: result.structured } : {},\n            stopReason: result.stopReason,\n          })\n          if (snapshot === undefined) throw new TypeError('child result is not losslessly JSON-serializable')","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/host.ts#L362-L398","documentation":"Error \"workflow-worker-thread: refused child dispose failed: ${renderThrown(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/host.ts:380 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Manually terminate the leaked worker thread and fix the dispose path error before spawning more children."],"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"}