Repository navigation
Description
Bug report: VS Code extension (sst-dev.opencode-v2) incompatible with CLI v2.0.10
Summary
The VS Code extension sst-dev.opencode-v2 v0.1.1 (latest on the marketplace, no newer pre-release) cannot open its panel when used with CLI v2.0.10: it fails with Failed to open OpenCode panel: Timeout waiting for server to start after 15000ms. There are two independent incompatibilities between the extension and the current opencode serve output/behavior.
Environment
- opencode version: 2.0.10 (channel: latest)
- Extension: sst-dev.opencode-v2 v0.1.1 (latest published)
- OS: Linux Vostro-15 7.0.0-31-generic bug? Denying a tool call will continue generation #31~24.04.1-Ubuntu x86_64
- Terminal: TERM_PROGRAM=vscode, TERM=xterm-256color, COLORTERM=truecolor
- Shell: /bin/bash
- Install/channel: latest
- Active plugins: none found in config
Reproduction
- Install opencode CLI v2.0.10 and the
sst-dev.opencode-v2extension (v0.1.1) in VS Code. - Open any workspace and run the "OpenCode: Open OpenCode Assistant" command (or click the panel).
- The extension spawns
opencode serve --hostname=127.0.0.1 --port=4096and waits for a stdout marker. - After 15s:
Failed to open OpenCode panel: Timeout waiting for server to start after 15000ms.
Expected Behavior
The extension's spawn helper should detect that the server is listening and the panel should connect to it.
Actual Behavior
Issue 1 — stdout marker mismatch (causes the reported timeout).
opencode serve in v2.0.10 prints:
server listening on http://127.0.0.1:4096
server password <random>
but the extension's bundled spawn helper waits for a line that starts with opencode server listening:
for (let o of lines)
if (o.startsWith("opencode server listening")) { /* parse url */ }The marker never matches, so the promise rejects after the 15s timeout even though the server is up and serving (log shows GET / → 401 from the spawned process while the extension is still waiting).
Issue 2 — server requires Basic auth, extension never sends credentials.
opencode serve (v2.0.10) enforces HTTP Basic auth on all endpoints, with a random password printed on stdout when OPENCODE_SERVER_PASSWORD is unset:
$ opencode serve --hostname 127.0.0.1 --port 4455
server listening on http://127.0.0.1:4455
server password zNAK...
$ curl -w '%{http_code}\n' http://127.0.0.1:4455/api/info
HTTP 401
$ curl -u opencode:<password> -w '%{http_code}\n' http://127.0.0.1:4455/api/info
HTTP 200
The extension never sends an Authorization header — not via the bundled SDK client, nor in its raw fetch calls (/health, /app/providers, /config/providers, and the SSE event stream). So even if issue 1 is fixed, every request would return 401.
Setting OPENCODE_SERVER_PASSWORD="" does not disable auth (the server still generates a random password), so there is no config-side workaround from inside the extension.
Additional Context
- The old
sst-dev.opencode(v1-era) extension is equally broken with the v2 CLI (it runsopencode --port N, an unrecognized flag in v2). - Local workaround I applied to make the panel usable (for reference):
- accept the new
server listeningmarker in the spawn helper; - inject a fixed
OPENCODE_SERVER_PASSWORDinto the spawned server env; - wrap
globalThis.fetchin the extension host to attachAuthorization: Basic base64(opencode:<password>)to localhost requests.
With those three changes the panel works against v2.0.10.
- accept the new
- Reproducibility: consistent, 100% of attempts on this machine.
- Related prior issues: VS Code extension fails to start with
--portparameter - outputs{}#18714 (old extension--portflag), vscode plugin sst-dev.opencode-v2 401 #24737 (401 between plugin and server).
Diagnosis generated with the OpenCode report skill; reproduction output collected on 2026-09-19.
Activity
cestercian commentedon Sep 19, 2026
Taking this — will fix vscode extension timeout waiting for server start (stdout marker / CLI 2.0.10).
rekram1-node commentedon Oct 14, 2026
The "OpenCode Beta" extension (sst-dev.opencode-v2) is no longer maintained and won't be updated for V2. Please use the main opencode extension (sst-dev.opencode) v1.0.0 instead, which works with the V2 CLI. Closing.