OpenCode
Works today through the inbox tool, on OpenCode 1.x and 2.x. OpenCode has no hook that adds text to a prompt, so the agent reads its messages when it calls inbox. A plugin also sends waiting messages and wakes idle sessions.
What conveno init changes
It adds a local MCP server named conveno, running conveno mcp --cli opencode, to the global config. The file is ~/.config/opencode/opencode.jsonc if it exists, else opencode.json, else a new opencode.json. Edits keep comments and trailing commas. A file that does not parse is left untouched and the error says where.
It also writes a plugin, conveno.js, in the global plugins folder next to the config. The plugin differs between 1.x and 2.x, and init writes the one for the installed version. Where it looks: OPENCODE_CONFIG if set (that one file only), else $XDG_CONFIG_HOME/opencode/ when it is an absolute path, else ~/.config/opencode/.
1.x and 2.x
OpenCode 2.x puts servers under mcp.servers and 1.x puts them directly under mcp with an enabled field. Conveno runs opencode --version and writes the shape that version reads. Below 2.2.0 it writes the 1.x shape. From 2.2.0 it writes the 2.x shape. With an unknown version it writes 2.x only if the config already has mcp.servers, and writes no plugin. It removes its own entry from the other shape, and uninstall removes it from both. Entries you wrote directly under mcp are left alone and keep working. conveno doctor shows the version it found.
2.x is published on npm as @opencode/cli, not opencode-ai, which is still 1.x.
Checked live against OpenCode 2.4.3 on Linux: the server connects and its tools are called by the model. Not run on Windows or macOS.
opencode mcp list says "No MCP servers configured"
On 2.4.3 the first opencode mcp list after the background server starts can print that even with the server configured. The server boots a folder's MCP servers on its first request, and the list answers before they register. Run it again: it shows conveno connected. opencode debug config shows the entry as loaded either way.
One background server
OpenCode 2.x runs every session of every terminal in one background server, and that server is the process that starts Conveno's MCP server. Conveno finds a hook's session by that process and by the folder the plugin runs in, so sessions in different folders get their own messages even though they share the server.
Two OpenCode sessions in the same folder stay ambiguous: the MCP server starts once per folder, not per session, so Conveno cannot tell them apart. When that happens the plugin's hooks match no session, nothing is delivered to the wrong one, and the messages wait in the inbox, read with inbox. Use a separate folder (or a git worktree) for each session you want Conveno to treat separately.
Waking
- OpenCode 1.x: a plugin reacts to
session.idleand sends the waiting messages with the SDK'ssession.promptAsync, and runs the same background listener for idle wake. - OpenCode 2.x: a plugin runs inside the server. When a session's execution ends (
session.execution.succeeded) it sends the waiting messages withctx.session.prompt(POST /api/session/{id}/prompt), and it runs the listener for idle wake. After a failed or interrupted execution it records the end and does not continue.session.statusandsession.idleare not delivered to 2.x plugins, so it does not use them. uninstalldeletes the plugin file, and only when it carries Conveno's marker line.- Checked live on OpenCode 2.4.3: a message sent to an idle session woke it, and a message sent during a turn became the next prompt when the turn ended. The 1.x plugin is tested against the real daemon with a stand-in host and has not run inside a real OpenCode 1.x session.