{"record":{"id":"2fb38eae085e1295","repo":"earendil-works/pi","slug":"failed-to-resolve-description-from-environment","errorCode":null,"errorMessage":"Failed to resolve ${description} from environment variable: ${missingEnvVars[0]}","messagePattern":"Failed to resolve (.+?) from environment variable: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/core/resolve-config-value.ts","lineNumber":243,"sourceCode":"\t}\n\treturn resolveTemplate(reference.parts, env);\n}\n\nexport function resolveConfigValueOrThrow(config: string, description: string, env?: Record<string, string>): string {\n\tconst resolvedValue = resolveConfigValueUncached(config, env);\n\tif (resolvedValue !== undefined) {\n\t\treturn resolvedValue;\n\t}\n\n\tconst reference = parseConfigValueReference(config);\n\tif (reference.type === \"command\") {\n\t\tthrow new Error(`Failed to resolve ${description} from shell command: ${reference.config.slice(1)}`);\n\t}\n\n\tif (reference.type === \"template\") {\n\t\tconst missingEnvVars = getMissingConfigValueEnvVarNames(config, env);\n\t\tif (missingEnvVars.length === 1) {\n\t\t\tthrow new Error(`Failed to resolve ${description} from environment variable: ${missingEnvVars[0]}`);\n\t\t}\n\t\tif (missingEnvVars.length > 1) {\n\t\t\tthrow new Error(`Failed to resolve ${description} from environment variables: ${missingEnvVars.join(\", \")}`);\n\t\t}\n\t}\n\n\tthrow new Error(`Failed to resolve ${description}`);\n}\n\n/**\n * Resolve all header values using the same resolution logic as API keys.\n */\nexport function resolveHeaders(\n\theaders: Record<string, string> | undefined,\n\tenv?: Record<string, string>,\n): Record<string, string> | undefined {\n\tif (!headers) return undefined;\n\tconst resolved: Record<string, string> = {};","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/core/resolve-config-value.ts#L225-L261","documentation":"Error \"Failed to resolve ${description} from environment variable: ${missingEnvVars[0]}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/core/resolve-config-value.ts:243 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":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}