anomalyco / anomalyco/opencode
Desktop: option to minimize to tray / keep running when window is closed
@Hona is already working on this.
Since Aug 13, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
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_closeconfig) 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-closedbehavior (app stays running) could stay as-is; this is mainly for Windows/Linux.
Additional context
- Desktop app version:
ai.opencode.desktop(Electron-based), packagepackages/desktop - Current behavior source:
packages/desktop/src/main/index.ts->app.on("window-all-closed", () => { if (process.platform === "darwin") return; app.quit() }) - No tray or
BrowserWindow.hide()usage exists today.
Thanks for considering!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.