Highlights
- Fix session inflation: OpenCode Task() sub-agent executions no longer register as separate Engram sessions
- Fix pre-existing bug in session.created event handler reading the wrong property path
What Changed
- The OpenCode plugin now detects sub-agent sessions via
parentID(set by OpenCode on all Task() sessions) and skips session registration for them - Secondary detection via title suffix
subagent)provides defense-in-depth - Sub-agent session IDs are tracked to prevent cross-hook inflation via
tool.execute.after - Fixed
event.properties.idtoevent.properties.info.id(correct path per OpenCode SDK types)
Impact
Before this fix, a single user conversation using sub-agents could generate 170+ sessions in the Engram DB. After this fix, only the real user session is registered.
Included Work
- fix(plugin): skip sub-agent session registration in OpenCode plugin