The best way to control Claude Code, Codex and more from any computer or phone
fix(opencode): accept v2 serve ready line when spawning server (#13651)
Shirish Pothi committed
Sep 26, 2026 at 11:51 UTC
4408bf5a4fb0c97373d57abfdf6f541e315b1e67
1 file changed
+2
-6
apps/server/src/provider/opencodeRuntime.ts
+2
-6
@@ -78,7 +78,6 @@ export function resolveOpenCodeServerPassword(
78
: input.environment.OPENCODE_SERVER_PASSWORD;
79
}
80
81
-const OPENCODE_SERVER_READY_PREFIX = "opencode server listening";
81
const DEFAULT_OPENCODE_SERVER_TIMEOUT_MS = 30_000;
82
const DEFAULT_HOSTNAME = "127.0.0.1";
83
const OPENCODE_SERVER_STARTUP_MAX_OUTPUT_CHARS = 64 * 1024;
@@ -289,11 +288,8 @@ export interface OpenCodeRuntimeShape {
288
289
function parseServerUrlFromOutput(output: string): string | null {
290
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];
293
}
294
return null;
295
}