fix(opencode): empty repo .opencode/opencode.json — disabled flag ignored, removed mcp block entirely - #110
Conversation
…riding user wrapper The previous `enabled: false` approach (PR #108) didn't work in practice. opencode appears to merge the repo-level and user-level MCP entries by name; the repo entry's `command` overrides the user-level one even when `enabled` is set to false. Symptom: the user-level wrapper at `~/.config/opencode/opencode.jsonc` points at the daemon-routed `mempalace-mcp-wrapper.sh`. The repo-level entry pointed at `.venv/bin/python -m mempalace.mcp_server`. Opencode's log on session start shows the local palace getting opened with 'mempalace-mcp: routing → local palace @ /home/jp/.mempalace/palace' and the HNSW capacity divergence warning — meaning the repo's local-spawn command won despite enabled=false. Strip the `mcp` block from the repo config entirely. The user-level wrapper handles daemon routing. Contributors who don't have a daemon can add their own user-level config or re-add the entry under `.opencode/opencode.local.json` (gitignored). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where the repository-level MCP configuration was overriding user-level settings despite the 'enabled: false' flag. By removing the mcp block entirely, the configuration now correctly defers to the user-level wrapper, preventing contention and resolving HNSW capacity divergence warnings during session startup. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
…merges (#112) Five PRs landed today that didn't have YAML entries yet; CLAUDE.md + README still referenced the pre-transfer jphein/mempalace ownership; the opencode integration recipe didn't cover the two gotchas that bit us tonight (npm-vs-opencode-cache patch target; the "looks like an error" stderr lines from local-palace spawns). YAML additions (newest first): - local-palace-retired-marker (#111 — 798cf14) - opencode-repo-config-empty-mcp (#110 — 7133eee) - opencode-repo-mcp-drop-comment-key (#109 — 637bb01) - opencode-repo-mcp-disable-flag (#108 — 47018e5; superseded by #110) - mcp-stub-resources-prompts-list (#107 — 6ca0670) CLAUDE.md changes: - Fork URL: `jphein/mempalace` → `techempower-org/mempalace` - Origin/upstream line reflects the May 2026 transfer - Palace data section: local palace is retired; production lives in postgres on disks.jphe.in - Python venv: `./venv/` → `./.venv/` (uv convention) - Issue tracker links updated to techempower-org README.md changes: - Quickstart and `Open upstream PRs` table use techempower-org URLs docs/integrations/opencode.md changes: - New "Patch target gotcha" subsection: opencode caches plugins under ~/.cache/opencode/packages/ independently of the global npm install; patches must apply there. - New "What 'looks like an error' but isn't" verification subsection listing the three stderr lines that surfaced today during debug. - New "If you see a different palace count" troubleshooting block: palace-count divergence between MCP and CLI usually means an old shell without PALACE_DAEMON_URL; on this fork the local palace is retired so the CLI now refuses with the marker text. FORK_CHANGELOG.md regenerated via scripts/render-docs.py. check-docs.sh clean (29 fork hash refs resolve; only existing MemPalace#1024 pr_state warning, unchanged). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
PR #108 set the repo-level MCP entry's `enabled` to false to avoid spawning a second mempalace MCP server alongside the user-level daemon-routed wrapper. That didn't work — opencode merges repo + user configs by entry name, and the repo `command` keeps overriding the user one even with `enabled: false`.
Confirmed by reading opencode's session log post-#108-merge: `mempalace-mcp: routing → local palace @ /home/jp/.mempalace/palace` + the HNSW capacity divergence warning, meaning the repo's local-spawn was the one that actually ran.
Strip the `mcp` block from the repo config entirely. User-level wrapper now handles daemon routing without contention. Contributors who don't have a daemon set up can add their own user-level config or a `.opencode/opencode.local.json` (already gitignored).
Test plan
Follow-up
The right long-term fix is upstream support for `enabled: false` actually meaning "don't merge this entry's command." Worth filing on opencode but out of scope here.
🤖 Generated with Claude Code