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
Opencode process doesn't terminate after exiting Neovim #237
After starting the plugin and then exiting Neovim, the opencode process continues to run in the background instead of terminating properly.
Steps to Reproduce
Open Neovim
Start opencode.nvim (e.g., press <leader>og or run :Opencode)
Use the plugin normally (optional)
Exit Neovim (:q or :qa)
Check running processes (e.g., ps aux | grep opencode)
Expected Behavior
The opencode process should be terminated when Neovim exits.
Actual Behavior
The opencode process remains running in the background after Neovim has been closed.
Environment
Neovim version: (please fill in)
opencode.nvim version: (latest/main)
Opencode CLI version: (please fill in, run opencode --version)
OS: (please fill in)
Additional Context
This appears to be a cleanup issue where the plugin is not properly terminating the opencode child process on Neovim exit. The process may need to be explicitly killed or a proper shutdown signal sent when the plugin is unloaded or Neovim exits.
Please let me know if you need any additional information or logs to help diagnose this issue.
I cannot reproduce this. are you sure an instance of opencode wasn't already running when you launched Neovim?
also which OS and versions are you using? (your issue template is nice but you didn't actually fill it in)
I cannot reproduce this. are you sure an instance of opencode wasn't already running when you launched Neovim? also which OS and versions are you using? (your issue template is nice but you didn't actually fill it in)
iShot_2026-02-05_20.07.35.mp4
After entering nvim, start opencode.nvim and exit, repeating this three times; three processes were launched, and the first two processes should have been closed.
However I modified the shutdown sequence to use SIGTERM and SIGKILL as a fallback. And also use the nvim intenal contstants for the signals to ensure crossplatform compatability.
Activity
disrupted commentedon Feb 5, 2026
I cannot reproduce this. are you sure an instance of opencode wasn't already running when you launched Neovim?
also which OS and versions are you using? (your issue template is nice but you didn't actually fill it in)
TaterDoge commentedon Feb 5, 2026
iShot_2026-02-05_20.07.35.mp4
After entering nvim, start opencode.nvim and exit, repeating this three times; three processes were launched, and the first two processes should have been closed.
sudo-tee commentedon Feb 5, 2026
@maobai405
I also not able to reproduce the issue,
However I modified the shutdown sequence to use SIGTERM and SIGKILL as a fallback. And also use the nvim intenal contstants for the signals to ensure crossplatform compatability.
#239
Let me know if it resolves the issue
TaterDoge commentedon Feb 6, 2026
@sudo-tee
I tried that PR but couldn't resolve it. Anyway, I'll stop dwelling on this issue.