Skip to content

Plugin updates: No way to get latest version after initial install #10546

Closed

Description

@ErcinDedeoglu

Problem

Once a plugin is installed, there's no way to update it to a newer version without manually clearing the cache.

Current behavior

  1. User adds oc-sync (or oc-sync@latest) to their config
  2. OpenCode installs latest version (e.g., 0.1.4), caches resolved version in ~/.cache/opencode/package.json
  3. Plugin author publishes 0.1.5 with bug fixes
  4. User restarts OpenCode - still uses cached 0.1.4
  5. User has no way to know an update is available or how to get it

Root cause

In packages/opencode/src/bun/index.ts:

if (dependencies[pkg] === version && modExists) return mod

Once installed, the cached version is used forever.

Suggested solutions

Option A: Add opencode update command

opencode update plugins  # Update all plugins to latest
opencode update oc-sync  # Update specific plugin

Option B: Periodic version check

  • On startup, check npm registry for newer versions
  • Show notification: "Plugin updates available: oc-sync (0.1.4 → 0.1.5)"

Option C: TTL-based cache invalidation

  • Re-check @latest versions after X days (e.g., 7 days)

Workaround

Currently users must manually:

rm -rf ~/.cache/opencode/node_modules/oc-sync
# or
rm ~/.cache/opencode/package.json

This is not discoverable and plugin authors have no way to notify users of updates.

Activity

  1. github-actions commented on Jan 25, 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. Tarquinen commented on Jan 25, 2026

    @Tarquinen
    Member

    "plugin": ["opencode-plugin-here@latest"]
    authors can also notify users of updates with toasts by comparing npm version to cache version if needed

  3. athal7 commented on Feb 5, 2026

    @athal7
    Contributor

    This also affects explicitly versioned plugins. If I have myplugin@0.20.1 cached and update my config to myplugin@0.20.2, OpenCode still uses the cached 0.20.1 until I manually rm -rf ~/.cache/opencode/node_modules/myplugin.

    Expected: OpenCode should compare the requested version against the cached version and reinstall if they differ.

  4. phazei commented on Apr 8, 2026

    @phazei

    I'm on opencode 1.3.17

    I don't see how this was fixed.

    I had:
    "plugin": ["opencode-plugin-here"]

    and it didn't update. Then I changed it to:
    "plugin": ["opencode-plugin-here@latest"]

    and restarted, but still no update.

  5. agxs commented on Sep 7, 2026

    @agxs

    Same issue with 1.18.27

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