diff --git a/src/mcp/server.ts b/src/mcp/server.ts index 60b6c93..cae00af 100644 --- a/src/mcp/server.ts +++ b/src/mcp/server.ts @@ -73,10 +73,11 @@ function listWorktrees(): object { const idx = i + 1; const project = composeProjectName(ctx.repoName, idx, wt.branch); const allocations = allocateWorktreePorts(ctx.portMappings, idx); - const up = - execSafe(`docker compose -p "${project}" ps --format json`, { - cwd: wt.path, - }) !== null; + const psOutput = execSafe( + `docker compose -p "${project}" ps --format json`, + { cwd: wt.path }, + ); + const up = psOutput !== null && psOutput.length > 2; return { index: idx,