From 822d7fec0b1df38a616ba271726dfefffb647bfb Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Wed, 22 Jul 2026 11:47:19 -0700 Subject: [PATCH] fix(autopilot): boot warning must not recommend the DB-plane config set path `gbrain config set anthropic_api_key` writes the config TABLE via engine.setConfig; buildGatewayConfig only folds file-plane keys (~/.gbrain/config.json) + env, so following the warning's advice left isAvailable('chat') false and the warning firing forever (verified empirically on a scratch brain). Point at the two paths that actually resolve: ~/.gbrain/env (sourced by the daemon wrapper) and the config.json file plane. Co-Authored-By: Claude Fable 5 --- src/commands/autopilot.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/autopilot.ts b/src/commands/autopilot.ts index e085a8ed2..6f7a82249 100644 --- a/src/commands/autopilot.ts +++ b/src/commands/autopilot.ts @@ -365,7 +365,11 @@ export function chatBootWarning(chatAvailable: boolean): string | null { if (chatAvailable) return null; return ( '[autopilot] WARNING: no chat provider available — LLM phases (extract, dream, enrich) will no-op. ' + - 'Set a key via `gbrain config set anthropic_api_key ` or export it in ~/.gbrain/env (sourced by the daemon wrapper).' + // NOT `gbrain config set anthropic_api_key`: that writes the DB plane, + // which the gateway never reads (isAvailable('chat') stays false) — the + // split-brain class build-gateway-config.ts documents. File plane or env + // are the two paths that actually resolve. + 'Export ANTHROPIC_API_KEY in ~/.gbrain/env (sourced by the daemon wrapper) or set "anthropic_api_key" in ~/.gbrain/config.json.' ); }