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
[Bug] opencode-mem stopped working after OpenCode update #73
Thanks for the detailed report. A few questions to help narrow this down:
Do you have an embedding API configured? (i.e. embeddingApiUrl + embeddingApiKey in your config). If not, the plugin loads a local embedding model (Xenova/all-MiniLM-L6-v2) via @xenova/transformers during warmup. This can be slow or silently fail on some environments.
Did opencode v1.3.5 change the plugin API? The plugin uses @opencode-ai/plugin and @opencode-ai/sdk types. If the new opencode version changed the plugin interface (e.g. ctx.client.session.messages, event types, etc.), the plugin could silently fail.
Check for error logs: The plugin logs errors via a custom logger. Look for any opencode logs around the time it stopped working (2026-03-29).
Most likely cause: The warmup at src/index.ts:32-38 catches errors silently and the plugin continues in a broken state. If the embedding model fails to load (network issue, disk space, model cache corruption), all subsequent operations (add, search) will fail because memoryClient.isReady() returns false.
Suggested investigation:
Delete the embedding model cache at ~/.opencode-mem/data/.cache/ and restart opencode
Or try setting embeddingApiUrl + embeddingApiKey to bypass local model loading entirely
If you can share any error logs from opencode, that would help pinpoint the exact failure.
Issue Description
After updating OpenCode, the plugin stopped working. No new memories are being saved, no new logs are being generated.
Troubleshooting Steps Completed
Cleared model cache - Deleted ~/.opencode-mem/data/.cache/
Configured remote Embedding API - Added embeddingApiUrl and embeddingApiKey to the config file
Checked ports - No other processes using ports 4747 or 4096
Reinstalled plugin - Executed bun remove opencode-mem && bun add opencode-mem@latest
Checked logs - No new entries after 2026-03-15
No other log files found (e.g., from opencode itself). The opencode-mem log (~/.opencode-mem/opencode-mem.log) only records up to March 15th, with no new logs after that.
❌ Never downloaded (~/.cache/huggingface/ directory does not exist)
Plugin loading
❌ No new logs after 2026-03-15
Remote API config
⚠️ Configured but not being called
Web UI (port 4747)
❌ Connection refused
Main UI (port 4096)
❌ Connection refused
Notes
Plugin worked normally from 2026-03-15 to 2026-03-28 (confirmed by database timestamps, and the web interface was accessible)
After OpenCode v1.3.5 update, the plugin completely stopped working
opencode-mem depends on @opencode-ai/plugin@^1.0.162 and @opencode-ai/sdk@^1.2.26
Actually installed: @opencode-ai/plugin@1.3.7 and @opencode-ai/sdk@1.3.7
opencode v1.3.x may have changed the plugin API, causing hooks (chat.message, event) to be incompatible
I finished tracing this and the root cause is now confirmed.
This is not a warmup, embedding, web-server, or database regression inside opencode-mem itself. The failure happens earlier, during plugin loading.
On the opencode-mem side, the published package currently exposes only a bare default plugin export from dist/plugin.js, and its package.json does not expose the newer plugin metadata/entrypoints such as oc-plugin, exports, or ./server.
On the OpenCode side, recent 1.3.x plugin loading expects target-aware entrypoints and validates the module as a plugin object with a server() entrypoint instead of a bare default-exported function. Because of that contract mismatch, opencode-mem is skipped before its runtime logic starts, which explains the missing behavior end-to-end.
That is also why the runtime theories did not hold up:
warmup/embedding failures would still produce plugin logs and tool-level errors
web server startup is detached from hook registration and would not prevent plugin load
user-prompts.db timestamp changes do not prove prompt capture succeeded
I’m preparing a PR to update opencode-mem to the current OpenCode plugin loading contract.
Activity
CPUrising commentedon Mar 29, 2026
Unable to open http://127.0.0.1:4747/ either
tickernelz commentedon Mar 31, 2026
Thanks for the detailed report. A few questions to help narrow this down:
Do you have an embedding API configured? (i.e.
embeddingApiUrl+embeddingApiKeyin your config). If not, the plugin loads a local embedding model (Xenova/all-MiniLM-L6-v2) via@xenova/transformersduring warmup. This can be slow or silently fail on some environments.Did opencode v1.3.5 change the plugin API? The plugin uses
@opencode-ai/pluginand@opencode-ai/sdktypes. If the new opencode version changed the plugin interface (e.g.ctx.client.session.messages, event types, etc.), the plugin could silently fail.Check for error logs: The plugin logs errors via a custom logger. Look for any opencode logs around the time it stopped working (2026-03-29).
Most likely cause: The warmup at
src/index.ts:32-38catches errors silently and the plugin continues in a broken state. If the embedding model fails to load (network issue, disk space, model cache corruption), all subsequent operations (add,search) will fail becausememoryClient.isReady()returns false.Suggested investigation:
~/.opencode-mem/data/.cache/and restart opencodeembeddingApiUrl+embeddingApiKeyto bypass local model loading entirelyIf you can share any error logs from opencode, that would help pinpoint the exact failure.
CPUrising commentedon Mar 31, 2026
Environment
Issue Description
After updating OpenCode, the plugin stopped working. No new memories are being saved, no new logs are being generated.
Troubleshooting Steps Completed
Cleared model cache - Deleted
~/.opencode-mem/data/.cache/Configured remote Embedding API - Added
embeddingApiUrlandembeddingApiKeyto the config fileChecked ports - No other processes using ports 4747 or 4096
Reinstalled plugin - Executed
bun remove opencode-mem && bun add opencode-mem@latestChecked logs - No new entries after 2026-03-15
No other log files found (e.g., from opencode itself). The opencode-mem log (
~/.opencode-mem/opencode-mem.log) only records up to March 15th, with no new logs after that.Log Content
Key Findings
~/.cache/huggingface/directory does not exist)Notes
Actually installed: @opencode-ai/plugin@1.3.7 and @opencode-ai/sdk@1.3.7
opencode v1.3.x may have changed the plugin API, causing hooks (chat.message, event) to be incompatible
NaNomicon commentedon Apr 2, 2026
I am investigating this issue, seems like this is blocking everything. If anyone has any information, feel free to send them here.
NaNomicon commentedon Apr 2, 2026
I finished tracing this and the root cause is now confirmed.
This is not a warmup, embedding, web-server, or database regression inside
opencode-memitself. The failure happens earlier, during plugin loading.On the
opencode-memside, the published package currently exposes only a bare default plugin export fromdist/plugin.js, and itspackage.jsondoes not expose the newer plugin metadata/entrypoints such asoc-plugin,exports, or./server.On the OpenCode side, recent 1.3.x plugin loading expects target-aware entrypoints and validates the module as a plugin object with a
server()entrypoint instead of a bare default-exported function. Because of that contract mismatch,opencode-memis skipped before its runtime logic starts, which explains the missing behavior end-to-end.That is also why the runtime theories did not hold up:
user-prompts.dbtimestamp changes do not prove prompt capture succeededI’m preparing a PR to update
opencode-memto the current OpenCode plugin loading contract.fix(plugin): restore OpenCode 1.3 loader compatibility
fix(plugin): restore OpenCode 1.3 loader compatibility (tickernelz#81)