Skip to content

Plugins with implied latest version don't auto-update on restart #6774

Closed as not planned

Description

@backnotprop

Description

When a plugin is configured without a version (defaulting to "latest"):

 {
   "plugin": ["@plannotator/opencode"]
 }

It doesn't update to newer versions on subsequent OpenCode starts.

Root Cause

In packages/opencode/src/bun/index.ts, after installing a "latest" plugin, the resolved version is saved to the cache:

  if (version === "latest") {
    resolvedVersion = installedPkg.version  // e.g. "0.2.3"
  }
  parsed.dependencies[pkg] = resolvedVersion  // Saves "0.2.3", not "latest"

On next startup, the check parsed.dependencies[pkg] === version compares "0.2.3" === "latest" which is false, so it proceeds to reinstall - but Bun's registry cache often returns the same version.

Workaround:

Users can manually clear the cache:

rm -rf ~/.cache/opencode/node_modules/<plugin-name>

Suggested Fix:
#6772

Plugins

plannotator

OpenCode version

latest

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

mac

Terminal

ghostty

Activity

  1. github-actions commented on Jan 3, 2026

    @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.

  2. changed the title [-]Plugins with "latest" version don't auto-update on restart[/-] [+]Plugins with implied latest version don't auto-update on restart[/+] on Jan 3, 2026
  3. rekram1-node commented on Jan 3, 2026

    @rekram1-node
    Collaborator

    do @latest as a workaround for now

  4. backnotprop commented on Jan 3, 2026

    @backnotprop
    ContributorAuthor

    @rekram1-node updated my docs for users

  5. backnotprop commented on Jan 7, 2026

    @backnotprop
    ContributorAuthor

    plugin caching is brutal.

    maybe worth taking a look at #6772

  6. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  7. t1 commented on Apr 6, 2026

    @t1

    git dependencies (e.g. git+https://github.com/...) are pinned by commit SHA in bun.lock, and bun install never re-resolves them, unlike npm deps where at least version ranges or @latest could theoretically trigger updates.

  8. removed
    bugSomething isn't working
    on May 3, 2026
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