Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

bootstrap: a bare serve stays bare on re-registration; only an unreadable surface becomes full

garrytan4d5a06ac2ed6
diff --git a/src/commands/bootstrap.ts b/src/commands/bootstrap.ts
index e88b27f311..394f05773a 100644
--- a/src/commands/bootstrap.ts
+++ b/src/commands/bootstrap.ts
@@ -1487,7 +1487,7 @@ async function runHooks(
);
return 1;
}
- const re = await runner(surfaceFlag ? argv : buildArgvs(priorSurface ?? 'full', priorAdvertise)[0]);
+ const re = await runner(surfaceFlag ? argv : buildArgvs(priorSurface === undefined ? 'full' : priorSurface, priorAdvertise)[0]);
if (re.code !== 0 && !/already exists|already registered/i.test(re.stderr + re.stdout)) {
console.error(`MCP re-registration failed (${argv.join(' ')}): ${re.stderr.trim() || `exit ${re.code}`}`);
return 1;