{"record":{"id":"253ba902eb76c08d","repo":"deepseek-ai/deepseek-harness","slug":"dsh-tools-no-run-code-schema-flavor-registered-fo","errorCode":null,"errorMessage":"dsh-tools: no run_code schema flavor registered for runtime language ${JSON.stringify(runtime.language)} (known: ${known})","messagePattern":"dsh-tools: no run_code schema flavor registered for runtime language (.+?) \\(known: (.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/tools/src/code-mode.ts","lineNumber":129,"sourceCode":" * `SDK_RENDERERS` is the compiler's job ({@link CodeSdkLanguage}); what this\n * guard owns is the runtime-supplied language neither table knows, which never\n * yields a wrong-language schema for a real runtime.\n */\nfunction resolveFlavor(peekRuntime: () => CodeRuntime | undefined): RunCodeFlavor {\n  const runtime = peekRuntime()\n  if (runtime === undefined) {\n    // No runtime mounted: reached by definition readers and `schemas()`, of\n    // which the doc-catalog harvest is the only shipped one. None feeds a\n    // model — `wireSchemas` calls `requireCodeRuntime` before projecting, so\n    // the assembly path never arrives here. Degrade to the TS default.\n    return TYPESCRIPT_FLAVOR\n  }\n  // Own-property read: a language like `toString`/`constructor` would otherwise\n  // resolve an inherited Object.prototype member as a flavor.\n  const flavor = RUN_CODE_FLAVORS[runtime.language]\n  if (!Object.hasOwn(RUN_CODE_FLAVORS, runtime.language) || flavor === undefined) {\n    const known = Object.keys(RUN_CODE_FLAVORS).map(name => JSON.stringify(name)).join(', ')\n    throw new Error(`dsh-tools: no run_code schema flavor registered for runtime language ${JSON.stringify(runtime.language)} (known: ${known})`)\n  }\n  return flavor\n}\n\n/**\n * Thrown by `run_code` when the program run itself failed — a program\n * exception, a budget expiry, an abort, or substrate death. Extends\n * {@link HarnessError} (`code: 'CODE_RUN_FAILED'`); the registry's execution\n * pipeline converts it into a structured `isError` result whose text carries\n * the failure kind plus the captured logs, so the model can self-correct.\n */\nexport class CodeRunFailedError extends HarnessError {\n  constructor(message: string) {\n    super(message, 'CODE_RUN_FAILED')\n    this.name = 'CodeRunFailedError'\n  }\n}\n","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/tools/src/code-mode.ts#L111-L147","documentation":"Error \"dsh-tools: no run_code schema flavor registered for runtime language ${JSON.stringify(runtime.language)} (known: ${known})\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/tools/src/code-mode.ts:129 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"}