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
Plugins with github: specifier fail to load on restart (cache hit path resolves wrong package name) #24437
Plugins installed via github: specifier (e.g. github:Edison-A-N/opencode-agent-memory) load successfully on first launch but fail with ENOENT on every subsequent restart, until the cache directory is manually deleted.
Error from logs:
ERROR service=plugin path=github:Edison-A-N/opencode-agent-memory
error=ENOENT: no such file or directory, open
'~/.cache/opencode/packages/github:Edison-A-N/opencode-agent-memory/node_modules/github:Edison-A-N/package.json'
failed to resolve plugin server entry
The expected path should be node_modules/@Edison-A-N/opencode-agent-memory/package.json, but the cache-hit code path uses the raw specifier string as the package name.
Root cause is in packages/core/src/npm.ts — the Npm.add() function:
First install (cache dir absent): reify() runs, then tree.edgesOut provides the correct installed path → ✅ works
Cache hit (cache dir exists): npa(pkg).name is used to reconstruct the path, but npa("github:user/repo") returns name: null, so it falls back to the raw spec string "github:Edison-A-N/opencode-agent-memory" → ❌ ENOENT
// packages/core/src/npm.ts — Npm.add()constname=(()=>{try{returnnpa(pkg).name??pkg// npa("github:user/repo").name → null → falls back to raw spec}catch{returnpkg}})()if(yield*afs.existsSafe(dir)){// Cache hit: constructs node_modules/github:Edison-A-N/opencode-agent-memory → wrongreturnresolveEntryPoint(name,path.join(dir,"node_modules",name))}
A possible fix: when the cache directory exists, read the dependency name from the cached package.json (written during reify) instead of relying on npa().name:
Activity
prasadf18 commentedon Apr 27, 2026
@rekram1-node hi, please assign this to me
github-actions commentedon Jul 3, 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.