slopus/happy · warning

[ClaudeLocal] Sandbox is not supported on Windows; continuin

Error message

[ClaudeLocal] Sandbox is not supported on Windows; continuing without sandbox.

What it means

In claudeLocal, when the user requested sandbox (sandboxConfig.enabled) on Windows, happy logs that sandboxing is unsupported and proceeds to spawn Claude without sandbox initialization. The session runs unsandboxed rather than failing.

Source

Thrown at packages/happy-cli/src/claude/claudeLocal.ts:280

                ...opts.claudeEnvVars
            }

            if (opts.mcpServers && Object.keys(opts.mcpServers).length > 0) {
                ensureLocalProxyBypass(env);
            }

            logger.debug(`[ClaudeLocal] Spawning launcher: ${claudeCliPath}`);
            logger.debug(`[ClaudeLocal] Args: ${JSON.stringify(args)}`);

            (async () => {
                let cleanupSandbox: (() => Promise<void>) | null = null;
                let spawnCommand: string | null = null;
                let spawnArgs: string[] = [claudeCliPath, ...args];
                let spawnWithShell = false;

                if (opts.sandboxConfig?.enabled) {
                    if (process.platform === 'win32') {
                        logger.warn('[ClaudeLocal] Sandbox is not supported on Windows; continuing without sandbox.');
                    } else {
                        try {
                            cleanupSandbox = await initializeSandbox(opts.sandboxConfig, opts.path);

                            if (!spawnArgs.includes('--dangerously-skip-permissions')) {
                                spawnArgs = [...spawnArgs, '--dangerously-skip-permissions'];
                            }

                            const fullCommand = [
                                'node',
                                ...spawnArgs.map((arg) => quoteShellArg(arg)),
                            ].join(' ');

                            spawnCommand = await wrapCommand(fullCommand);
                            spawnWithShell = true;

                            logger.info(
                                `[ClaudeLocal] Sandbox enabled: workspace=${opts.sandboxConfig.workspaceRoot ?? opts.path}, network=${opts.sandboxConfig.networkMode}`,

View on GitHub (pinned to b824cd0a46)

Solutions

  1. Run happy inside WSL2, where the Unix sandbox path is used.
  2. Disable sandbox in settings (set sandboxConfig.enabled=false) to silence the warning and make the behavior explicit.
  3. If sandbox isolation is a hard requirement, move the workflow to a supported platform (macOS/Linux).

Example fix

// before (~/.happy/settings.json)
{ "sandboxConfig": { "enabled": true } }
// after (on Windows)
{ "sandboxConfig": { "enabled": false } }
Defensive patterns

Strategy: validation

Validate before calling

if (process.platform === 'win32' && settings.sandboxConfig?.enabled) {
  console.warn('Sandbox requested on Windows: not supported. Run under WSL2 or disable sandboxConfig.enabled.');
}

Prevention

When it happens

Trigger: Launching happy claude with a sandbox config where enabled=true while process.platform === 'win32' (native Windows, not WSL).

Common situations: Settings synced from a macOS/Linux machine to a Windows laptop, or users enabling sandbox globally in ~/.happy settings and then running on Windows.

Related errors


AI-assisted analysis of slopus/happy@b824cd0a46 (2026-08-31). Data as JSON: /api/errors/b1b759138269f5ff. Report an issue: GitHub.