perf(tui): skip plugin metadata + provider catalog on remote TUI startup#84686
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: no. high-confidence live timing reproduction was run in this read-only pass. Source inspection does show current main reaches full plugin-aware config loading and import-time context warmup on the remote TUI startup path. PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the remote-only skip if maintainers accept deferred plugin-aware validation for TUI clients; otherwise preserve startup diagnostics through a nonblocking/background validation path instead of skipping them. Do we have a high-confidence way to reproduce the issue? No high-confidence live timing reproduction was run in this read-only pass. Source inspection does show current main reaches full plugin-aware config loading and import-time context warmup on the remote TUI startup path. Is this the best way to solve the issue? Mostly yes: the patch uses an existing plugin-validation skip seam at the remote TUI boundary and preserves full validation for embedded mode. The only open solution question is whether maintainers accept moving remote-client plugin diagnostics out of startup. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against cd019cfa412b. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Neon Clawlet Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
A few follow-up candidates for further reducing remote-mode TUI work:
|
Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config
…d backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
f1115ce to
835fc2f
Compare
|
@clawsweeper pls provide explanation for the compatibility merge risk label, or remove it |
|
🦞👀 I asked ClawSweeper to answer this maintainer mention in the next review comment. Tiny claws, bounded scope: this is a read-only assist pass unless it produces one of the existing structured safe-action markers. Request: pls provide explanation for the compatibility merge risk label, or remove it |
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
…tup (openclaw#84686) * perf(tui): skip plugin-aware config validation on remote TUI startup Cold `openclaw tui` against a remote gateway was synchronously calling loadPluginMetadataSnapshot() via getRuntimeConfig() -> loadConfig() -> validateConfigObjectWithPlugins(), pulling the full plugin metadata snapshot (200k+ file reads) onto the TUI's event loop. The TUI itself never consumes plugin metadata in remote mode; it queries the gateway over RPC. The work was being done purely to validate the config and then thrown away. Thread an opt-in `skipPluginValidation` flag through getRuntimeConfig() and loadConfig() (createConfigIO already supports pluginValidation: "skip"; it just wasn't reachable from the runtime entrypoints). The TUI passes skipPluginValidation: !isLocalMode so: - Remote-mode TUI: no plugin metadata load, no event-loop freeze after first render - Embedded (--local) mode: unchanged; the in-process agent runtime still gets a fully validated config * remove verbose comments * perf(tui): move context cache warmup from module top-level to embedded backend agents/context.ts fired ensureContextWindowCacheLoaded() unconditionally at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup including remote-mode, cascading into ensureOpenClawModelsJson -> resolveImplicitProviders -> runProviderCatalog and dominating the cold-start freeze (CPU profile showed ~55s of resolveProviderSyntheticAuthWithPlugin, lstat, open, etc.). It also pre-emptively called getRuntimeConfig() without skipPluginValidation, pinning the full snapshot and nullifying the skip flag added on this branch. Remove the top-level side effect and trigger the warmup explicitly from EmbeddedTuiBackend.start(), which only runs when an in-process agent runtime actually needs the cache.
BEFORE
AFTER
Summary
Cold
openclaw tuiagainst a remote gateway froze the TUI's event loop for tens of seconds after first render. CPU profile showed the dominant cost was provider catalog resolution (runProviderCatalog,resolveProviderSyntheticAuthWithPlugin,lstat,open), with secondary cost in plugin manifest snapshot loading via config validation.Neither of these is needed in remote mode — the TUI is a thin WebSocket client that queries the gateway over RPC for models, slash commands, agents. Both were leaking into the TUI process through two distinct mechanisms:
1. Plugin-aware config validation triggered by
getRuntimeConfig()src/tui/tui.ts:451→getRuntimeConfig()→loadConfig()→validateConfigObjectWithPlugins()→loadPluginMetadataSnapshot()(200k+ sync file reads).createConfigIOalready supportedpluginValidation: "skip"(used byreadConfigFileSnapshot); it just wasn't reachable from the runtime entrypoints. This PR threads an opt-inskipPluginValidationthroughgetRuntimeConfig/loadConfig. The TUI passesskipPluginValidation: !isLocalMode.2. Top-level eager warmup in
src/agents/context.tsThe module fired
void ensureContextWindowCacheLoaded()at module-eval time for non-skip-listed CLI commands. The TUI transitively imports this module, so the warmup ran on every TUI startup — cascading intoensureOpenClawModelsJson→resolveImplicitProviders→runProviderCatalog, plus credential reads viaresolveProviderSyntheticAuthWithPlugin. It also calledgetRuntimeConfig()without the skip flag, pinning the full snapshot and nullifying (1).This PR removes the top-level side effect and triggers the warmup explicitly from
EmbeddedTuiBackend.start(), so it only fires when an in-process agent runtime actually needs it.Mode behavior
openclaw tui): no plugin metadata load, no provider catalog work, no models.json materialization. Config validation still runs in raw-shape mode (validateConfigObjectRaw+ basic defaults) — enough for connection settings, session prefs, agent ID resolution.openclaw tui --local,chat,terminal): unchanged. Full plugin validation runs (in-process agent runtime needs it), and the context window cache is warmed by the embedded backend'sstart().Verification
pnpm tsgo:core --noEmitcleansrc/tui/tui.test.ts— 46/46src/tui/embedded-backend.test.ts+src/agents/context.lookup.test.ts— 92/92 combinedsrc/config/io.meta.test.ts+src/config/runtime-snapshot.test.ts— 10/10Real behavior proof
openclaw tui(remote mode) freezes ~55s on event loop after first renderrunProviderCatalog/resolveProviderSyntheticAuthWithPlugin, withloadPluginMetadataSnapshotsecondary. Post-fix cold-start timing not yet captured.pnpm tsgo:core --noEmit;node scripts/run-vitest.mjs src/tui/tui.test.ts src/tui/embedded-backend.test.ts src/agents/context.lookup.test.ts src/config/io.meta.test.ts src/config/runtime-snapshot.test.tsopenclaw tuicold-start timing against a warm gateway;--localmode regression check (chat/terminalaliases auto-enable local and now rely on embedded backend'sstart()for warmup); behavior whenopenclaw.jsonreferences plugins that don't exist (errors that previously surfaced at TUI startup will now only surface gateway-side / on first plugin use in remote mode)Architectural notes
This is point (1) and a follow-up boundary cut from the architectural analysis: the remote-mode TUI doesn't need the provider catalog, plugin manifest registry, models.json, or plugin-aware config validation — the gateway owns all of that and serves it over RPC. The only legitimate config work in remote mode is reading
openclaw.json, raw-shape validation, and basic defaults (connection URL, session settings, agent ID).Two mechanisms were leaking gateway-side work into the TUI process; both are now gated. Further cleanup (e.g. deleting the now-unused
shouldEagerWarmContextWindowCache+ helpers) is left to a follow-up.