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
Desktop: option to minimize to tray / keep running when window is closed #42349
On Windows, clicking the window close button (x) quits the OpenCode desktop app entirely. When the last window is closed, window-all-closed calls app.quit() (see packages/desktop/src/main/index.ts).
I would like an option so that closing the window minimizes to the system tray / keeps the app running in the background instead of quitting, similar to apps like Slack or Discord. This is useful because ongoing agent runs (long tool calls, background tasks) keep executing, and I don't want to lose them just by clicking the window close button.
Feature request
Add a setting (e.g. in Settings, or a close_to_tray / minimize_on_close config) that makes the x button hide the window instead of quitting the app.
Show a tray icon (currently there is no Tray usage in the desktop main process) so the app can be restored from the tray.
On macOS the existing window-all-closed behavior (app stays running) could stay as-is; this is mainly for Windows/Linux.
This issue might be a duplicate of an existing issue. Please check:
[FEATURE]: Add close confirmation or minimize-to-tray support for Desktop app #27463: [FEATURE]: Add close confirmation or minimize-to-tray support for Desktop app — same request to minimize to system tray / keep the app running in the background when the window is closed, with nearly identical motivations (background agent tasks, Windows behavior, tray icon).
If your request adds meaningfully different context, please clarify how it differs from #27463.
Still relevant on the current release - could this be reopened?
Verified against OpenCode Desktop 2.2.0 on Windows 11 (Windows_NT 10.0.26200, x64). The behavior described in this issue is unchanged:
The app is Electron-based, but the main process never creates an Electron Tray instance, so there is no tray icon at all.
The minimize button only shrinks the window to the taskbar; there is no tray fallback.
Closing the last window quits the app (window-all-closed -> app.quit() on non-macOS platforms), which kills any in-flight agent run.
Requested behavior is unchanged from the original report:
A tray icon with an Open / Quit menu, so the app can be hidden instead of terminated.
A setting for the close button: minimize to tray (default off) vs. quit.
Keep the background service / agent runs alive while the window is hidden.
Current workaround on Windows: third-party tray tools (Traymond, RBTray, Trayconizer) intercept the minimize button, since the app exposes no hook of its own.
There are a few near-duplicates of this request (#27463, #18134, #35775) - ideally they could be merged into this one. If a fresh issue is preferred instead, happy to file one.
Activity
github-actions commentedon Aug 13, 2026
This issue might be a duplicate of an existing issue. Please check:
If your request adds meaningfully different context, please clarify how it differs from #27463.
github-actions commentedon Oct 14, 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.
AL-Mint commentedon Oct 29, 2026
Still relevant on the current release - could this be reopened?
Verified against OpenCode Desktop 2.2.0 on Windows 11 (
Windows_NT 10.0.26200, x64). The behavior described in this issue is unchanged:Trayinstance, so there is no tray icon at all.window-all-closed->app.quit()on non-macOS platforms), which kills any in-flight agent run.Requested behavior is unchanged from the original report:
Current workaround on Windows: third-party tray tools (Traymond, RBTray, Trayconizer) intercept the minimize button, since the app exposes no hook of its own.
There are a few near-duplicates of this request (#27463, #18134, #35775) - ideally they could be merged into this one. If a fresh issue is preferred instead, happy to file one.
Hona commentedon Oct 29, 2026
We can consider this.
Just note even though the UI does fully close - your agents are still running in the persistent OpenCode server!