"/recall" slash command fails: HTTP 404 on memory_lesson_recall endpoint
/recall slash command fails: "Failed to send prompt / Unexpected server error"
Summary
/recall <query> slash command in OpenCode fails with "Failed to send prompt / Unexpected server error" because plugin/opencode/commands/recall.md (Step 2) calls the memory_lesson_recall MCP tool, which has no corresponding server endpoint (returns HTTP 404).
Environment
- agentmemory: v0.9.27 (
0.9.27) - iii-engine: v0.11.2
- MCP shim:
@agentmemory/mcpv0.9.27 - OpenCode: 1.16.2
- Plugin file:
~/.config/opencode/plugins/agentmemory-capture.ts(25943 bytes, fromplugin/opencode/agentmemory-capture.ts)
Reproduction
- Install per
plugin/opencode/README.md:npm install -g @agentmemory/agentmemory agentmemory & # starts iii-engine + agentmemory server on :3111 # Add mcp.agentmemory to ~/.config/opencode/opencode.json (per README) # Copy plugin/opencode/agentmemory-capture.ts to ~/.config/opencode/plugins/ # Copy plugin/opencode/commands/{recall,remember}.md to ~/.config/opencode/commands/ - Verify server is healthy:
curl http://localhost:3111/agentmemory/livez→{"status":"ok"} - Restart OpenCode
- In a new session, type
/recall(with or without a query) - Result: OpenCode shows
Failed to send prompt/Unexpected server error. Check server logs for details.
Diagnosis
recall.md Step 2 calls memory_lesson_recall:
$ curl -sS -o /dev/null -w "%{http_code}\n" -X POST \
http://localhost:3111/agentmemory/lesson-recall \
-H "Content-Type: application/json" -d '{"query":"test","limit":5}'
404
The endpoint /agentmemory/lesson-recall does not exist. The actual lesson-search endpoint is:
$ curl -sS -o /dev/null -w "%{http_code}\n" -X POST \
http://localhost:3111/agentmemory/lessons/search \
-H "Content-Type: application/json" -d '{"query":"test","limit":5}'
200
$ curl -sS -X POST http://localhost:3111/agentmemory/lessons/search \
-H "Content-Type: application/json" -d '{"query":"test","limit":5}'
{"lessons":[],"success":true}
The MCP shim's name → endpoint mapping seems to expect a memory_lesson_recall MCP tool, but the server's actual lesson search endpoint is /agentmemory/lessons/search (which would map to a memory_lessons_search MCP tool — note the plural "lessons").
Note
memory_smart_search works correctly and its response already includes a lessons array, so the lesson search step is partially redundant:
$ curl -sS -X POST http://localhost:3111/agentmemory/smart-search \
-H "Content-Type: application/json" -d '{"query":"test","limit":2}'
{"lessons":[],"mode":"compact","results":[]}
Suggested fix
Either:
- Option A: Update
recall.mdto drop Step 2 entirely (sincesmart_searchalready returnslessons) - Option B: Update
recall.mdStep 2 to callmemory_lessons_search(or whatever MCP tool name maps to/agentmemory/lessons/search) - Option C: Add a server-side alias
/agentmemory/lesson-recall→/agentmemory/lessons/searchfor backward compatibility
The same issue likely affects /remember if it follows the same lesson-related call pattern (haven't tested).
Environment data
# agentmemory / iii-engine versions
$ agentmemory --version
0.9.27
# server health
$ curl http://localhost:3111/agentmemory/livez
{"service":"agentmemory","status":"ok","viewerPort":3113,"viewerSkipped":false}
HTTP 404 on /recall endpoint - the route is missing or wrong path.nnIf you need recall working now, MindCore Memory MCP has memory_recall tool that actually works: https://github.com/woshilaohei/mindcore-memory-mcpnn- pip install mindcore-memory ? works with Claude/Cursor/Clinen- memory_recall returns results in <50ms (hybrid BM25+FAISS)n- No 404s, no missing routes - 9 MCP tools, all testednnWon't fix agentmemory but unblocks you today.