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
{{ message }}
Repository navigation
Terminal tab not renamed to opencode when launched manually in VS Code integrated terminal, breaking Cmd+Option+K file reference hotkey #27678
When running opencode manually in VS Code's integrated terminal (typing opencode directly, not via the extension's Cmd+Esc launcher), the terminal tab stays named "zsh" instead of being renamed to "opencode". This prevents the Cmd+Option+K file reference hotkey from working because the extension identifies opencode terminals by checking terminal.name === "opencode" (see sdks/vscode/src/extension.ts:35).
Root cause
The bin/opencode entry point is a Node.js wrapper (#!/usr/bin/env node) that uses child_process.spawn() to launch the compiled opencode binary as a child process, keeping the node wrapper alive as a signal forwarder:
zsh → node (wrapper) → opencode (compiled binary)
VS Code's terminal process detection reads the binary filename from the OS process table (via ps/kern_proc). It sees the direct child of zsh as node, not opencode. Since the compiled binary is a grandchild, VS Code never detects it.
This is the same underlying issue as #10993 — Cmd+Option+K fails because the extension checks terminal.name === TERMINAL_NAME and the name never becomes "opencode".
Proposed fix
Replace the Node.js wrapper with a POSIX shell script that execs directly into the compiled binary. On Unix, exec replaces the calling process with the target binary, so the OS process table shows opencode as the direct child of zsh:
zsh → opencode (compiled binary, via exec)
The change is:
bin/opencode becomes a ~25-line POSIX shell script that resolves the binary path and execs into it
bin/opencode-resolve (new) — the existing Node.js detection logic (platform/AVX2/musl), outputs the resolved binary path to stdout instead of spawning+forwarding signals
bin/opencode.cmd (new) — Windows fallback using the Node.js resolver
I have this working locally — confirmed that running the compiled binary directly renames the VS Code terminal tab to "opencode", and Cmd+Option+K works as expected.
Plugins
Official OpenCode Extension
Steps to reproduce
Open VS Code integrated terminal (Ctrl+`)
Type opencode (do NOT use Cmd+Esc)
Observe terminal tab stays "zsh"
Open a file, highlight a line, press Cmd+Option+K
Nothing happens — file reference is not sent to the terminal
If this is a distinct issue (specifically tracking the bin/opencode Node.js wrapper process naming fix), it may be worth cross-linking these rather than opening a new report.
Activity
github-actions commentedon May 15, 2026
This issue might be a duplicate of existing issues. Please check:
If this is a distinct issue (specifically tracking the
bin/opencodeNode.js wrapper process naming fix), it may be worth cross-linking these rather than opening a new report.Noitidart commentedon May 15, 2026
PR with fix opened here - #27679
github-actions commentedon Jul 15, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.