A BTW (by the way) side-conversation plugin for OpenCode. Inspired by pi-btw.
Ask parallel side questions in isolated sessions without polluting your main agent context.
Each /btw command creates (or reuses) a dedicated sub-session. Questions are answered by a focused assistant that optionally receives the recent main session context for background. The main agent never acts on BTW exchanges unless you explicitly inject them.
Local (project-level):
Copy src/index.ts to .opencode/plugins/btw.ts in your project, then install deps:
cd .opencode && bun add @opencode-ai/plugin @opencode-ai/sdkGlobal:
cp src/index.ts ~/.config/opencode/plugins/btw.ts
cd ~/.config/opencode && bun add @opencode-ai/plugin @opencode-ai/sdkNPM (once published):
// opencode.json
{
"plugin": ["opencode-btw"]
}| Command | Description |
|---|---|
/btw <question> |
Ask a side question. Result stored in BTW thread. |
/btw --save <question> |
Ask and immediately inject the Q&A into main context. |
/btw:new <question> |
Clear current thread and start fresh. |
/btw:tangent <question> |
Ask a contextless question (no main session context passed). |
/btw:inject [instructions] |
Inject full BTW thread into main session as context. |
/btw:summarize [instructions] |
Summarize BTW thread and inject summary into main session. |
/btw:clear |
Discard the current BTW thread. |
/btw |
Show status of active BTW thread. |
# Ask a quick side question while working on a feature
/btw what's the difference between ReadableStream and AsyncIterator in Node 20?
# Continue main work ... later, when it's relevant:
/btw:inject
# Or get a concise summary injected
/btw:summarize focus on the performance implications
| Feature | pi-btw | opencode-btw |
|---|---|---|
| TUI modal overlay | ✅ | ❌ (no plugin TUI API in OpenCode) |
| Isolated sub-session | ✅ | ✅ |
| Main context inheritance | ✅ | ✅ |
| Tangent mode | ✅ | ✅ |
| Thread persistence (reload) | ✅ | ❌ (in-memory only) |
| Inject / summarize | ✅ | ✅ |
| Model/thinking override | ✅ | ❌ (use opencode model picker) |