anomalyco / anomalyco/opencode

Desktop app: old sessions become unresponsive to new messages; in-app auto-updater downloads but never applies updates

Open
#43,612 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 20, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

Two related issues encountered on the macOS desktop app (installed via Homebrew Cask opencode-desktop):

  1. Existing chat sessions stop accepting new messages. Old conversations load fine (history renders), but sending a new message appears to send, briefly shows a response starting, then reverts to the pre-send state. The app itself is not frozen — the UI is otherwise responsive, and new sessions could still be used normally.
  2. The in-app auto-updater never actually installs updates. On every launch, it checks for updates, finds a newer version, downloads it into ~/Library/Caches/@opencode-aidesktop-updater/pending/, sets its state to ready... and then just stops. The app keeps launching on the old version, re-downloading the same update package every single time instead of applying it.

Environment

  • App: OpenCode desktop (Electron, Homebrew Cask opencode-desktop)
  • OS: macOS 26.5.1 (Apple Silicon)
  • Version at time of issue: running 1.18.2 / Homebrew Caskroom showed 1.17.18 / in-app updater kept finding 1.18.19 but never applied it — three different version numbers reported simultaneously depending on where you looked.

Repro / observed behavior

Issue 1: unresponsive old sessions
  • Type a message in an existing (older) chat session → message appears to send → response starts streaming → UI reverts back to the state before the message was sent, as if it never happened.
  • Brand-new sessions worked fine throughout.
  • ~/.local/share/opencode/log/opencode.log showed no errors — provider requests via github-copilot/claude-sonnet-5 were completing successfully for sessions that did work.
  • No crash reports were generated (Crashpad/completed was empty; only an old, unrelated .dmp from several weeks prior was present in Crashpad/pending).
  • Renderer log (~/Library/Application Support/ai.opencode.desktop/logs/<timestamp>/renderer.log) showed only benign ResizeObserver loop completed with undelivered notifications noise and one incidental Failed to update terminal Error: PTY session not found: <id> (stale PTY reference from a previous restart, likely unrelated).
  • What resolved it: fully quitting the app (osascript -e 'quit app "OpenCode"'), then rm -rf ~/Library/Caches/@opencode-aidesktop-updater, then relaunching. After this, the previously "stuck" session immediately became responsive again and all previously-sent messages/history were visible.
  • Root cause is unclear — possibly a stale updater-cache artifact interfering with session state hydration, or some other cached state that gets cleared by a full app data reset. Filing this partly to get help narrowing down the actual cause, since clearing the updater cache is a coincidental-seeming fix.
Issue 2: auto-updater never applies pending update
  • main.log on every single launch showed the same sequence:
    app starting { version: '1.18.2', ... }
    auto updater configured { currentVersion: '1.18.2' }
    updater state changed { from: 'idle', to: 'checking' }
    Found version 1.18.19 (url: opencode-desktop-mac-arm64.zip, ...)
    updater state changed { from: 'checking', to: 'downloading' }
    Update has already been downloaded to .../pending/opencode-desktop-mac-arm64.zip
    updater state changed { from: 'downloading', to: 'ready' }
    
    ...and then nothing — the update is never actually applied on subsequent relaunch, across multiple full quit/relaunch cycles over several days.
  • Homebrew Cask metadata (brew info --cask opencode-desktop) reported a different installed version (1.17.18 in the Caskroom) than what the running /Applications/OpenCode.app/Contents/Info.plist reported (1.18.2), and the app's own UI reported yet another value (1.17.20) — three different sources of truth disagreeing at the same point in time.
  • What resolved it: brew reinstall --cask opencode-desktop (after fully quitting the app) correctly updated the installed app bundle to 1.18.19, confirmed via both brew list --cask --versions opencode-desktop and Info.plist's CFBundleShortVersionString. The in-app Squirrel.Mac-based auto-updater itself never successfully completed an update on its own.

Suggested areas to look at

  • Whether the Squirrel.Mac auto-updater integration is correctly triggering quitAndInstall (or equivalent) on relaunch, and why it can sit in ready state indefinitely across many app restarts without applying.
  • Whether Homebrew Cask-managed installs and the in-app updater can get into a inconsistent/conflicting state (as observed by the mismatched Caskroom vs. Info.plist vs. in-app-reported versions).
  • Whether any cache/session-state file under ~/Library/Application Support/ai.opencode.desktop/ or ~/Library/Caches/@opencode-aidesktop-updater/ can get into a state that blocks existing sessions from accepting new messages, and whether that can be surfaced as a proper error to the user instead of silently reverting the sent message.

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.