Skip to content

Instantly share code, notes, and snippets.

@hjqcan
Created August 8, 2026 05:45
Show Gist options
  • Select an option

  • Save hjqcan/72a28bd3ac1b5aeffb00fd2f26bf86ec to your computer and use it in GitHub Desktop.

Select an option

Save hjqcan/72a28bd3ac1b5aeffb00fd2f26bf86ec to your computer and use it in GitHub Desktop.
OpenCode 1.18.15 × GoodMemory 0.7.2 maintainer-run acceptance evidence

OpenCode 1.18.15 × GoodMemory 0.7.2 acceptance evidence

Maintainer-run acceptance check performed on 2026-08-08. This checks the OpenCode/MCP integration boundary, not production-model quality or independent user adoption.

Environment

  • macOS 15.6.1 (arm64)
  • OpenCode 1.18.15, invoked as npx -y [email protected]
  • GoodMemory 0.7.2, invoked as npx -y [email protected]
  • Node.js 22.14.0
  • Bun 1.3.14
  • Isolated HOME, XDG config/data/cache, SQLite database, and two synthetic projects
  • Deterministic local OpenAI-compatible test model
  • --auto was used only inside the disposable test environment so the model could invoke MCP tools non-interactively

The published artifacts were verified immediately before the run:

  • npm version: 0.7.2
  • npm tarball: https://registry.npmjs.org/goodmemory/-/goodmemory-0.7.2.tgz
  • GitHub release: https://github.com/hjqcan/GoodMemory/releases/tag/v0.7.2

MCP configuration under test

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "goodmemory": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "[email protected]",
        "mcp",
        "serve",
        "--standalone",
        "--user-id",
        "opencode-e2e",
        "--allow-write",
        "--storage-url",
        "/tmp/goodmemory-opencode-e2e/goodmemory.sqlite"
      ],
      "enabled": true
    }
  }
}

The test model was configured as a custom OpenAI-compatible provider. The full deterministic server and opencode.json used for the run are included in this gist.

Observations

1. OpenCode connected to GoodMemory

opencode mcp list reported:

✓ goodmemory connected
npx -y [email protected] mcp serve --standalone --user-id opencode-e2e --allow-write --storage-url /tmp/goodmemory-opencode-e2e/goodmemory.sqlite

The model request exposed exactly these nine GoodMemory tools:

goodmemory_get_context
goodmemory_get_records
goodmemory_inspect_memory
goodmemory_read_artifacts
goodmemory_remember
goodmemory_search_index
goodmemory_stats
goodmemory_timeline
goodmemory_trace_recall

OpenCode prefixes them as goodmemory_goodmemory_* because the configured MCP server name is goodmemory.

2. First OpenCode session wrote one project decision

The model invoked goodmemory_goodmemory_remember with:

{
  "content": "The Orion service deployment strategy is blue-green deployment.",
  "cwd": "/tmp/goodmemory-opencode-e2e/project-a",
  "role": "user"
}

The tool result contained:

{
  "accepted": 1,
  "memoryIds": ["baa41cc9-ed8d-42ca-bb81-9955e88a10a3"],
  "scope": {
    "userId": "opencode-e2e",
    "workspaceId": "project-a"
  },
  "storage": { "provider": "sqlite" }
}

The SQLite document store contained one facts record whose content and scope matched the tool result.

3. A new OpenCode session in the same project recalled it

A separate opencode run created a different session ID and invoked goodmemory_goodmemory_get_context for the Orion deployment question. The tool returned:

Evidence: - The Orion service deployment strategy is blue-green deployment.
Facts: - The Orion service deployment strategy is blue-green deployment.

The returned scope was opencode-e2e / project-a.

4. A different project could not see the memory

The same GoodMemory SQLite database and user ID were reused from /tmp/goodmemory-opencode-e2e/project-b. goodmemory_get_context returned only the empty heading Developer memory notes: with scope opencode-e2e / project-b; it did not return the Orion fact.

5. Recall was explainable

Back in project A, goodmemory_trace_recall returned one fact candidate with:

{
  "returned": true,
  "lexicalScore": 0.6666666666666666,
  "reason": "scope_match",
  "sourceMethod": "explicit",
  "scope": {
    "userId": "opencode-e2e",
    "workspaceId": "project-a"
  }
}

The trace also linked the evidence record and reported deterministic rules-only routing because semantic search was unavailable in this isolated run.

Boundary of this evidence

This proves current package compatibility, MCP tool discovery, an explicit write, cross-session recall, project isolation, and recall tracing in OpenCode 1.18.15 on this environment. It does not prove automatic capture, native OpenCode hypothesis-loop detection, productivity improvement, Windows/Linux support, production-model behavior, or independent-user adoption.

