deepseek-ai/deepseek-harness · error · Error

client half must `return` a plugin: a function, or an object

Error message

client half must `return` a plugin: a function, or an object with an `apply(ctx)` method

What it means

Error "client half must `return` a plugin: a function, or an object with an `apply(ctx)` method" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/extensions/cordis-client-runner/src/client/evaluator.ts:219

  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:219 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/d08d90f2b5136b84. Report an issue: GitHub.