n8n-io/n8n · error
Path escapes builder workspace root: ${path}
Error message
Path escapes builder workspace root: ${path} What it means
Error "Path escapes builder workspace root: ${path}" thrown in n8n-io/n8n.
Source
Thrown at packages/@n8n/instance-ai/src/workspace/scoped-workspace.ts:32
type WorkspaceFilesystem,
type WorkspaceSandbox,
type WriteOptions,
} from '@n8n/agents';
import { join as posixJoin, normalize as posixNormalize } from 'node:path/posix';
function isInsideRoot(path: string, root: string): boolean {
const boundary = root.endsWith('/') ? root : `${root}/`;
return path === root || path.startsWith(boundary);
}
function resolvePath(root: string, path: string): string {
const normalizedRoot = posixNormalize(root);
const normalizedPath = path.startsWith('/')
? posixNormalize(path)
: posixNormalize(posixJoin(normalizedRoot, path));
if (!isInsideRoot(normalizedPath, normalizedRoot)) {
throw new Error(`Path escapes builder workspace root: ${path}`);
}
return normalizedPath;
}
class ScopedFilesystem implements WorkspaceFilesystem {
constructor(
private readonly filesystem: WorkspaceFilesystem,
private readonly root: string,
) {}
get id() {
return `${this.filesystem.id}:scoped`;
}
get name() {
return `${this.filesystem.name} (builder scoped)`;
}View on GitHub (pinned to 5ac6606e81)
When it happens
Trigger: Thrown at packages/@n8n/instance-ai/src/workspace/scoped-workspace.ts:32 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/0b7fcf102cd0c840.
Report an issue: GitHub.