import http from "node:http";
import fs from "node:fs";
const port = Number(process.env.PORT ?? "18081");
const logPath = process.env.LOG_PATH ?? "/tmp/goodmemory-opencode-e2e/requests.jsonl";
function event(response, value) {
response.write(`data: ${JSON.stringify(value)}\n\n`);
}
function finish(response, content) {
event(response, {
id: "chatcmpl-goodmemory-opencode-final",
object: "chat.completion.chunk",
created: Math.floor(Date.now() / 1000),
model: "goodmemory-opencode-mock",
choices: [{ index: 0, delta: { role: "assistant", content }, finish_reason: null }],
});
event(response, {
id: "chatcmpl-goodmemory-opencode-final",
object: "chat.completion.chunk",
created: Math.floor(Date.now() / 1000),
model: "goodmemory-opencode-mock",
choices: [{ index: 0, delta: {}, finish_reason: "stop" }],
});
response.end("data: [DONE]\n\n");
}
function toolCall(response, name, args) {
event(response, {
id: "chatcmpl-goodmemory-opencode-tool",
object: "chat.completion.chunk",
created: Math.floor(Date.now() / 1000),
model: "goodmemory-opencode-mock",
choices: [{
index: 0,
delta: {
role: "assistant",
tool_calls: [{
index: 0,
id: `call_${name}`,
type: "function",
function: { name, arguments: JSON.stringify(args) },
}],
},
finish_reason: null,
}],
});
event(response, {
id: "chatcmpl-goodmemory-opencode-tool",
object: "chat.completion.chunk",
created: Math.floor(Date.now() / 1000),
model: "goodmemory-opencode-mock",
choices: [{ index: 0, delta: {}, finish_reason: "tool_calls" }],
});
response.end("data: [DONE]\n\n");
}
const server = http.createServer((request, response) => {
if (request.method === "GET" && request.url === "/v1/models") {
response.writeHead(200, { "content-type": "application/json" });
response.end(JSON.stringify({ object: "list", data: [{ id: "goodmemory-test", object: "model" }] }));
return;
}
const chunks = [];
request.on("data", (chunk) => chunks.push(chunk));
request.on("end", () => {
let body;
try {
body = JSON.parse(Buffer.concat(chunks).toString("utf8") || "{}");
} catch {
response.writeHead(400, { "content-type": "application/json" });
response.end(JSON.stringify({ error: { message: "invalid JSON" } }));
return;
}
const tools = Array.isArray(body.tools) ? body.tools : [];
const toolNames = tools.map((tool) => tool?.function?.name).filter(Boolean);
const messages = Array.isArray(body.messages) ? body.messages : [];
const last = messages.at(-1);
const userText = messages
.filter((message) => message?.role === "user")
.map((message) => typeof message.content === "string" ? message.content : JSON.stringify(message.content))
.join("\n");
const mode = userText.includes("TRACE_TEST")
? "trace"
: userText.includes("RECALL_TEST")
? "recall"
: "remember";
fs.appendFileSync(logPath, `${JSON.stringify({
at: new Date().toISOString(),
url: request.url,
mode,
toolNames,
messageRoles: messages.map((message) => message?.role),
lastRole: last?.role,
})}\n`);
response.writeHead(200, {
"content-type": "text/event-stream",
"cache-control": "no-cache",
connection: "keep-alive",
});
if (last?.role === "tool") {
finish(response, mode === "remember" ? "The durable write completed." : `The ${mode} tool completed.`);
return;
}
if (mode === "trace") {
const name = toolNames.find((value) => value.includes("goodmemory_trace_recall"));
if (!name) {
finish(response, "GoodMemory trace_recall was unavailable.");
return;
}
toolCall(response, name, {
query: "Which deployment strategy was selected for the Orion service?",
cwd: process.env.PROJECT_CWD,
});
return;
}
if (mode === "recall") {
const name = toolNames.find((value) => value.includes("goodmemory_get_context"));
if (!name) {
finish(response, "GoodMemory get_context was unavailable.");
return;
}
toolCall(response, name, {
query: "Which deployment strategy was selected for the Orion service?",
cwd: process.env.PROJECT_CWD,
});
return;
}
const name = toolNames.find((value) => value.includes("goodmemory_remember"));
if (!name) {
finish(response, "GoodMemory remember was unavailable.");
return;
}
toolCall(response, name, {
content: "The Orion service deployment strategy is blue-green deployment.",
cwd: process.env.PROJECT_CWD,
role: "user",
});
});
});
server.listen(port, "127.0.0.1", () => {
process.stdout.write(`mock provider listening on http://127.0.0.1:${port}/v1\n`);
});
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"goodmemory-test": {
"npm": "@ai-sdk/openai-compatible",
"name": "GoodMemory deterministic acceptance model",
"options": {
"baseURL": "http://127.0.0.1:18081/v1",
"apiKey": "test-only"
},
"models": {
"goodmemory-test": {
"name": "GoodMemory deterministic acceptance model"
}
}
}
},
"mcp": {
"goodmemory": {
"type": "local",
"command": [
"npx",
"-y",
"[email protected]",
"mcp",
"serve",
"--standalone",
"--user-id",
"opencode-e2e",
"--allow-write",
"--storage-url",
"/tmp/goodmemory-opencode-e2e/goodmemory.sqlite"
],
"enabled": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment