{"record":{"id":"ad139a5154f47973","repo":"earendil-works/pi","slug":"managed-install-marker-is-missing-or-invalid-ma","errorCode":null,"errorMessage":"Managed install marker is missing or invalid: ${markerPath}","messagePattern":"Managed install marker is missing or invalid: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/package-manager-cli.ts","lineNumber":75,"sourceCode":"\n\tconst managedRoot = resolve(configuredRoot);\n\tconst releasesDir = canonicalizePath(join(managedRoot, \"releases\"));\n\t// The launcher environment is inherited by child processes. Do not classify a\n\t// source checkout or another Pi installation launched from managed Pi as managed.\n\tif (getCwdRelativePath(canonicalizePath(getPackageDir()), releasesDir) === undefined) return undefined;\n\n\tconst markerPath = join(managedRoot, MANAGED_INSTALL_MARKER);\n\ttry {\n\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\",","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/coding-agent/src/package-manager-cli.ts#L57-L93","documentation":"Error \"Managed install marker is missing or invalid: ${markerPath}\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/coding-agent/src/package-manager-cli.ts:75 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"}