opencode icon indicating copy to clipboard operation
opencode copied to clipboard

"Restart to update" always pops up, even after restarting

Open tylerlaprade opened this issue 6 months ago • 7 comments

Image

I'm using Ghostty on MacOS. I tried /exit and then reopening multiple times, and even killed my terminal and opened a new one. This still pops up every time. opencode -v gives me 0.1.140, so maybe I'm just on such an old version that I can't auto-update? If so, the popup should tell me to reinstall instead.

tylerlaprade avatar Jul 23 '25 01:07 tylerlaprade

I would assume the update is failing. Based on this code it in theory shouldn't show the banner on a failure:

          await Installation.upgrade(method, latest)
            .then(() => {
              Bus.publish(Installation.Event.Updated, { version: latest })
            })
            .catch(() => {})

which makes me think the issue is with the upgrade method:

  export async function upgrade(method: Method, target: string) {
    const cmd = (() => {
      switch (method) {
        case "curl":
          return $`curl -fsSL https://opencode.ai/install | bash`.env({
            ...process.env,
            VERSION: target,
          })
        case "npm":
          return $`npm install -g opencode-ai@${target}`
        case "pnpm":
          return $`pnpm install -g opencode-ai@${target}`
        case "bun":
          return $`bun install -g opencode-ai@${target}`
        case "brew":
          return $`brew install sst/tap/opencode`.env({
            HOMEBREW_NO_AUTO_UPDATE: "1",
          })
        default:
          throw new Error(`Unknown method: ${method}`)
      }
    })()

How have you installed opencode? Have you tried a clean reinstall?

ChaseRensberger avatar Jul 23 '25 05:07 ChaseRensberger

I manually updated with brew, but of course now there's no newer version available to trigger the banner. We'll see what happens with the banner once a new version is released.

tylerlaprade avatar Jul 23 '25 05:07 tylerlaprade

seems like brew is failing silently

thdxr avatar Jul 23 '25 16:07 thdxr

Confirmed it's still happening with the newer version

Image Image

tylerlaprade avatar Jul 24 '25 02:07 tylerlaprade

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

rekram1-node avatar Dec 28 '25 01:12 rekram1-node

@rekram1-node, this still happens for me. I still have to manually update with Brew

tylerlaprade avatar Jan 07 '26 17:01 tylerlaprade

Weird...

rekram1-node avatar Jan 07 '26 17:01 rekram1-node