Environment
- OS: Windows 11
- Terminal: Windows Terminal
- Claude Code version: 2.1.31
- Plugin version: mind@memvid 1.0.11
- Node.js: v22.13.1
Description
The mind@memvid plugin causes Claude Code to completely freeze on Windows. The terminal becomes unresponsive - no keyboard input is accepted, and the UI appears stuck.
Root Cause
The issue is in smart-install.js hook which runs on SessionStart. The hook uses execSync to run npm install:
execSync("npm install --production --no-fund --no-audit", {
cwd: pluginRoot,
stdio: "pipe",
timeout: 120000 // 2 minute timeout
});
On Windows, execSync with stdio: "pipe" appears to interfere with the parent process's stdin handling, causing the terminal to become completely unresponsive even though:
- The hook itself completes successfully
- The hook returns { continue: true } correctly
- Debug logs show no errors
Steps to Reproduce
- Install mind@memvid plugin on Windows
- Launch Claude Code in Windows Terminal
- Terminal freezes - cannot type anything
Workaround
Add "disableAllHooks": true to ~/.claude/settings.json or disable the plugin:
{
"enabledPlugins": {
"mind@memvid": false
}
}
Suggested Fix
Consider one of these approaches:
- Use spawn with async handling instead of execSync:
import { spawn } from 'child_process';
function installDepsAsync() {
return new Promise((resolve) => {
const child = spawn('npm', ['install', '--production', '--no-fund', '--no-audit'], {
cwd: pluginRoot,
stdio: 'ignore', // Completely detach stdio
shell: true,
windowsHide: true // Hide console window on Windows
});
child.on('close', () => resolve(true));
child.on('error', () => resolve(false));
});
}
- Make the hook async - return early and install in background
- Skip install check if marker exists - currently it runs npm install synchronously even on first check
- Use stdio: 'ignore' instead of stdio: 'pipe' to fully detach from terminal
Debug Log (relevant section)
[DEBUG] Matched 2 unique hooks for query "startup"
[DEBUG] Hooks: Checking initial response for async: {"continue":true}
[DEBUG] Hooks: Parsed initial response: {"continue":true}
[DEBUG] Hook SessionStart:startup (SessionStart) success: {"continue":true}
[DEBUG] [REPL:mount] REPL mounted, disabled=false
The logs show everything completes successfully, but the terminal is frozen at this point.
Environment
Description
The mind@memvid plugin causes Claude Code to completely freeze on Windows. The terminal becomes unresponsive - no keyboard input is accepted, and the UI appears stuck.
Root Cause
The issue is in smart-install.js hook which runs on SessionStart. The hook uses execSync to run npm install:
execSync("npm install --production --no-fund --no-audit", {
cwd: pluginRoot,
stdio: "pipe",
timeout: 120000 // 2 minute timeout
});
On Windows, execSync with stdio: "pipe" appears to interfere with the parent process's stdin handling, causing the terminal to become completely unresponsive even though:
Steps to Reproduce
Workaround
Add "disableAllHooks": true to ~/.claude/settings.json or disable the plugin:
{
"enabledPlugins": {
"mind@memvid": false
}
}
Suggested Fix
Consider one of these approaches:
import { spawn } from 'child_process';
function installDepsAsync() {
return new Promise((resolve) => {
const child = spawn('npm', ['install', '--production', '--no-fund', '--no-audit'], {
cwd: pluginRoot,
stdio: 'ignore', // Completely detach stdio
shell: true,
windowsHide: true // Hide console window on Windows
});
child.on('close', () => resolve(true));
child.on('error', () => resolve(false));
});
}
Debug Log (relevant section)
[DEBUG] Matched 2 unique hooks for query "startup"
[DEBUG] Hooks: Checking initial response for async: {"continue":true}
[DEBUG] Hooks: Parsed initial response: {"continue":true}
[DEBUG] Hook SessionStart:startup (SessionStart) success: {"continue":true}
[DEBUG] [REPL:mount] REPL mounted, disabled=false
The logs show everything completes successfully, but the terminal is frozen at this point.