Description
Plugins that subscribe to the event bus are not receiving the session.created event. The event is published but plugins don't respond.
Plugins
Custom plugin in ~/.config/opencode/plugins/engram.ts (Engram memory system)
OpenCode version
1.2.10
Steps to reproduce
- Create a plugin that listens to
session.created via the event property
- Start a new OpenCode session
- Plugin doesn't receive the event
Screenshot and/or share link
Evidence: Engram does not activate automatically
Problem
According to AGENTS.md, mem_session_start should execute automatically at the start of each session.
But it doesn't happen - the user had to call it manually.
Log Evidence (opencode_session_created_bug.log)
Line 15 - Plugin loads:
INFO service=plugin path=...engram.ts loading plugin
Line 55 - MCP detected:
INFO service=mcp key=engram type=local found
Line 78 - MCP created:
INFO service=mcp key=engram toolCount=14 create() successfully created client
Lines 89-90 - ERRORS (here's the problem):
ERROR service=mcp clientName=engram error=MCP error -32601: prompts not supported
ERROR service=mcp clientName=engram error=MCP error -32601: resources not supported
Line 96 - OpenCode session created (without Engram):
INFO service=session id=ses_... created
Line 329 - ONLY HERE mem_session_start is called (manual):
INFO service=permission permission=engram_mem_session_start pattern=* ... evaluated
Conclusion
- Engram plugin loads
- There are MCP errors (prompts/resources not supported)
- OpenCode session is created
- mem_session_start is NEVER executed automatically
- It only executes when the user calls it manually (line 329)
Possible Cause
The -32601 errors on lines 89-90 suggest that the Engram plugin does not support
some MCP methods that OpenCode expects, wh
Operating System
ubuntu 22
Terminal
Alacritty
Description
Plugins that subscribe to the event bus are not receiving the session.created event. The event is published but plugins don't respond.
Plugins
Custom plugin in
~/.config/opencode/plugins/engram.ts(Engram memory system)OpenCode version
1.2.10
Steps to reproduce
session.createdvia theeventpropertyScreenshot and/or share link
Evidence: Engram does not activate automatically
Problem
According to AGENTS.md, mem_session_start should execute automatically at the start of each session.
But it doesn't happen - the user had to call it manually.
Log Evidence (opencode_session_created_bug.log)
Line 15 - Plugin loads:
INFO service=plugin path=...engram.ts loading plugin
Line 55 - MCP detected:
INFO service=mcp key=engram type=local found
Line 78 - MCP created:
INFO service=mcp key=engram toolCount=14 create() successfully created client
Lines 89-90 - ERRORS (here's the problem):
ERROR service=mcp clientName=engram error=MCP error -32601: prompts not supported
ERROR service=mcp clientName=engram error=MCP error -32601: resources not supported
Line 96 - OpenCode session created (without Engram):
INFO service=session id=ses_... created
Line 329 - ONLY HERE mem_session_start is called (manual):
INFO service=permission permission=engram_mem_session_start pattern=* ... evaluated
Conclusion
Possible Cause
The -32601 errors on lines 89-90 suggest that the Engram plugin does not support
some MCP methods that OpenCode expects, wh
Operating System
ubuntu 22
Terminal
Alacritty