{"record":{"id":"221432a64e1ee357","repo":"deepseek-ai/deepseek-harness","slug":"unknown-prompt-variable-name-in-kind","errorCode":null,"errorMessage":"unknown prompt variable \"{{${name}}}\" in ${kind} \"${input.name}\"; registered variables: ${known.length > 0 ? known.join(', ') : '(none)'}","messagePattern":"unknown prompt variable \"(.+?)\\}\" in (.+?) \"(.+?)\"; registered variables: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/system-prompt/src/index.ts","lineNumber":285,"sourceCode":"    const group = GROUP_AT.exec(text.slice(open))\n    if (group === null) {\n      // A later closing brace makes this malformed; otherwise it is literal prose.\n      if (text.indexOf('}}', open + 2) >= 0) {\n        throw new Error(`malformed prompt variable reference at \"${text.slice(open, open + 16)}…\" in ${kind} \"${input.name}\" (references are complete simple {{name}} groups)`)\n      }\n      result += text.slice(last, open + 2)\n      last = open + 2\n      continue\n    }\n    // `{{}}` yields an empty name and follows the malformed-reference path.\n    const name = group[0].slice(2, -2)\n    if (!VARIABLE_NAME.test(name)) {\n      throw new Error(`malformed prompt variable reference \"{{${name}}}\" in ${kind} \"${input.name}\" (variable names match ${String(VARIABLE_NAME)})`)\n    }\n    // Do not resolve unregistered names through Object.prototype.\n    if (!Object.hasOwn(variables, name)) {\n      const known = Object.keys(variables)\n      throw new Error(`unknown prompt variable \"{{${name}}}\" in ${kind} \"${input.name}\"; registered variables: ${known.length > 0 ? known.join(', ') : '(none)'}`)\n    }\n    const value = variables[name]\n    if (value === undefined) {\n      throw new Error(`prompt variable \"{{${name}}}\" has no value for this assembly (${kind} \"${input.name}\")`)\n    }\n    result += text.slice(last, open) + value\n    last = open + group[0].length\n  }\n  return result + text.slice(last)\n}\n\n/** One tool-schema provider stored in a prompt layer. */\ntype ToolProvider = (context: AssembleContext) => ToolProviderResult\n\n/** One prompt-variable provider stored in a prompt layer. */\ntype VariableProvider = (context: AssembleContext) => string | undefined\n\n/** All prompt registrations owned by one global or scoped layer. */","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/system-prompt/src/index.ts#L267-L303","documentation":"Error \"unknown prompt variable \"{{${name}}}\" in ${kind} \"${input.name}\"; registered variables: ${known.length > 0 ? known.join(', ') : '(none)'}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/system-prompt/src/index.ts:285 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"}