{"record":{"id":"d08d90f2b5136b84","repo":"deepseek-ai/deepseek-harness","slug":"client-half-must-return-a-plugin-a-function-or","errorCode":null,"errorMessage":"client half must `return` a plugin: a function, or an object with an `apply(ctx)` method","messagePattern":"client half must `return` a plugin: a function, or an object with an `apply\\(ctx\\)` method","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-client-runner/src/client/evaluator.ts","lineNumber":219,"sourceCode":"  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":201,"sourceCodeEnd":223,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-client-runner/src/client/evaluator.ts#L201-L223","documentation":"Error \"client half must `return` a plugin: a function, or an object with an `apply(ctx)` method\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:219 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"}