You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plugin without version defaults to "latest" causing semver parsing error #12143
When a plugin is specified in opencode.json without a version suffix (e.g., \"opencode-gemini-auth\" instead of \"opencode-gemini-auth@1.3.8\"), opencode defaults the version to the string \"latest\". However, this causes a semver parsing error because \"latest\" is not a valid SemVer string.
{
\"name\": \"UnknownError\",\"data\": {\"message\": \"Error: Invalid SemVer: latest\\n\\n at order (unknown)\\n at isOutdated (src/bun/registry.ts:46:19)\\n at processTicksAndRejections (native:7:39)\"
}
}
Use a fallback that doesn't require semver parsing
Validate versions before passing to semver and fail with a clear error message
Actual Behavior
Defaults version to \"latest\" string, which causes semver to fail with \"Invalid SemVer: latest\"
Root Cause
The code unconditionally defaults to \"latest\" when no version is found. This string is then passed to semver for version comparison, but semver requires valid SemVer format (e.g., 1.2.3, latest is not valid).
Workaround
Specify explicit version:
{
\"plugin\": [\"opencode-gemini-auth@1.3.8\"]
}
Notes
This can occur when third-party tools (e.g., tessl/skills installers) rewrite the config and strip version specifiers.
Thanks for the detailed report @bdwelle! This is a confirmed bug.
Root Cause:
When a plugin is configured without a version (e.g., "opencode-gemini-auth"), the code defaults to "latest". During the first install, if the version resolution from the installed package's package.json fails (file missing, parse error, etc.), "latest" gets stored in the cache at ~/.cache/opencode/package.json.
On subsequent runs, when checking if the cached version is outdated, semver.order("latest", "x.y.z") throws because "latest" isn't a valid semver string.
Relevant code:
packages/opencode/src/bun/index.ts:130-139 - Version resolution can fail silently, leaving "latest" to be cached
packages/opencode/src/bun/registry.ts:46 - semver.order() call that throws
Workaround:
As you noted, specifying explicit versions works:
{ "plugin": ["opencode-gemini-auth@1.3.8"] }
You can also clear the cache: rm -rf ~/.cache/opencode/package.json
Fix:
We'll add validation in isOutdated() to handle invalid cached versions gracefully.
If you'd like to open a PR for this, we'd welcome the contribution!
Activity
github-actions commentedon Feb 4, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
R44VC0RP commentedon Feb 4, 2026
Thanks for the detailed report @bdwelle! This is a confirmed bug.
Root Cause:
When a plugin is configured without a version (e.g.,
"opencode-gemini-auth"), the code defaults to"latest". During the first install, if the version resolution from the installed package'spackage.jsonfails (file missing, parse error, etc.),"latest"gets stored in the cache at~/.cache/opencode/package.json.On subsequent runs, when checking if the cached version is outdated,
semver.order("latest", "x.y.z")throws because"latest"isn't a valid semver string.Relevant code:
packages/opencode/src/bun/index.ts:130-139- Version resolution can fail silently, leaving"latest"to be cachedpackages/opencode/src/bun/registry.ts:46-semver.order()call that throwsWorkaround:
As you noted, specifying explicit versions works:
{ "plugin": ["opencode-gemini-auth@1.3.8"] }You can also clear the cache:
rm -rf ~/.cache/opencode/package.jsonFix:
We'll add validation in
isOutdated()to handle invalid cached versions gracefully.If you'd like to open a PR for this, we'd welcome the contribution!
dezren39 commentedon Apr 1, 2026
i worked around this by using a tarball
github-actions commentedon May 31, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.