Skip to content

opencode-mnemory plugin: "Expected a string starting with 'ses'" error on opencode 1.17.9 #5

Description

@NCheuk

The @fpytloun/opencode-mnemory plugin v0.1.0 throws an error when used with opencode 1.17.9.

Error:
Error: Expected a string starting with "ses", got "s7Bid7D"

Stack trace:
at hooks.ts:237:48

Root cause:
In hooks.ts, the session.idle handler calls sdkClient?.session?.messages?.({ path: { sessionID: sessionId } }), where sessionId is the short session ID from event properties (e.g. s7Bid7D). However, the opencode SDK (v1.14.20) now expects the full session ID format (ses_xxx).

The same invalid ID is also passed to client.remember() at line 279 as sessionId.

Environment:

  • opencode: 1.17.9
  • @opencode-ai/plugin: 1.14.20
  • @fpytloun/opencode-mnemory: 0.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions