opencode upgrade doesnt move to newest version #3472

Closed
opened 2026-02-16 17:40:15 -05:00 by yindo · 14 comments
Owner

Originally created by @OpeOginni on GitHub (Dec 11, 2025).

Description

I tried upgrading opencode with the opencode upgrade command, the first time, it took me to a new version that was not the latest. I had to run it again before it went to the latest verison

OpenCode version

1.0.138

Steps to reproduce

No response

Screenshot and/or share link

Image Image

Operating System

macOS

Terminal

Ghostty

Originally created by @OpeOginni on GitHub (Dec 11, 2025). ### Description I tried upgrading opencode with the `opencode upgrade` command, the first time, it took me to a new version that was not the latest. I had to run it again before it went to the latest verison ### OpenCode version 1.0.138 ### Steps to reproduce _No response_ ### Screenshot and/or share link <img width="392" height="257" alt="Image" src="https://github.com/user-attachments/assets/66becedc-ac21-41ba-aba7-0616f6c68d4a" /> <img width="361" height="269" alt="Image" src="https://github.com/user-attachments/assets/f5a30b02-2b71-4285-a04b-02e3737b7f5e" /> ### Operating System macOS ### Terminal Ghostty
yindo added the bug label 2026-02-16 17:40:15 -05:00
yindo closed this issue 2026-02-16 17:40:15 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 11, 2025):

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

  • #5111: It should not be possible to exit opencode while it's silently updating itself to latest release
  • #4248: [FEATURE]: More transparent automatic version upgrades
  • #4783: Please, change autoupdate to notify by default
  • #1233: "Restart to update" always pops up, even after restarting
  • #380: Stuck on version 109

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 11, 2025): This issue might be a duplicate of existing issues. Please check: - #5111: It should not be possible to exit opencode while it's silently updating itself to latest release - #4248: [FEATURE]: More transparent automatic version upgrades - #4783: Please, change autoupdate to notify by default - #1233: "Restart to update" always pops up, even after restarting - #380: Stuck on version 109 Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 13, 2025):

github has had issues lately so i imagine it was something on their end?

@rekram1-node commented on GitHub (Dec 13, 2025): github has had issues lately so i imagine it was something on their end?
Author
Owner

@edlsh commented on GitHub (Dec 26, 2025):

npm registry has 5-min CDN caching (cache-control: max-age=300), which could cause stale version fetches. Would adding a Cache-Control: no-cache header for explicit opencode upgrade commands be welcome?

@edlsh commented on GitHub (Dec 26, 2025): npm registry has 5-min CDN caching (`cache-control: max-age=300`), which could cause stale version fetches. Would adding a `Cache-Control: no-cache` header for explicit `opencode upgrade` commands be welcome?
Author
Owner

@rekram1-node commented on GitHub (Dec 26, 2025):

@edlsh is that actually the issue here? i did notice this weirdness if I downgrade to sufficiently old version then upgrade it will do .142 for some reason, then u can upgrade again from there, this is way past a 5 min cache

@rekram1-node commented on GitHub (Dec 26, 2025): @edlsh is that actually the issue here? i did notice this weirdness if I downgrade to sufficiently old version then upgrade it will do .142 for some reason, then u can upgrade again from there, this is way past a 5 min cache
Author
Owner

@lmBored commented on GitHub (Jan 14, 2026):

Homebrew has the same issue with brew, but for brew, it seems that HOMEBREW_NO_AUTO_UPDATE: "1" in installation/index.ts is blocking update.

Another issue is that opencode upgrade v1.1.xx also doesn't seem to work for brew.

Edit: Also how do I test this in development? ./packages/opencode/dist/opencode-.../bin/opencode upgrade always detects it was downloaded with bun. I'm not sure how to test with brew

@lmBored commented on GitHub (Jan 14, 2026): Homebrew has the same issue with brew, but for brew, it seems that `HOMEBREW_NO_AUTO_UPDATE: "1"` in `installation/index.ts` is blocking update. Another issue is that `opencode upgrade v1.1.xx` also doesn't seem to work for brew. Edit: Also how do I test this in development? `./packages/opencode/dist/opencode-.../bin/opencode upgrade` always detects it was downloaded with bun. I'm not sure how to test with brew
Author
Owner

@rekram1-node commented on GitHub (Jan 14, 2026):

Wdym not working for brew?

@rekram1-node commented on GitHub (Jan 14, 2026): Wdym not working for brew?
Author
Owner

@lmBored commented on GitHub (Jan 14, 2026):

Wdym not working for brew?

Oops, I was missing context, this is my logs:

❯ brew --version
Homebrew 5.0.10-27-g1610f0a

❯ brew list --full-name opencode
anomalyco/tap/opencode

❯ opencode --version
1.1.19

❯ which opencode
/opt/homebrew/bin/opencode

