INNER CODE UNIT · TypeScript
synced
lidge-jun/opencodex · src/cli/index.ts:904
const synced = await syncModelsToCodex(port).catch(e => {
console.error(`⚠️ Model sync skipped: ${e instanceof Error ? e.message : String(e)}`);
return null;
});
if (synced?.status === "skipped") {
console.log(startupLeftCodexNativeLine(synced.skippedReason ?? "desired_disabled"));
}
// The child performs Raycast refresh with its actual startup config. The
// parent's pre-spawn snapshot is not authoritative for a client-file write.
// The child opens /healthz before its best-effort roster reconcile. Await the same idempotent
// operation in the parent so `ocx ensure` cannot report success while stale ocx-*.md files are
// still observable. Always use the live port, including fallback-port starts.
await syncClaudeAgentDefsAtProxyStartup(config, port);
console.log(`✅ Proxy running on port ${port}`);
return true;
}
/** Fixed tray action: start the proxy without depending on codexAutoStart. */