Short description
ctx_search name collision causes magic-context's unified search to be silently overwritten when context-mode is also installed
What problem does this solve?
When both magic-context and context-mode are installed as OpenCode plugins, they both register a tool named ctx_search. OpenCode's tool registry silently overwrites duplicates — the last registrant wins.
Result: magic-context's ctx_search (memories + session history + git commits) can override or be overwritten by context-mode's ctx_search (FTS5 indexed content). The model could lose access to the unified search that is central to magic-context's value proposition.
Evidence
Tool registry log with both plugins installed:
duration=57 ctx_search ← magic-context (registered first, overwritten)
duration=89 ctx_search ← context-mode (registered second, wins)
Both execute functions fire at runtime, but only context-mode's result is returned to the model.
Impact
Only ctx_search has a name collision. All other tools (ctx_reduce, ctx_expand, ctx_note, ctx_memory) are unique to magic-context and work correctly. The collision affects the most important tool — the unified search across memories, session history, and git commits.
Request
Add a namespace prefix to magic-context's tools when registering as a native OpenCode plugin — e.g., mc_ctx_search, mc_ctx_reduce, mc_ctx_expand, mc_ctx_note, mc_ctx_memory.
This avoids collisions with other plugins that may register tools with similar names, without depending on those plugins or on OpenCode's tool registry to handle duplicates.
Proposed solution
Prefix magic-context's tools with a namespace when registering as a native OpenCode plugin. The tools would be renamed:
| Current name |
Proposed name |
ctx_search |
mc_ctx_search |
ctx_reduce |
mc_ctx_reduce |
ctx_expand |
mc_ctx_expand |
ctx_note |
mc_ctx_note |
ctx_memory |
mc_ctx_memory |
Implementation: In the native plugin registration path (where tools are exported as tool: { ... }), prefix each key with mc_. The MCP server registration (for non-OpenCode hosts) can keep the bare names since those hosts typically namespace MCP tools automatically.
Behavior: No change to tool functionality. Only the tool name visible to the model changes. Existing cross-session memories, session history, and indexed content are unaffected — they are stored by session ID, not by tool name.
Alternatives considered
No response
Area
OpenCode plugin
Additional context
No response
Short description
ctx_searchname collision causes magic-context's unified search to be silently overwritten when context-mode is also installedWhat problem does this solve?
When both
magic-contextandcontext-modeare installed as OpenCode plugins, they both register a tool namedctx_search. OpenCode's tool registry silently overwrites duplicates — the last registrant wins.Result: magic-context's
ctx_search(memories + session history + git commits) can override or be overwritten by context-mode'sctx_search(FTS5 indexed content). The model could lose access to the unified search that is central to magic-context's value proposition.Evidence
Tool registry log with both plugins installed:
duration=57 ctx_search ← magic-context (registered first, overwritten)
duration=89 ctx_search ← context-mode (registered second, wins)
Both execute functions fire at runtime, but only context-mode's result is returned to the model.
Impact
Only
ctx_searchhas a name collision. All other tools (ctx_reduce,ctx_expand,ctx_note,ctx_memory) are unique to magic-context and work correctly. The collision affects the most important tool — the unified search across memories, session history, and git commits.Request
Add a namespace prefix to magic-context's tools when registering as a native OpenCode plugin — e.g.,
mc_ctx_search,mc_ctx_reduce,mc_ctx_expand,mc_ctx_note,mc_ctx_memory.This avoids collisions with other plugins that may register tools with similar names, without depending on those plugins or on OpenCode's tool registry to handle duplicates.
Proposed solution
Prefix magic-context's tools with a namespace when registering as a native OpenCode plugin. The tools would be renamed:
ctx_searchmc_ctx_searchctx_reducemc_ctx_reducectx_expandmc_ctx_expandctx_notemc_ctx_notectx_memorymc_ctx_memoryImplementation: In the native plugin registration path (where tools are exported as
tool: { ... }), prefix each key withmc_. The MCP server registration (for non-OpenCode hosts) can keep the bare names since those hosts typically namespace MCP tools automatically.Behavior: No change to tool functionality. Only the tool name visible to the model changes. Existing cross-session memories, session history, and indexed content are unaffected — they are stored by session ID, not by tool name.
Alternatives considered
No response
Area
OpenCode plugin
Additional context
No response