Plugin sandbox fails to initialize in VS Code extension 4.0.0 — plugin-sandbox-bootstrap.js not bundled
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.jsFact 2: The bootstrap file exists in the CLI distribution:
> ls node_modules/@cline/core/dist/extensions/plugin-sandbox-bootstrap.js
14KBFact 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.451ZFact 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
loadSandboxedPlugins()→resolveBootstrap()→ 5 candidate paths → all fail (file not indist/)- Fallback:
node -e "<jiti script>"→ jiti is inlined by esbuild, unavailable to child process → fallback fails - Subprocess cannot start → timeout →
setup()never executes - UI shows "Installed" because
discoverPluginModulePaths()succeeds (file discovery), butloadSandboxedPlugins()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 reproduceInstall VS Code extension saoudrizwan.claude-dev 4.0.0
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; }
});
}
};Install the plugin: cline plugin install --cwd .
Confirm it appears in Customize UI as "Installed"
Check for marker file:
type %USERPROFILE%.cline\data\handoff\marker.txt
→ File not found (setup() never executed)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 DiagnosticsVS 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_Source: cline/cline