{"record":{"id":"bca1c43989d3df0e","repo":"deepseek-ai/deepseek-harness","slug":"client-half-returned-undefined-did-you-forget","errorCode":null,"errorMessage":"client half returned `undefined` — did you forget `return`?\n  ✓ return (ctx) => { … }\n  ✓ return { name: '…', inject: ['slots'], apply(ctx) { … } }","messagePattern":"client half returned `undefined` — did you forget `return`\\?\n  ✓ return \\(ctx\\) => (.+?)\n  ✓ return (.+?) \\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-client-runner/src/client/evaluator.ts","lineNumber":213,"sourceCode":"     * `null`, because the wire carries JSON and `undefined` is not JSON —\n     * requiring `host.call('m', {})` would be a ritual, and defaulting to `{}`\n     * would invent an empty argument the caller never wrote.\n     */\n    call: (method: string, args: unknown = null): Promise<unknown> => env.invoke(method, args),\n  }\n  const returned = await closure(\n    React,\n    taggedConsole(pluginId, (message) => { env.noteError(message) }),\n    styles,\n    host,\n    harnessTrap(),\n    ...Object.values(traps),\n    undefined, // process: undefined keeps `typeof process` probes safe\n    undefined, // Buffer\n  )\n  if (!isDynamicCordisPlugin(returned)) {\n    if (returned === undefined) {\n      throw new Error(\n        'client half returned `undefined` — did you forget `return`?\\n'\n        + '  ✓ return (ctx) => { … }\\n'\n        + '  ✓ return { name: \\'…\\', inject: [\\'slots\\'], apply(ctx) { … } }',\n      )\n    }\n    throw new Error('client half must `return` a plugin: a function, or an object with an `apply(ctx)` method')\n  }\n  return returned\n}\n","sourceCodeStart":195,"sourceCodeEnd":223,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-client-runner/src/client/evaluator.ts#L195-L223","documentation":"Error \"client half returned `undefined` — did you forget `return`?\n  ✓ return (ctx) => { … }\n  ✓ return { name: '…', inject: ['slots'], apply(ctx) { … } }\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}