n8n-io/n8n · error

Instance AI runtime workspace has no sandbox.

Error message

Instance AI runtime workspace has no sandbox.

What it means

LazyRuntimeWorkspace.getSandbox resolved the runtime workspace, but it carries no sandbox component — the backing provider did not supply a command-execution sandbox. Every sandbox operation (executeCommand, package install, file writes via shell) is unavailable in this state.

Solutions

  1. Use the workspace filesystem API for file operations instead
  2. Configure the runtime workspace with a sandbox-capable provider
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/instance-ai/src/workspace/lazy-runtime-workspace.ts:153 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/054b7c6799ef1601. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/instance-ai/src/workspace/lazy-runtime-workspace.ts:153

			await this.workspaceDestroyPromise;
		} finally {
			this.workspaceDestroyPromise = undefined;
		}
	}

	async getFilesystem(): Promise<WorkspaceFilesystem> {
		const filesystem = (await this.getWorkspace()).filesystem;
		if (!filesystem) {
			throw new Error('Instance AI runtime workspace has no filesystem.');
		}

		return filesystem;
	}

	async getSandbox(): Promise<WorkspaceSandbox> {
		const sandbox = (await this.getWorkspace()).sandbox;
		if (!sandbox) {
			throw new Error('Instance AI runtime workspace has no sandbox.');
		}

		return sandbox;
	}

	private setResolvedWorkspace(workspace: Workspace | undefined): void {
		this.resolvedWorkspace = workspace;
		if (!workspace) return;

		for (const listener of this.resolvedListeners) {
			listener(workspace);
		}
	}

	private notifyDestroyed(): void {
		for (const listener of this.destroyedListeners) {
			listener();
		}

View on GitHub (pinned to 5ac6606e81)