You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workaround for the v2 incompatibility, until the extension ships a fix (or a configurable command, as suggested above).
The extension launches the TUI with vscode.window.createTerminal(...) + sendText("opencode --port <port>"), i.e. it types the command into an interactive shell, so a shell function in ~/.zshrc can rewrite it. It has to be a function, not an alias: alias expansion only replaces the first word, so alias opencode='opencode serve' would also mangle every opencode run … / opencode api … call.
# ~/.zshrc — workaround for sst-dev.opencode (v0.0.13) on opencode v2opencode() {
if [[ "$1"=="--port" ]];thenshift 2 # v2 removed --port; attach to the shared background serviceficommand opencode "$@"
}
Verified on opencode v2.0.18 (macOS, zsh, extension v0.0.13):
A setting to override the launched command (previous comment) plus a shared-service/--standalone choice would be the proper fix.
Reacted by rp86, André Claudino, Ash McKenzie, Maimez and jubeater
Activity
devharshthakur commentedon Sep 26, 2026
at lest gives us a vscode extension setting to tweak the command ourselves for such cases
devharshthakur commentedon Sep 26, 2026
Workaround for the v2 incompatibility, until the extension ships a fix (or a configurable command, as suggested above).
The extension launches the TUI with
vscode.window.createTerminal(...)+sendText("opencode --port <port>"), i.e. it types the command into an interactive shell, so a shell function in~/.zshrccan rewrite it. It has to be a function, not an alias: alias expansion only replaces the first word, soalias opencode='opencode serve'would also mangle everyopencode run …/opencode api …call.Verified on opencode v2.0.18 (macOS, zsh, extension v0.0.13):
A setting to override the launched command (previous comment) plus a shared-service/
--standalonechoice would be the proper fix.