Skip to content

@latest plugin spec never refreshes cached install #54127

Open

Description

@klonuo

Description

Cache dir ~/.cache/opencode/npm/.../1791113570889 held 0.5.1 from Oct 4; 0.5.2 released later but @latest kept loading 0.5.1 across restarts and opencode service restart. Only a version pin (@0.5.2, new cache key) picked up the fix.

Log showed failed to load plugin ... Context.Tag is not a function the whole time.

Plugins

@langfuse/opencode-observability-plugin@latest

OpenCode version

2.0.26

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

No response

Activity

  1. opencode-agent commented on Oct 9, 2026

    @opencode-agent
    Contributor

    Thanks for the report, @klonuo!

    In v2, package plugins are cached once they're installed, even ones using @latest, and restarting doesn't look up the version again. Refreshing them is a separate step:

    opencode plugin check    # list package plugins that have a newer version
    opencode plugin update   # update all outdated package plugins
    opencode plugin update @langfuse/opencode-observability-plugin@latest

    (see the plugins docs). Running opencode plugin update should have moved you from 0.5.1 to 0.5.2 without pinning the version. If it doesn't for you, please reply here with the command output. That would be a bug and we'll look into it.

    I'm marking this as a feature request: you'd like @latest (and other non-pinned specs) to refresh by themselves after a restart, or at least to be told that the cached copy is out of date, especially when the plugin fails to load like Context.Tag is not a function did here. Maintainers will consider it.

    Related (these are about the older v1 package cache, which had no update command):

  2. klonuo commented on Oct 9, 2026

    @klonuo
    Author

    Yes, ideally to get notified in some way that there is an update

  3. oliver-mee commented on Oct 13, 2026

    @oliver-mee

    Same experience here on 2.0.21 to 2.0.26, across four machines. I use OpenCode every day and still had no idea the plugin was out of date. @openviking/opencode-plugin in opencode.json had been on its first cached install for one to three weeks on each box until I ran opencode plugin check by hand.

    Two things that might help the discussion:

    • Automatic refresh did ship. feat(core): refresh unpinned plugins on startup #45118 and fix(core): refresh plugins in background #45993 refreshed unpinned plugins in the background ("Automatic updates remain enabled"). Commit 5d73a57 ("support live package updates", 1 Sep) replaced that with the 24 hour PluginUpdate.check and a manual update. I couldn't find a note explaining the change, so anyone who set up @latest plugins before then is now quietly stuck on old versions.
    • The result of that daily check is only shown in the Plugins dialog. OpenCode's own updates get a line on the home screen, and the log records "OpenCode update available", but an outdated plugin produces nothing outside the dialog.

    Showing pending plugin updates the same way OpenCode's own updates are shown would cover most of this. An opt-in setting to install them on the next restart would cover the rest, and people who want to update deliberately would keep today's behaviour.

  4. danieliyahu1 commented on Nov 13, 2026

    @danieliyahu1

    Same on OpenCode 2.3.0 (Windows 11), and it's not limited to server plugins:

    • @slkiser/opencode-quota 6.0.0 (server plugin, opencode.json) was cached on 2026-11-01. 6.2.2 shipped 2026-11-05. It was still loading 6.0.0 today, including after the background server restarted during the session.
    • opencode-quill 0.6.3 (TUI-only plugin, cli.json) was in the same state; 0.6.4 shipped 2026-11-08.

    opencode plugin check correctly reported both as outdated, and opencode plugin update moved them to 6.2.2 and 0.6.4, so the manual path works. What's missing is the signal: nothing on Home, no toast, no log line — the pending update is only visible in the Plugins dialog or from the CLI.

    I only found out by running plugin check by hand after seeing a release note. +1 for refreshing unpinned specs on restart and/or showing pending plugin updates the way OpenCode's own update notice is shown.

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