github mksglu/context-mode v1.0.140

one hour ago

v1.0.140

Observability fix for an OpenCode plugin + legacy MCP coexistence edge case that v1.0.137 began silently suppressing.

Fix

Silent MCP tool suppression now emits a one-shot diagnostic (#623). v1.0.137 added suppressMcpToolsForNativePluginHost (src/server.ts:200) — correct architectural decision to avoid duplicate tool registration when an OpenCode user has BOTH plugin: ["context-mode"] (native fast-path) AND legacy mcp.context-mode (MCP stdio) in opencode.json. The suppression was right; the silence was the bug — users mid-migration from v1.0.136 saw zero tools with no log line explaining why.

v1.0.140 emits a one-shot stderr diagnostic on the first suppressed registerTool call: clear ownership statement (plugin path active), action-oriented remediation (remove legacy mcp.context-mode from opencode.json), and a ctx_doctor cross-reference. Tool behavior is unchanged — pure observability. Closes #623.

Behavior matrix (verified via npm-published bundles + custom MCP probe)

Config v1.0.136 v1.0.137-139 v1.0.140
plugin only 11 tools 11 tools 11 tools
legacy mcp only 11 tools 11 tools 11 tools
plugin + legacy mcp 11 tools 0 tools (silent) 0 tools (with diagnostic)
no context-mode config 11 tools 11 tools 11 tools

Generic MCP hosts and the 14 non-OpenCode adapters were never affected — the regression scope is narrow but the silent fail was the trust hit.

Tests

1 new test in existing tests/core/server.test.ts (CONTRIBUTING L275 — no new test files): asserts diagnostic emitted exactly once on first suppressed registerTool, never on subsequent calls, and never when suppression is inactive.

258 server tests pass, 89 opencode plugin tests pass, full impacted suite preserves baseline.

Compatibility

15 adapters, 3 OS. No schema migration. engines.node >= 22.5.0 preserved.

Upgrade

npm install -g context-mode@latest
# Restart Claude Code (Cmd+Q + reopen)

If you hit the silent-suppression on v1.0.137-139, v1.0.140 will tell you exactly what to do: remove mcp.context-mode from opencode.json (the plugin: ["context-mode"] line is the new canonical path).

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.