Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/capy/hooks-start-gbrain-from' into capy/gbra-279-mcp-launcher

garrytan5147e3d2d350
diff --cc src/core/setup/codex.ts
index 5f0348d0db,0d632f1a61..fc462fed6a
--- a/src/core/setup/codex.ts
+++ b/src/core/setup/codex.ts
@@@ -240,10 -239,9 +240,9 @@@ export async function applyCodexSetup
mkdirSync(dirname(paths.configPath), { recursive: true, mode: 0o700 });
const lock = await acquireBootstrapLock(dirname(paths.configPath));
try {
- // Every hook command starts gbrain through the launcher, so it goes down before anything names it (#8424).
- if (plan.events.length) ensureHookLauncher(hookLauncherPath(plan.brainHome));
+ // The MCP table and every hook command start gbrain through the launcher, so it goes down before anything names it (#8424, #8426).
+ ensureHookLauncher(hookLauncherPath(plan.brainHome));
const found = inspectCodexSetup(plan);
- if (opts.mcpMustBeCurrent && opts.pluginOwner === null && found.mcp.state !== 'current') throw new Error(`the '${plan.name}' MCP entry changed before the hooks were rewritten`);
const prior = found.prior;
const now = new Date().toISOString();
const desired = desiredCodexMcpEntry(plan);