{"record":{"id":"5b91815d728fb927","repo":"deepseek-ai/deepseek-harness","slug":"cordis-define-needs-code-host-code-client-or","errorCode":null,"errorMessage":"cordis_define needs `code.host`, `code.client`, or both","messagePattern":"cordis_define needs `code\\.host`, `code\\.client`, or both","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/index.ts","lineNumber":157,"sourceCode":"  constructor(ctx: Context, config: Config) {\n    super(ctx, 'dynamicCordisRunner')\n    this.rootCtx = ctx\n    this.resolved = config as ResolvedConfig\n    this.inspectRegistry = new CordisInspectRegistryService(ctx)\n  }\n\n  /**\n   * Define a new Plugin's first Package or append a Package to an existing Plugin.\n   * @param request - Session ownership, Plugin selection, metadata, and source code.\n   * @returns Host-minted Plugin and Package identities with declared-half metadata.\n   */\n  define(request: DynamicCordisDefineRequest): DynamicCordisDefineReceipt {\n    const name = request.name.trim()\n    const purpose = request.purpose.trim()\n    if (name.length === 0) throw new Error('cordis_define needs a non-empty `name`')\n    if (purpose.length === 0) throw new Error('cordis_define needs a non-empty `purpose`')\n    if (request.code.host === undefined && request.code.client === undefined) {\n      throw new Error('cordis_define needs `code.host`, `code.client`, or both')\n    }\n    if (request.code.host !== undefined) precheckCode(request.code.host, 'code.host')\n    if (request.code.client !== undefined) precheckCode(request.code.client, 'code.client')\n\n    let plugin: DynamicCordisPlugin\n    if (request.plugin.kind === 'new') {\n      const prefix = request.plugin.idPrefix.trim()\n      if (!/^[a-z]{3,6}$/.test(prefix)) {\n        throw new Error('cordis_define `plugin.idPrefix` must contain 3–6 lowercase English letters')\n      }\n      const pluginId = CordisDynamicPluginId(this.registry.mintPluginId(prefix))\n      plugin = {\n        pluginId,\n        sessionId: request.sessionId,\n        packages: new Map(),\n        approvedClientPackages: new Set(),\n        clientVersionUpdatesApproved: false,\n      }","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/index.ts#L139-L175","documentation":"Error \"cordis_define needs `code.host`, `code.client`, or both\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/index.ts:157 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"}