deepseek-ai/deepseek-harness · error · Error
client half returned `undefined` — did you forget `return`?
Error message
client half returned `undefined` — did you forget `return`?
✓ return (ctx) => { … }
✓ return { name: '…', inject: ['slots'], apply(ctx) { … } } What it means
Error "client half returned `undefined` — did you forget `return`? ✓ return (ctx) => { … } ✓ return { name: '…', inject: ['slots'], apply(ctx) { … } }" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:213
* `null`, because the wire carries JSON and `undefined` is not JSON —
* requiring `host.call('m', {})` would be a ritual, and defaulting to `{}`
* would invent an empty argument the caller never wrote.
*/
call: (method: string, args: unknown = null): Promise<unknown> => env.invoke(method, args),
}
const returned = await closure(
React,
taggedConsole(pluginId, (message) => { env.noteError(message) }),
styles,
host,
harnessTrap(),
...Object.values(traps),
undefined, // process: undefined keeps `typeof process` probes safe
undefined, // Buffer
)
if (!isDynamicCordisPlugin(returned)) {
if (returned === undefined) {
throw new Error(
'client half returned `undefined` — did you forget `return`?\n'
+ ' ✓ return (ctx) => { … }\n'
+ ' ✓ return { name: \'…\', inject: [\'slots\'], apply(ctx) { … } }',
)
}
throw new Error('client half must `return` a plugin: a function, or an object with an `apply(ctx)` method')
}
return returned
}
View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:213 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/bca1c43989d3df0e.
Report an issue: GitHub.