vibecoded — this entire plugin was built through a conversation with opencode. No manual coding involved.
A /btw command plugin for opencode that replicates the spirit of Claude Code's /btw feature — ask a quick side question without interrupting your main task.
When you're in the middle of a conversation with opencode and a random question pops into your head, type /btw followed by your question. It runs as a subtask with recent conversation context injected, so the answer is informed by what you're already working on.
/btw what does the bash tool do in this codebase?
/btw remind me, what's the difference between plan and build agents?
/btw how many golf balls fit in a jetta?
The answer appears inline in your chat as a subtask result, and your main session continues uninterrupted.
This plugin has two parts:
-
Command (
commands/btw.md) — Registers/btwas a custom command that runs as a subtask using thegeneralagent. This means it gets its own child session and doesn't block your main conversation. -
Plugin (
plugins/btw.ts) — A server-side plugin that hooks intocommand.execute.before. When it detects a/btwcommand, it grabs the last 10 messages from your current session and injects them as context into the subtask, so the answer is informed by what you're working on.
Copy the files into your opencode config directory:
# Commands
cp commands/btw.md ~/.config/opencode/commands/
# Plugins (requires @opencode-ai/plugin dependency)
cp plugins/btw.ts ~/.config/opencode/plugins/If you don't already have the plugin SDK installed:
cd ~/.config/opencode
npm install @opencode-ai/plugin- opencode v1.3.13+
@opencode-ai/plugin(install via npm in your config directory)
Claude Code's /btw is a deeply integrated UI feature that spawns a truly parallel session while the main AI is still running. This plugin uses opencode's subtask system, which runs as a child session. It works great for asking questions while idle, but won't run concurrently if your main session is actively processing.
MIT