diff --git a/src/App.tsx b/src/App.tsx index c357e9e1..1ae4f1d4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1000,6 +1000,18 @@ export default function App({ } const busySessionIds = busySessionIdsRef.current; + /** Probe the active session's harness for its live model catalog whenever + * the active harness changes. Catalogs load lazily (probing spawns a CLI + * process) and the boot refresh runs before restored sessions land, so a + * fresh session would otherwise show only the built-in fallback model + * until the picker happened to be opened. Idempotent: refreshHarnessCatalogs + * dedupes via hasLiveCatalog and its inflight map. */ + const activeHarness = active?.harness; + useEffect(() => { + if (!activeHarness || !isLiveHarness(activeHarness)) return; + void refreshHarnessCatalogs([activeHarness]); + }, [activeHarness]); + const usageProviders = useMemo(() => { if (active?.harness === "claude" || active?.harness === "codex") { return [active.harness];