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
vscode extension: "Timeout waiting for server to start" with CLI 2.0.10 (stdout marker mismatch + missing server auth) #50043
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.
Install opencode CLI v2.0.10 and the sst-dev.opencode-v2 extension (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=4096 and 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(letooflines)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 runs opencode --port N, an unrecognized flag in v2).
Local workaround I applied to make the panel usable (for reference):
accept the new server listening marker in the spawn helper;
inject a fixed OPENCODE_SERVER_PASSWORD into the spawned server env;
wrap globalThis.fetch in the extension host to attach Authorization: Basic base64(opencode:<password>) to localhost requests.
With those three changes the panel works against v2.0.10.
Reproducibility: consistent, 100% of attempts on this machine.
Bug report: VS Code extension (sst-dev.opencode-v2) incompatible with CLI v2.0.10
Summary
The VS Code extension
sst-dev.opencode-v2v0.1.1 (latest on the marketplace, no newer pre-release) cannot open its panel when used with CLI v2.0.10: it fails withFailed to open OpenCode panel: Timeout waiting for server to start after 15000ms. There are two independent incompatibilities between the extension and the currentopencode serveoutput/behavior.Environment
Reproduction
sst-dev.opencode-v2extension (v0.1.1) in VS Code.opencode serve --hostname=127.0.0.1 --port=4096and waits for a stdout marker.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 servein v2.0.10 prints:but the extension's bundled spawn helper waits for a line that starts with
opencode server listening: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 whenOPENCODE_SERVER_PASSWORDis unset:The extension never sends an
Authorizationheader — not via the bundled SDK client, nor in its rawfetchcalls (/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
sst-dev.opencode(v1-era) extension is equally broken with the v2 CLI (it runsopencode --port N, an unrecognized flag in v2).server listeningmarker in the spawn helper;OPENCODE_SERVER_PASSWORDinto the spawned server env;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.
--portparameter - outputs{}#18714 (old extension--portflag), vscode plugin sst-dev.opencode-v2 401 #24737 (401 between plugin and server).Diagnosis generated with the OpenCode
reportskill; reproduction output collected on 2026-09-19.