OpenCode Plugin
Every AI tool makes you wait your turn. Wait for the LLM to stop talking. Then correct it. Then restate everything it missed. Interrupt changes that. Speak when you want — the LLM catches what it was saying, pivots with full context, and keeps going. No waiting. No repeating. No turn boundaries.
Without interrupt — model never hears you
you actually make it recursive
model ...prev, curr, and next. You initialise prev as None, curr as head, then...
↪ The model finishes explaining iterative. It never heard "recursive." Now you have to restate everything.
With interrupt — clean mid-sentence pivot
you actually make it recursive
interrupt captured · context injected with partial response
model Recursive approach: base case when node is None. Recurse on the rest, update the next pointer...
↪ The model pivoted mid-sentence. It knows exactly what it was saying and where to redirect.
Live demo
What you get
Free
Voice overlap detection
Monitors microphone RMS via sox while OpenCode speaks. When you talk over the response, captures the partial answer and injects context. Works out of the box.
Free
Token savings
Interrupting mid-response means no wasted tokens on restating context. The model pivots directly from where it was cut off — fewer tokens per turn, lower latency.
Free
Privacy-first
All audio processing is local — no audio or conversation data ever leaves your machine. The only outbound call is license validation.
Pro
Full configuration
Adjust mic threshold, monitor silence duration, TTS estimation rate, timing window, and trigger words. Debug mode for verbose logging.
Pro
Debug logging
See every RMS reading, TTS start/end, and injection decision in real time. Essential for tuning thresholds to your mic and environment.
Pro
Polar.sh license key
Activates on first run, validates at each startup, 7-day offline grace period. Up to 3 machine activations per license. One-time $29.
~30%
Tokens saved per interrupt — no need to restate context
0
Context restatements needed. The model catches up mid-sentence.
10×
Mic samples per second. Zero impact on OpenCode performance.
How it works
Voice interrupt — free
TTS starts playing
Plugin hooks the speak tool call, records TTS content, estimates duration. State → TTS_PLAYING.
Mic monitor runs in background
A sox child process samples RMS energy 10× per second. Runs continuously — zero impact on OpenCode performance.
Voice detected during TTS
RMS crosses threshold while TTS_PLAYING → state moves to INTERRUPTED. Partial TTS captured at that moment.
Context injected via system prompt
experimental.chat.system.transform injects the partial content and source before the model sees your next message.
Natural mid-sentence pivot
Feels like interrupting a colleague. No turn boundaries. No stop button. Just speak.
Voice architecture
interrupt sits between your voice plugins and the model. It does not replace speech-opencode or opencode-voice — it bridges them. sox is likely already on your machine. No additional dependencies needed.
Made for the way you work
Voice users
You speak to OpenCode all day. Interrupt makes conversations feel natural — speak over it mid-response and the model catches up with full context. No more waiting for it to finish.
TTS-heavy workflows
You rely on spoken output. When you need to redirect mid-explanation, interrupt captures exactly what was said and delivers context to the next turn. Like cutting in during a conversation.
Developers
Pair programming with the AI? When the model goes down the wrong path mid-sentence, just speak up. It pivots with full context — no wasted back-and-forth retracing steps.
Pricing
Free
$0
Voice interrupt with defaults — no license needed
Pro
$29
One-time · No subscription · 3 machines
Checkout via Polar.sh · Key emailed instantly
Installation
Install sox
The voice monitor uses sox for microphone RMS sampling. Install it:
Add the plugin to opencode.json
No npm install needed — OpenCode downloads plugins automatically.
Just add the entry to opencode.json in your project root or ~/.config/opencode/opencode.json:
Restart OpenCode
Kill the session and run opencode. OpenCode downloads
the plugin from npm and loads it. Free mode activates automatically.
Required — also add these for voice detection
Voice overlap requires a speech-input plugin (mic → text) and a TTS plugin (text → speech).
speech-opencode handles mic input. opencode-voice handles TTS output.
interrupt sits between them and catches the moment you speak over the AI.
Install sox
Same as free tier — required for mic monitoring.
Buy a license
Purchase at Polar.sh → You'll receive a license key by email.
Add plugin with licenseKey
No npm install needed. Same npm package, just add the licenseKey option:
Restart OpenCode
On first boot you'll see license validation and the mic monitor starting:
Pro configuration options
FAQ
Let Claude, ChatGPT, or Perplexity explain why interrupt might save you tokens and make your OpenCode voice sessions feel natural.