{"record":{"id":"d030b5bd330e6488","repo":"earendil-works/pi","slug":"could-not-download-managed-installer-label-from","errorCode":null,"errorMessage":"Could not download managed installer ${label} from ${url}: HTTP ${response.status}","messagePattern":"Could not download managed installer (.+?) from (.+?): HTTP (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/package-manager-cli.ts","lineNumber":84,"sourceCode":"\t\tconst marker = JSON.parse(readFileSync(markerPath, \"utf8\")) as {\n\t\t\tkind?: unknown;\n\t\t\tlayout?: unknown;\n\t\t\tschemaVersion?: unknown;\n\t\t};\n\t\tif (marker.kind !== \"pi-managed-install\" || marker.schemaVersion !== 1 || marker.layout !== \"releases-v1\") {\n\t\t\tthrow new Error();\n\t\t}\n\t} catch {\n\t\tthrow new Error(`Managed install marker is missing or invalid: ${markerPath}`);\n\t}\n\n\treturn managedRoot;\n}\n\nasync function fetchInstallerArtifact(url: string, label: string): Promise<string> {\n\tconst response = await fetch(url, { headers: { \"User-Agent\": getPiUserAgent(VERSION) } });\n\tif (!response.ok) {\n\t\tthrow new Error(`Could not download managed installer ${label} from ${url}: HTTP ${response.status}`);\n\t}\n\treturn await response.text();\n}\n\nasync function runManagedNpmCi(stageDir: string): Promise<void> {\n\tconst args = [\n\t\t\"ci\",\n\t\t\"--ignore-scripts\",\n\t\t\"--min-release-age=0\",\n\t\t\"--omit=dev\",\n\t\t\"--include=optional\",\n\t\t\"--no-fund\",\n\t\t\"--no-audit\",\n\t\t\"--loglevel=error\",\n\t\t\"--progress=false\",\n\t];\n\tconst code = await waitForChildProcess(spawnProcess(\"npm\", args, { cwd: stageDir, stdio: \"inherit\" }));\n\tif (code !== 0) throw new Error(`npm ${args.join(\" \")} exited with code ${code ?? \"unknown\"}`);","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/package-manager-cli.ts#L66-L102","documentation":"Error \"Could not download managed installer ${label} from ${url}: HTTP ${response.status}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/package-manager-cli.ts:84 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"}