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-cli sidecar process not terminated when opencode electron desktop is closed #17068
When closing the OpenCode Electron window, the opencode-cli sidecar process is not terminated. Re-launching the app spawns a new opencode-cli instance, causing multiple processes.
SIGTERM via Ctrl+C (when running the binary directly) correctly stops both the Electron window and the sidecar — but simply closing the Electron window does not, regardless of how the app was launched. Somehow running the binary directly, have faster startup time.
I can confirm this also happen in Opencode Electron Desktop on MacOS running on Macbook Air M2.
Plugins
I don't have any installed plugins
OpenCode version
1.2.24
Steps to reproduce
Open the OpenCode Electron Desktop
Close the Opencode Electron Desktop
See the process list, in my case i'm using btop. opencode-cli process still running.
Open the OpenCode Electron Desktop again. It will spawn another opencode-cli process.
I have to kill it manually in order to kill the opencode-cli process
While those issues focus on the TUI/CLI process not handling SIGHUP when a terminal closes, the root symptom (opencode-cli processes not terminating on close) is similar. It may be worth checking if the Electron desktop app's sidecar management is related to or a separate instance of the same underlying cleanup issue.
I've opened a fix for this in #23018 — adds a window-all-closed handler to the Electron app so the opencode-cli serve sidecar gets killed when the window is closed on macOS.
Root cause: on macOS, closing the window doesn't quit Electron, so the existing before-quit/will-quit cleanup hooks never fire. The sidecar survives indefinitely.
Activity
github-actions commentedon Mar 11, 2026
This issue might be a duplicate of existing issues. Please check:
While those issues focus on the TUI/CLI process not handling SIGHUP when a terminal closes, the root symptom (opencode-cli processes not terminating on close) is similar. It may be worth checking if the Electron desktop app's sidecar management is related to or a separate instance of the same underlying cleanup issue.
fix(electron): quit app on window-all-closed to kill sidecar on macOS
vaishnavmhetre commentedon Apr 17, 2026
I've opened a fix for this in #23018 — adds a
window-all-closedhandler to the Electron app so theopencode-cli servesidecar gets killed when the window is closed on macOS.Root cause: on macOS, closing the window doesn't quit Electron, so the existing
before-quit/will-quitcleanup hooks never fire. The sidecar survives indefinitely.github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.