{"record":{"id":"d329408cf319beac","repo":"deepseek-ai/deepseek-harness","slug":"child-result-is-not-losslessly-json-serializable","errorCode":null,"errorMessage":"child result is not losslessly JSON-serializable","messagePattern":"child result is not losslessly JSON-serializable","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/host.ts","lineNumber":398,"sourceCode":"        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')\n          return () => { this.post(HostToWorkerType.ChildSettled, { callId, result: snapshot }) }\n        } catch (error: unknown) {\n          const rendered = `workflow child result could not cross the worker boundary: ${renderThrown(error)}`\n          return () => { this.post(HostToWorkerType.ChildFailed, { callId, rendered }) }\n        }\n      },\n      (error: unknown) => {\n        const rendered = renderThrown(error)\n        return () => { this.post(HostToWorkerType.ChildFailed, { callId, rendered }) }\n      },\n    )\n    this.post(HostToWorkerType.ChildStarted, { callId, childId: run.id })\n    void forwardResult.then((forward) => { forward() })\n  }\n\n  private onChildDispose(callId: number): void {\n    const record = this.children.get(callId)\n    if (record === undefined) {","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/host.ts#L380-L416","documentation":"Error \"child result is not losslessly JSON-serializable\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/host.ts:398 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Have the child workflow return only losslessly JSON-serializable data (plain objects, arrays, strings, finite numbers, booleans, null)."],"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"}