❯ opencode upgrade
                                   ▄
  █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
  █░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀
  ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀  ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀

┌  Upgrade
│
●  Using method: brew
│
●  From 1.1.19 → 1.1.20
│
◇  Upgrade complete
│
└  Done

❯ opencode --version
1.1.19

Perhaps because brew upgrade is not upgrading from the correct tap - anomalyco/tap?

@lmBored commented on GitHub (Jan 14, 2026): > Wdym not working for brew? Oops, I was missing context, this is my logs: ``` ❯ brew --version Homebrew 5.0.10-27-g1610f0a ❯ brew list --full-name opencode anomalyco/tap/opencode ❯ opencode --version 1.1.19 ❯ which opencode /opt/homebrew/bin/opencode ❯ opencode upgrade   ▄ █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█ █░░█ █░░█ █▀▀▀ █░░█ █░░░ █░░█ █░░█ █▀▀▀ ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ┌ Upgrade │ ● Using method: brew │ ● From 1.1.19 → 1.1.20 │ ◇ Upgrade complete │ └ Done ❯ opencode --version 1.1.19 ``` Perhaps because `brew upgrade` is not upgrading from the correct tap - `anomalyco/tap`?
Author
Owner

@jd-santos commented on GitHub (Jan 18, 2026):

Is there an answer or workaround here? I'm not able to update beyond 1.1.20 with brew upgrade or opencode upgrade.

@jd-santos commented on GitHub (Jan 18, 2026): Is there an answer or workaround here? I'm not able to update beyond 1.1.20 with `brew upgrade` or `opencode upgrade`.
Author
Owner

@lmBored commented on GitHub (Jan 19, 2026):

Is there an answer or workaround here? I'm not able to update beyond 1.1.20 with brew upgrade or opencode upgrade.

Did you tap the correct tap? It should look be this tap: anomalyco/tap/opencode. And brew upgrade opencode works just fine for me

@lmBored commented on GitHub (Jan 19, 2026): > Is there an answer or workaround here? I'm not able to update beyond 1.1.20 with `brew upgrade` or `opencode upgrade`. Did you tap the correct tap? It should look be this tap: `anomalyco/tap/opencode`. And `brew upgrade opencode` works just fine for me
Author
Owner

@ritesh24 commented on GitHub (Jan 22, 2026):

Unable to update from 1.1.20 to 1.1.32

@ritesh24 commented on GitHub (Jan 22, 2026): Unable to update from 1.1.20 to 1.1.32
Author
Owner

@ritesh24 commented on GitHub (Jan 24, 2026):

I tried this command in terminal and it worked. May help..

`brew update

TAP_DIR="$(brew --repo anomalyco/tap)"
git -C "$TAP_DIR" pull --rebase

brew upgrade anomalyco/tap/opencode
hash -r
opencode --version`

@ritesh24 commented on GitHub (Jan 24, 2026): I tried this command in terminal and it worked. May help.. `brew update TAP_DIR="$(brew --repo anomalyco/tap)" git -C "$TAP_DIR" pull --rebase brew upgrade anomalyco/tap/opencode hash -r opencode --version`
Author
Owner

@itzcodex24 commented on GitHub (Jan 30, 2026):

Seeing this issue with latest version and specified version, with brew. Running opencode upgrade shows Upgrade Complete, but after running opencode -v the version displayed is the old version.

@itzcodex24 commented on GitHub (Jan 30, 2026): Seeing this issue with latest version and specified version, with brew. Running `opencode upgrade` shows Upgrade Complete, but after running `opencode -v` the version displayed is the old version.
Author
Owner

@pratikthapw commented on GitHub (Feb 1, 2026):

brew update

TAP_DIR="$(brew --repo anomalyco/tap)" git -C "$TAP_DIR" pull --rebase

brew upgrade anomalyco/tap/opencode hash -r opencode --version

thanks it works

@pratikthapw commented on GitHub (Feb 1, 2026): > brew update > > TAP_DIR="$(brew --repo anomalyco/tap)" git -C "$TAP_DIR" pull --rebase > > brew upgrade anomalyco/tap/opencode hash -r opencode --version thanks it works
Author
Owner

@arendon1 commented on GitHub (Feb 2, 2026):

I'm experiencing the same thing, but I'm not able to do it.

Since I'm on Windows, do you guys know any alternative I can use to fix the fact that the agent doesn't upgrade to its latest version?

I would love to attach some logs, but I don't know how to properly do it.

So far I've tried the npm way to upgrade it. No luck so far.

@arendon1 commented on GitHub (Feb 2, 2026): I'm experiencing the same thing, but I'm not able to do it. Since I'm on Windows, do you guys know any alternative I can use to fix the fact that the agent doesn't upgrade to its latest version? I would love to attach some logs, but I don't know how to properly do it. So far I've tried the npm way to upgrade it. No luck so far.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3472