Skip to content

opencode upgrade doesnt move to newest version #5375

Closed

Description

@OpeOginni

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 11, 2025
  2. github-actions commented on Dec 11, 2025

    @github-actions
    Contributor

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

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

  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 13, 2025
  4. rekram1-node commented on Dec 13, 2025

    @rekram1-node
    Contributor

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

  5. edlsh commented on Dec 27, 2025

    @edlsh
    Contributor

    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?

  6. rekram1-node commented on Dec 27, 2025

    @rekram1-node
    Contributor

    @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

  7. lmBored commented on Jan 14, 2026

    @lmBored

    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

  8. rekram1-node commented on Jan 14, 2026

    @rekram1-node
    Contributor

    Wdym not working for brew?

  9. lmBored commented on Jan 14, 2026

    @lmBored

    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?

  10. jd-santos commented on Jan 18, 2026

    @jd-santos

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

  11. lmBored commented on Jan 19, 2026

    @lmBored

    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

  12. ritesh24 commented on Jan 22, 2026

    @ritesh24

    Unable to update from 1.1.20 to 1.1.32

  13. ritesh24 commented on Jan 24, 2026

    @ritesh24

    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`

  14. 6 remaining items

  15. NeilsC commented on Apr 6, 2026

    @NeilsC

    I was running into this on Linux as well. The root cause was that the old version of opencode was installed in ~/.local/bin, and opencode upgrade was installing the new version in ~/.opencode/bin. Manually deleting the old version fixed the issue.

  16. patriciomg commented on Jun 12, 2026

    @patriciomg

    I had the same problem. The solution was running brew upgrade opencode
    by running: opencode upgrade or opencode upgrade --method brew did not work.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions