Merge pull request #4063 from PeterPonyu/fix/3963-server-url-port-zero

fix(team-mode): surface port-0 fallback and silent layout skip (#3963)
This commit is contained in:
YeonGyu-Kim
2026-05-21 00:42:20 +09:00
committed by GitHub
3 changed files with 91 additions and 2 deletions
@@ -122,7 +122,17 @@ export async function createTeamLayout(teamRunId: string, members: Array<TeamLay
try {
const serverUrl = tmuxMgr.getServerUrl()
if (!(await deps.isServerRunning(serverUrl))) {
log("opencode server not reachable, skipping team layout", { serverUrl })
const ctxServerUrl = tmuxMgr.getCtxServerUrl?.()
log("opencode server not reachable, skipping team layout (see issue #3963)", {
kind: "warning",
teamRunId,
serverUrl,
ctxServerUrl: ctxServerUrl && ctxServerUrl !== serverUrl ? ctxServerUrl : undefined,
hint:
ctxServerUrl && ctxServerUrl !== serverUrl
? "ctx.serverUrl was discarded (likely port 0); launch opencode with --port N and OPENCODE_PORT=N to bind a real port"
: "no opencode server is listening on the fallback URL",
})
return null
}