authorgravatar for 183252392+shirishpothi@users.noreply.github.comShirish Pothi <183252392+shirishpothi@users.noreply.github.com> 2026-09-26 11:51:45+08:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-25 22:51:45-05:00
log4408bf5a4fb0c97373d57abfdf6f541e315b1e67
tree52f8293cedec5344caeba93d7f8ec50e4ddebd00
parent04c15f34b756aadbff4c93ff07a217fa2398e5d5
signature Signed by PGP key B5690EEEBB952194

fix(opencode): accept v2 serve ready line when spawning server (#13651)


1 files changed, 2 insertions(+), 6 deletions(-)

apps/server/src/provider/opencodeRuntime.ts+2-6
......@@ -78,7 +78,6 @@ export function resolveOpenCodeServerPassword(
7878 : input.environment.OPENCODE_SERVER_PASSWORD;
7979}
8080
81const OPENCODE_SERVER_READY_PREFIX = "opencode server listening";
8281const DEFAULT_OPENCODE_SERVER_TIMEOUT_MS = 30_000;
8382const DEFAULT_HOSTNAME = "127.0.0.1";
8483const OPENCODE_SERVER_STARTUP_MAX_OUTPUT_CHARS = 64 * 1024;
......@@ -289,11 +288,8 @@ export interface OpenCodeRuntimeShape {
289288
290289function parseServerUrlFromOutput(output: string): string | null {
291290 for (const line of output.split("\n")) {
292 if (!line.startsWith(OPENCODE_SERVER_READY_PREFIX)) {
293 continue;
294 }
295 const match = line.match(/on\s+(https?:\/\/[^\s]+)/);
296 return match?.[1] ?? null;
291 const match = line.match(/server listening on\s+(https?:\/\/[^\s]+)/i);
292 if (match?.[1]) return match[1];
297293 }
298294 return null;
299295}