deepseek-ai/deepseek-harness · error · Error
the Host half returned `undefined` — did you forget `return`
Error message
the Host half returned `undefined` — did you forget `return`?
What it means
Error "the Host half returned `undefined` — did you forget `return`?" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/extensions/cordis-host-runner/src/index.ts:901
private async startHost(
plugin: DynamicCordisPlugin,
hostCode: string,
run: DynamicCordisRun,
): Promise<CordisErrorDetails | undefined> {
const handle = (method: unknown, fn: unknown): (() => void) => {
const normalized = normalizeHandler(method, fn)
run.handlers.set(normalized.method, normalized.handler)
const dispose = (): void => {
if (run.handlers.get(normalized.method) === normalized.handler) run.handlers.delete(normalized.method)
}
run.handlerDisposers.push(dispose)
return dispose
}
try {
const sandbox = createSandbox(plugin.pluginId, { handle })
const evaluated = await evaluateHostCode(sandbox, hostCode, plugin.pluginId, this.resolved.vmTimeoutMs)
if (!isPlugin(evaluated)) {
throw new Error(evaluated === undefined
? 'the Host half returned `undefined` — did you forget `return`?'
: 'the Host half must return a Plugin function or an object with apply(ctx)')
}
run.fiber = await startHostHalf(
this.requireGroup(),
evaluated,
(error) => { this.steerGuardFailure(plugin, run, 'Host', errorDetails(error)) },
)
return undefined
} catch (error) {
for (const dispose of run.handlerDisposers.splice(0)) dispose()
return errorDetails(error)
}
}
private async settleActivation(
plugin: DynamicCordisPlugin | undefined,
resolution: DynamicCordisRunResolution,View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/extensions/cordis-host-runner/src/index.ts:901 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/1d593f9717e658a3.
Report an issue: GitHub.