Skip to content

OpenCode plugin memory_search always empty on service 2.1.7 (non-verbose /api/v1/memory/search envelope lost structured hits) #767

Open

Description

@kristhianmanue1

Summary

After upgrading the memory service to 2.1.7 (desktop app 1.2.2 → 1.2.401, which also regenerated the OpenCode plugin, revision v2-3), every memory_search surfaced through the OpenCode plugin returns No relevant Memmy memories found. — even when the service itself finds and returns hits for the same query.

Environment

  • macOS darwin-arm64
  • Memmy desktop app 1.2.401 (cn edition), upgraded 2026-10-27 from 1.2.2
  • memory-service 2.1.7, buildId f1c092fc5543c7c69f917a8dc54ea3e88cfcb397f5257a552cb9101c7f6944a8 (previous: 2.1.4)
  • OpenCode plugin regenerated by the new app, plugin_revision v2-3:0091dad4b7eaa0141d47bf4d882780ca069e55173745372f8addeb72f91a2a5d

Reproduction

  1. Search without verbose:
curl -s -X POST http://127.0.0.1:18960/api/v1/memory/search \
  -H 'content-type: application/json' \
  -d '{"query":"memmy","layers":["L1"],"source":"opencode"}'

Root keys of the response: only injectedContext (a markdown string). No structured hit fields at all.

  1. Same call with "verbose": true:

Root keys: injectedContext plus debug, where debug.hits is a populated array (6 hits in my test, with id, kind, memoryLayer, title, snippet, score, tags).

  1. The regenerated OpenCode plugin's memmy_memory_search tool posts to /api/v1/memory/search without verbose: true. Its extractSearchHits() helper only reads hits | results | memories | items, at the response root or under debug. With the 2.1.7 non-verbose envelope those fields never exist, so zero hits are parsed and the tool always replies No relevant Memmy memories found.

  2. Service-side confirmation via GET /api/v1/memory/logs: the same searches show finalReturned: 6 / llm_filter:llm_kept_all (service returned hits) while the plugin surfaced none of them.

Impact

  • All memory_search calls through the OpenCode plugin return empty → agents silently lose memory recall on 2.1.7.
  • /memmy-resume is unaffected: its search call already includes verbose: true.

Suggested fixes (either one closes this)

  1. Restore the structured hit fields in the non-verbose /api/v1/memory/search envelope (backward compatible with plugin revisions that expect hits/results/memories/items), or
  2. Ship the plugin with verbose: true in the memmy_memory_search body. Note: verbose debug.hits items carry snippet but no summary/body/content, so the plugin's hit formatter may also want hit.snippet as a text fallback.

Workaround (applied locally)

Added verbose: true to the plugin's memmy_memory_search POST body plus a snippet fallback in the result formatter. Works against 2.1.7, but the file is app-managed (there is a plugin_integrity hash in the plugin config), so it may be overwritten on the next regeneration — hence this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions