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

This commit is contained in:
Shirish Pothi authored and GitHub committed 2026-09-25 22:51:45 -05:00
1 parent 04c15f34b7
commit 4408bf5a4f
1 file changed
+2 -6
+2 -6
View File
@@ -78,7 +78,6 @@ export function resolveOpenCodeServerPassword(
: input.environment.OPENCODE_SERVER_PASSWORD;
}
const OPENCODE_SERVER_READY_PREFIX = "opencode server listening";
const DEFAULT_OPENCODE_SERVER_TIMEOUT_MS = 30_000;
const DEFAULT_HOSTNAME = "127.0.0.1";
const OPENCODE_SERVER_STARTUP_MAX_OUTPUT_CHARS = 64 * 1024;
@@ -289,11 +288,8 @@ export interface OpenCodeRuntimeShape {
function parseServerUrlFromOutput(output: string): string | null {
for (const line of output.split("\n")) {
if (!line.startsWith(OPENCODE_SERVER_READY_PREFIX)) {
continue;
}
const match = line.match(/on\s+(https?:\/\/[^\s]+)/);
return match?.[1] ?? null;
const match = line.match(/server listening on\s+(https?:\/\/[^\s]+)/i);
if (match?.[1]) return match[1];
}
return null;
}