{"record":{"id":"6ef2c68a20064e93","repo":"deepseek-ai/deepseek-harness","slug":"prompt-variable-name-has-no-value-for-thi","errorCode":null,"errorMessage":"prompt variable \"{{${name}}}\" has no value for this assembly (${kind} \"${input.name}\")","messagePattern":"prompt variable \"(.+?)\\}\" has no value for this assembly \\((.+?) \"(.+?)\"\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/system-prompt/src/index.ts","lineNumber":289,"sourceCode":"        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. */\nclass PromptLayer implements ScopeLayer {\n  readonly sections: NamedEntries<PromptSection>\n  readonly contexts: NamedEntries<PromptContext>\n  readonly runtimeContextSuppressors = new AnonymousEntries<true>()","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/system-prompt/src/index.ts#L271-L307","documentation":"Error \"prompt variable \"{{${name}}}\" has no value for this assembly (${kind} \"${input.name}\")\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/system-prompt/src/index.ts:289 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"}