You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Windows] AI killing node.exe process terminates OpenCode itself #7950
On Windows, when the AI agent uses taskkill /F /IM node.exe to terminate a Node.js process (e.g., to restart a dev server), it inadvertently kills OpenCode itself because OpenCode also runs on Node.js.
This is a critical issue for Windows users because:
The AI frequently needs to manage dev servers (start/stop/restart)
Using taskkill /IM node.exe is a common pattern for process management on Windows
There's no built-in safeguard to prevent the AI from terminating its own parent process
OpenCode version
Latest (as of 2026-01-12)
Steps to reproduce
Start opencode on Windows
Ask AI to start a Node.js dev server (e.g., npm run dev)
The server runs in a separate terminal/process
Ask AI to restart the server or kill the Node process
AI executes taskkill /F /IM node.exe
OpenCode terminates unexpectedly along with the target process
Expected behavior
OpenCode should either:
Prevent the AI from executing commands that would terminate its own process
Use process-specific termination (by PID) rather than image name
Warn the AI/user before executing potentially self-destructive commands
Workaround
Use PID-specific termination instead of image name:
taskkill /F /PID <specific_pid>
Or use psmux/tmux alternatives for session management where processes can be managed independently.
Activity
thdxr commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.