Sidekick - OpenCode
Launches OpenCode as a live call companion when Tuple transcription starts. Opens a terminal running `tuple connect --harness opencode`, which gives OpenCode the call context and points it at the live transcript.
Launches OpenCode as a live companion on your Tuple call when transcription starts.
When call-transcription-started fires, this trigger opens your preferred terminal and runs tuple connect --harness opencode. Connect resolves the call state, gives OpenCode a context prompt, and points it at the live transcript — so OpenCode catches up on everything said so far, then watches the call as it happens and acts as a sharp third pair.
What it does
tuple connect brings OpenCode into the call and tells it how to follow along, using the tuple CLI's own transcript stream (tuple transcription show --wait). Guided by connect's prompt, OpenCode:
- Logs the call live — a one-line
·play-by-play on each batch of new transcript, so you can follow along at a glance. - Chimes in when it matters — a real interjection for a bug it can see, an ambiguous decision or action item, a correction, or a direct question.
- Answers when addressed — say "OpenCode, ..." (or type into the terminal) and it responds, then keeps listening.
- Summarizes — a checkpoint when recording stops, and a final summary (decisions, action items, open threads) when the call ends.
Because the trigger just hands off to tuple connect, there's nothing call-format-specific in it: how OpenCode reads the call lives in connect's prompt, in the CLI. Nothing is hard-coded about the model either — OpenCode uses whatever you have configured.
Choosing your terminal
By default the trigger opens your system's default handler for .command files. To force a specific terminal, set PREFERRED_TERM at the top of call-transcription-started (or in the environment):
PREFERRED_TERM="iterm" # ghostty | iterm | alacritty | terminal
The terminal runs launch-sidekick-opencode.command, whose #!/bin/zsh -li shebang sources your shell profile, so tuple and opencode resolve from the same PATH you get in a normal terminal.
Prerequisites
- macOS
- OpenCode installed so
opencodeworks in a new terminal - The
tupleCLI on your interactive shell PATH (withconnectandtranscriptionsupport)- Install it from the Tuple app: its Transcription settings have an Install button that links
tupleonto your PATH.
- Install it from the Tuple app: its Transcription settings have an Install button that links
- Tuple transcription enabled for the call
Installation
Drop this directory into your Tuple triggers folder:
~/.tuple/triggers/sidekick-opencode/
The trigger fires the next time call transcription starts.
How it works
call-transcription-started fires with no call-specific arguments. This trigger:
- Creates a working directory per start,
${TMPDIR:-/tmp}/tuple-sidekick-opencode/<timestamp>-<pid>. - Writes an executable
launch-sidekick-opencode.commandwrapper into it. - Opens it in your preferred terminal via
open(LaunchServices). No AppleScript and no direct binary launch, so it triggers no macOS accessibility prompt and no stray windows. - The wrapper starts a login-interactive zsh,
cds to that directory, and runstuple connect --harness opencode.
There is no dedup: each transcription-start gets its own directory, so stopping and restarting transcription spawns a fresh companion while older ones keep running.
For local testing without opening a terminal, set SIDEKICK_OPENCODE_DRY_RUN=1; it writes the launcher and exits.