OpenCode 2 v2.1.4: client-hosted MCP tools, background compaction#
Published by Alex Sorokoletov
Part of the OpenCode 2 Version Tracker series. | OpenCode on GitHub | OpenCode 2 docs
OpenCode 2 v2.1.4 follows v2.1.3. It adds experimental client-hosted MCP tools carried over a websocket (#57504), experimental background compaction summaries (#57444), and a CLI debug heap-dump command (#58252), alongside MCP fixes that make elicitation forms appear and provider handling that recognizes more context-overflow errors.
Client-hosted MCP tools (experimental)#
The documented model has OpenCode as the MCP client: you declare servers under mcp.servers and it connects out to them.[1] v2.1.4 adds the other direction as an experimental path. Core gains an MCP transport that runs over an incoming client socket (#57502), the client package gains a connectClientMcp helper for client-hosted MCP tools (#57504), and the server exposes a client MCP websocket endpoint (#57505). The TUI uses it to expose open_terminal over client MCP (#57506). The MCP SDK moves to 2.3.1 (#58232).
MCP forms and schemas#
Elicitation is the interactive case where an MCP server asks for input mid-call and OpenCode shows a form.[1] Those forms were never appearing; v2.1.4 fixes that (#58184) and shows them in the desktop and web apps as well (#58305). OpenCode also accepts MCP tools whose output schema is not a root object (#58224).
Background compaction summaries (experimental)#
v2.1.4 adds experimental background compaction summaries (#57444) and renames the precompute_compaction option to background_compaction, with documentation (#58294). Two fixes land in the same automatic-compaction path the config documents[2]: compaction transcripts are shortened oldest first before any history is dropped (#58015), and a compaction buffer that would leave the model no room is ignored (#58313).
Heap and memory captures#
A cluster of debugging tools lands for inspecting process memory:
- The CLI gains a
debug heap-dumpcommand (#58252). - The desktop app captures app and server heap snapshots into one folder (#58259).
- Desktop heap captures add a native memory breakdown (#58311).
Providers, models, and imports#
- Codex models that ChatGPT accounts reject are hidden (#58180).
- ChatGPT context caps move into a separate plugin (#58194).
- The AI layer recognizes more context-overflow errors (#57982).
- Agent files that carry V2 fields are read as V2 (#58218), and V1 global sessions are attributed during import (#56322).
A few more fixes: a vulnerable nested seroval is dropped from @solidjs/start (#58229), the TUI tells you to start OpenCode again after an update restart (#58139), and the AppImage executable name no longer ends in .desktop (#58263).
MCP tool hosting moves to the client side#
The MCP work in v2.1.4 points at tools that live where the user is. The documented model has OpenCode connecting out to servers; the new transport, client helper, websocket endpoint, and the TUI's open_terminal let a connected client host tools the server-side session can call. The elicitation fix extends the same interactive surface to every client, TUI, desktop, and web, rather than one of them.
The memory tooling and the compaction changes sit on the other side of that boundary, inside the long-lived process. A debug heap-dump command, desktop heap snapshots with a native memory breakdown, and background compaction summaries give the running server more to inspect and more to manage on its own. v2.1.4 adds surface at both ends of the client and server split OpenCode 2 is built on.
All trademarks and software referenced belong to their respective owners.
Sources#
- MCP client model and elicitation: OpenCode 2 docs, MCP servers.
- Automatic compaction: OpenCode 2 docs, config.
Previous OpenCode 2 analysis: v2.1.3 (October 22, 2026)
All 20 OpenCode 2 analyses: OpenCode 2 Version Tracker · Official OpenCode 2 changelog