earendil-works/pi · error
Refusing to use path outside package install root: ${resolve
Error message
Refusing to use path outside package install root: ${resolvedPath} What it means
Error "Refusing to use path outside package install root: ${resolvedPath}" thrown in earendil-works/pi.
Source
Thrown at packages/coding-agent/src/core/package-manager.ts:2129
return join(this.cwd, CONFIG_DIR_NAME, "git");
}
return join(this.agentDir, "git");
}
private getTemporaryDir(prefix: string, suffix?: string): string {
const root = this.resolveManagedPath(getExtensionTempFolder(this.agentDir), prefix);
const hash = createHash("sha256")
.update(`${prefix}-${suffix ?? ""}`)
.digest("hex")
.slice(0, 8);
return this.resolveManagedPath(root, hash, suffix ?? "");
}
private resolveManagedPath(root: string, ...parts: string[]): string {
const resolvedRoot = resolve(root);
const resolvedPath = resolve(resolvedRoot, ...parts);
if (resolvedPath !== resolvedRoot && !resolvedPath.startsWith(`${resolvedRoot}${sep}`)) {
throw new Error(`Refusing to use path outside package install root: ${resolvedPath}`);
}
return resolvedPath;
}
private getBaseDirForScope(scope: SourceScope): string {
if (scope === "project") {
this.assertProjectTrustedForScope(scope);
return join(this.cwd, CONFIG_DIR_NAME);
}
if (scope === "user") {
return this.agentDir;
}
return this.cwd;
}
private resolvePath(input: string): string {
return resolvePath(input, this.cwd, { homeDir: getHomeDir(), trim: true });
}View on GitHub (pinned to 4af9d21d3b)
When it happens
Trigger: Thrown at packages/coding-agent/src/core/package-manager.ts:2129 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/496c3104623313e2.
Report an issue: GitHub.