deepseek-ai/deepseek-harness · error · WorkflowError
RESULT_UNSERIALIZABLE
RESULT_UNSERIALIZABLE
Error message
the workflow's return value is not plain JSON data — ${error.message}. Return only JSON-serializable objects/arrays/scalars. What it means
Error "the workflow's return value is not plain JSON data — ${error.message}. Return only JSON-serializable objects/arrays/scalars." thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/workflow/workflow-worker-thread/src/runtime.ts:214
promise.catch(() => { /* consumed: see method contract — a dropped hook promise must not surface an unhandled rejection */ })
return promise
}
private cancelledError(): WorkflowError {
// cancel() arms cancelError before any caller can observe isCancelled()
// === true; the fallback guards the type, not a reachable path.
/* v8 ignore next */
return this.cancelError ?? new WorkflowError('workflow run cancelled', 'CANCELLED')
}
/** Materialize the script's return value; violations become RESULT_UNSERIALIZABLE. */
private materializeResult(raw: unknown): unknown {
try {
return materializeFromRealm(raw, 'workflow result')
} catch (error: unknown) {
/* v8 ignore next -- defensive rethrow arm: materializeFromRealm only throws MaterializeError */
if (!(error instanceof MaterializeError)) throw error
throw new WorkflowError(
`the workflow's return value is not plain JSON data — ${error.message}. Return only JSON-serializable objects/arrays/scalars.`,
'RESULT_UNSERIALIZABLE',
{ cause: error },
)
}
}
/**
* Acquire one concurrency slot (FIFO). Cancellation rejects QUEUED waiters
* (see {@link cancel}); the callers guard their own entry and post-acquire
* windows, so no cancelled-precheck is duplicated here.
*/
private acquireSlot(): Promise<void> {
if (this.activeSlots < this.limits.maxConcurrentAgents) {
this.activeSlots += 1
return Promise.resolve()
}
return new Promise<void>((resolve, reject) => {View on GitHub (pinned to b150a551b8)
Solutions
- Return only JSON-serializable objects, arrays, and scalars from the workflow; apply the inner error's guidance for the offending value.
When it happens
Trigger: Thrown at packages/workflow/workflow-worker-thread/src/runtime.ts:214 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/a79ce1db543cf3de.
Report an issue: GitHub.