Skip to content

[macOS] Clicking window close button (X) fully quits the app instead of keeping it running #26666

Closed as not planned

Description

@Theoz001

Description

Description

On macOS, clicking the red close button (X) in the top-left corner of the window fully quits the OpenCode desktop app (Dock icon disappears), instead of the standard macOS behavior where the window closes but the app keeps running in the background.

Steps to Reproduce

  1. Open OpenCode desktop app on macOS
  2. Click the red close button (X) on the window
  3. Observe the Dock: OpenCode icon disappears, app fully exits
  4. No confirmation dialog is shown

Expected Behavior

Clicking X should only close the window while keeping the app running in the Dock. Clicking the Dock icon again should restore the window. This is the standard behavior for macOS apps (e.g., Safari, Notes, VS Code).

Actual Behavior

The app fully quits without any warning when the close button is clicked.

Environment

  • OS: macOS
  • App Version: Desktop (Electron)
  • Installation Method: [Please specify, e.g., dmg / Homebrew]

Possible Technical Cause

Looking at the Electron main process code:

  1. No app.on("window-all-closed") event handler is registered
  2. No app.on("activate") event handler is registered, so clicking the Dock icon after closing the window cannot restore it

Consider implementing the standard Electron macOS app pattern to prevent quitting when the window is closed.


Please 👍 if you're experiencing the same issue.

Plugins

No response

OpenCode version

1.14.46 (1.14.46)

Steps to reproduce

  1. Open OpenCode desktop app on macOS
  2. Click the red close button (X) on the window
  3. Observe the Dock: OpenCode icon disappears, app fully exits
  4. No confirmation dialog is shown

Screenshot and/or share link

No response

Operating System

mac os 26.4.1

Terminal

No response

Activity

  1. github-actions commented on May 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. github-actions commented on Jul 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions