mount all of ~/.local in sandbox for claude binary resolution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 07:43:27 +00:00
co-authored by Claude Opus 4.6
parent 8377da8a77
commit 11d95a25ab
+4 -5
View File
@@ -78,11 +78,10 @@ export function buildSandboxPrefix(email: string): string[] {
// Bun runtime (e.g. /home/pastilhas/.bun) // Bun runtime (e.g. /home/pastilhas/.bun)
args.push('--ro-bind', BUN_DIR, BUN_DIR); args.push('--ro-bind', BUN_DIR, BUN_DIR);
// npm global packages (~/.local/lib) — pi and its dependencies // User-local installs (~/.local) — claude binary, pi npm packages, etc.
const localLib = join(homeDir, '.local', 'lib'); const localDir = join(homeDir, '.local');
if (existsSync(localLib)) { if (existsSync(localDir)) {
args.push('--perms', '0755', '--dir', join(homeDir, '.local')); args.push('--ro-bind', localDir, localDir);
args.push('--ro-bind', localLib, localLib);
} }
// Project source (for MCP server) // Project source (for MCP server)