deepseek-ai/deepseek-harness · error · TypeError
child result is not losslessly JSON-serializable
Error message
child result is not losslessly JSON-serializable
What it means
Error "child result is not losslessly JSON-serializable" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/workflow/workflow-worker-thread/src/host.ts:398
this.ctx.logger.warn(`workflow-worker-thread: refused child dispose failed: ${renderThrown(error)}`)
}
return
}
const record: ChildRecord = { run }
this.children.set(callId, record)
// Attach result forwarding before publishing the child handle. Because the
// callback itself runs in a later microtask, ChildStarted is still posted
// first even for an already-settled scripted provider.
const forwardResult = run.result.then<() => void, () => void>(
(result) => {
try {
const snapshot = snapshotJsonValue<ChildResult>({
output: result.output,
...result.structured !== undefined ? { structured: result.structured } : {},
stopReason: result.stopReason,
})
if (snapshot === undefined) throw new TypeError('child result is not losslessly JSON-serializable')
return () => { this.post(HostToWorkerType.ChildSettled, { callId, result: snapshot }) }
} catch (error: unknown) {
const rendered = `workflow child result could not cross the worker boundary: ${renderThrown(error)}`
return () => { this.post(HostToWorkerType.ChildFailed, { callId, rendered }) }
}
},
(error: unknown) => {
const rendered = renderThrown(error)
return () => { this.post(HostToWorkerType.ChildFailed, { callId, rendered }) }
},
)
this.post(HostToWorkerType.ChildStarted, { callId, childId: run.id })
void forwardResult.then((forward) => { forward() })
}
private onChildDispose(callId: number): void {
const record = this.children.get(callId)
if (record === undefined) {View on GitHub (pinned to b150a551b8)
Solutions
- Have the child workflow return only losslessly JSON-serializable data (plain objects, arrays, strings, finite numbers, booleans, null).
When it happens
Trigger: Thrown at packages/workflow/workflow-worker-thread/src/host.ts:398 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/d329408cf319beac.
Report an issue: GitHub.