-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
Description
When opencode-supermemory is active in opencode.json, using any subagents or the Task tool in OpenCode fails immediately with a schema validation error.
Error Output (from OpenCode sidecar logs)
{
"code": "invalid_format",
"prefix": "prt",
"message": "Invalid string: must start with \"prt\"",
"path": ["id"]
}
Stack trace points to createUserMessage failing validation.
Steps to Reproduce
Install and activate opencode-supermemory.
Ask the OpenCode agent to use the Task tool (e.g., spawn a general subagent).
The tool call fails instantly with the error above.
Investigation & Root Cause
We performed a strict plugin bisection to isolate the issue. With an empty plugin array, the Task tool works perfectly. The moment opencode-supermemory is added back, the subagents break.
Likely technical cause: The plugin likely hooks into message transformations (like experimental.chat.messages.transform or similar) and accidentally strips, overwrites, or improperly clones the OpenCode id fields on messages or parts. OpenCode's schema now strictly enforces that IDs must start with the prt... prefix. The plugin should probably ignore synthetic/subagent messages entirely and pass them through untouched.
(Note: We also reported this to the OpenCode core team to ask for more resilient schema validation, but the mutation bug itself needs to be fixed in this plugin).Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels