anomalyco / anomalyco/opencode

Desktop: option to minimize to tray / keep running when window is closed

Open
#42,349 1 comment 1 reaction 1 assignee View on GitHub

@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_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.
Additional context
  • Desktop app version: ai.opencode.desktop (Electron-based), package packages/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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.