Repository navigation
v0.1.0
opencode2-todo v0.1.0
OpenCode V2 plugin that restores the todowrite tool and shows a live todo list in the session sidebar. V2 only — requires opencode2 (the V2 runtime) and is not compatible with opencode v1. It uses only the V2 @opencode-ai/plugin Promise and TUI APIs (Plugin.define, ctx.tool.transform, context.ui.slot).
Install
From npm (package published to opencode2-todo):
npm install opencode2-todoThen add it to the plugins array in your opencode config (opencode.json or .opencode/opencode.json):
{ "plugins": ["opencode2-todo"] }Local development (clone the repo, reference by absolute path; opencode2 loads src/index.ts directly, no build step):
{ "plugins": ["/absolute/path/to/opencode2-todo-tool/opencode2-todo"] }Enable / disable
The plugin is enabled by default. Three sanctioned ways to change that:
-
Options flag — disable the whole plugin:
{ "plugins": [{ "package": "opencode2-todo", "options": { "enabled": false } }] } -
Disable directive — disable by plugin id
opencode2.todo:{ "plugins": ["-opencode2.todo"] } -
Permissions deny — keep the tool registered but block the model from running it:
{ "permissions": [{ "action": "todowrite", "resource": "*", "effect": "deny" }] }
The first two remove the tool entirely; the third leaves it visible but denied.
TUI visibility (partial — honesty note)
The sidebar list shows todos for the active session, derived from the session transcript's todowrite tool metadata. It is not a persistent always-visible dock: it depends on the session being active and its messages being synced into the TUI.
This is an honest limitation of the V2 plugin surface. Plugins cannot re-create the native desktop dock, the todo.updated projection, or the /api/todo endpoint that V1 shipped. A future todoread or public API could surface the server-persisted per-session list directly; today the sidebar reads the same data back through the transcript.
No todoread
This plugin provides only todowrite. There is intentionally no todoread tool — read-back is via the sidebar or the session transcript.
Known limitations
- TUI is partial — the sidebar reads todos from the transcript, not from the per-session store directly.
- Requires opencode2 with TypeScript plugin loading (no pre-compiled bundle is shipped).
- Store not yet consumed directly — the server writes a full per-session
todos/<sessionID>store, but the current sidebar does not consume it directly yet; it sees the same data via the transcript.
License
MIT