Skip to content

[BUG] Windows updater installs a new EXE in the cache directory instead of replacing the existing app #30497

Closed as not planned

Description

@whiteS18

Description

Description

On Windows, after clicking the update popup in the bottom-right corner of OpenCode, the updater appears to install a new .exe into the cache directory instead of replacing the existing application.

After the update completes, I used Hibit Uninstaller to check the installed programs and found that two separate OpenCode .exe entries exist independently. This indicates that the update was installed side-by-side rather than replacing the old version.

Even more seriously, after uninstalling the old OpenCode version, the updated application still cannot be found through the Windows Start menu search.

Expected behavior

The update should replace the existing OpenCode installation, so that:

  • only one OpenCode installation remains on the system
  • the updated app is registered correctly
  • the app can still be found from the Windows Start menu after updating

Actual behavior

  • A new .exe is installed in the cache directory
  • The new version does not replace the original application
  • Hibit Uninstaller shows two separate OpenCode entries
  • After uninstalling the old version, the updated app cannot be found from the Windows Start menu

Plugins

no plugin

OpenCode version

V1.14.20 up to v1.15.13

Steps to reproduce

  1. Start OpenCode on Windows.
  2. Wait for the update popup in the bottom-right corner.
  3. Click the update prompt.
  4. Wait for the update to finish.
  5. Check installed apps with Hibit Uninstaller.
  6. Uninstall the old OpenCode version.
  7. Search for OpenCode in the Windows Start menu.

Screenshot and/or share link

No response

Operating System

windows11

Terminal

windows terminal

Activity

  1. github-actions commented on Jun 3, 2026

    @github-actions
    Contributor

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

  2. Astro-Han commented on Jun 3, 2026

    @Astro-Han

    What you're seeing as "a new exe in the cache directory" is the NSIS installer that electron-updater stages under %LocalAppData%\@opencode-aidesktop-updater\pending\ and then runs to perform the update. The problem is that this installer lays the app down as a fresh per-user install instead of updating your existing one, so you end up with two registered entries.

    The Start-menu part follows from the same thing: each install registers its own uninstall key and shortcuts. When you uninstall the "old" one, its uninstaller removes the shortcuts and Start-menu index entry, and the surviving per-user copy under %LocalAppData%\Programs\ was either never properly indexed or its shortcut got cleaned up alongside, which is why search can't find it afterwards.

    #26818 has the same root cause with logs from a custom D:\ install, so it's worth consolidating there. The short version: this looks like a per-machine vs per-user install-mode mismatch in the published NSIS target, not the updater corrupting a single install. Until that's fixed, the clean recovery is to fully uninstall every OpenCode entry and reinstall once from the latest installer so there's a single consistent install state.
    For what it's worth, PawWork (another Electron desktop agent) went through the same NSIS split-install pain and landed on enforcing a single install mode with explicit perMachine + elevation helper — happy to share the electron-builder config if it helps.

  3. github-actions commented on Aug 4, 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