#11944·Cline

Plugin sandbox fails to initialize in VS Code extension 4.0.0 — plugin-sandbox-bootstrap.js not bundled

Author: zk-0808Created Jun 28, 2026Updated Sep 28, 2026
LabelsVS Code

Cline Surface

VSCode Extension

Cline Version

4.0.0

Beta version

  • I am using a beta version of Cline

What happened?

Plugins installed via the global plugin store (~/.cline/plugins/) appear as "Installed" in the Customize UI, but their setup() never executes in the VS Code extension. The plugin sandbox subprocess fails to start because plugin-sandbox-bootstrap.js is not included in the extension's build output.

CLI 3.0.31 works correctly with the exact same plugin.

Facts

Fact 1: The extension's dist/ directory contains only extension.js (22.5MB). No standalone plugin-sandbox-bootstrap.js file exists.

> find saoudrizwan.claude-dev-4.0.0 -name "plugin-sandbox*"
(no results)

> ls saoudrizwan.claude-dev-4.0.0/dist/
extension.js

Fact 2: The bootstrap file exists in the CLI distribution:

> ls node_modules/@cline/core/dist/extensions/plugin-sandbox-bootstrap.js
14KB

Fact 3: The plugin code is correct — CLI 3.0.31 executes setup() successfully:

> type %USERPROFILE%\.cline\data\handoff\plugin-loaded.marker
loaded at 2026-06-28T02:22:57.451Z

Fact 4: resolveBootstrap() defines 5 candidate paths. All fail when the file doesn't exist in the extension directory. (SDK source)

Fact 5: After manually copying plugin-sandbox-bootstrap.js + dependencies to the extension directory, setup() executes successfully — confirming the plugin code is not the issue.

Root Cause

  1. loadSandboxedPlugins() → resolveBootstrap() → 5 candidate paths → all fail (file not in dist/)
  2. Fallback: node -e "<jiti script>" → jiti is inlined by esbuild, unavailable to child process → fallback fails
  3. Subprocess cannot start → timeout → setup() never executes
  4. UI shows "Installed" because discoverPluginModulePaths() succeeds (file discovery), but loadSandboxedPlugins() fails silently (sandbox activation)

Suggested Fix

Include plugin-sandbox-bootstrap.js (and its runtime dependencies) in the extension's esbuild output or as a separate file in dist/.

Related: cline/cline#11065 (same subsystem — plugin sandbox timeout on Windows)


### Steps to reproduce
  1. Install VS Code extension saoudrizwan.claude-dev 4.0.0

  2. Create a minimal plugin with setup() that writes a marker file:

    export const plugin = {
    name: "test-plugin",
    manifest: { capabilities: ["messageBuilders"] },
    setup(api) {
    require("fs").writeFileSync(
    require("path").join(require("os").homedir(), ".cline", "data", "handoff", "marker.txt"),
    "setup called at " + new Date().toISOString()
    );
    api.registerMessageBuilder({
    name: "test",
    build(messages) { return messages; }
    });
    }
    };

  3. Install the plugin: cline plugin install --cwd .

  4. Confirm it appears in Customize UI as "Installed"

  5. Check for marker file:
    type %USERPROFILE%.cline\data\handoff\marker.txt
    → File not found (setup() never executed)

  6. Compare with CLI:
    cline "hello"
    → Marker file exists (setup() executed successfully)




### Provider/Model

N/A — this is a plugin sandbox infrastructure issue, not model-dependent. 

### IDE / CLI Diagnostics

VS Code Extension:
Extension: saoudrizwan.claude-dev 4.0.0
VS Code: (user's version)
dist/ contents: extension.js only (22.5MB)

CLI (working comparison):
cline 3.0.31
@cline/core/dist/extensions/plugin-sandbox-bootstrap.js: present (14KB)


### System Information

_No response_