perf(tui): defer EmbeddedTuiBackend import, drop dead warmup helpers#84701
Conversation
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.
|
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: yes. source-reproducible: the stacked base statically imports 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 Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Review and land this import boundary with its stacked TUI startup parent, adding quick remote cold-start timing and local-mode smoke proof if maintainers want runtime confirmation. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: the stacked base statically imports Is this the best way to solve the issue? Yes, the proposed dynamic import is the narrow maintainable fix for this module-graph leak because it uses the existing local-mode branch and leaves gateway-mode connection behavior unchanged. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6c7fe5846896. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Frosted Lint Imp Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
f1115ce to
835fc2f
Compare
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
…penclaw#84701) * 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. * perf(tui): defer EmbeddedTuiBackend import until local mode * refactor(agents): remove dead context-cache warmup helpers
Stacked on #84686. Follow-ups from #84686 (comment).
A further improvement on TUI load speed
BEFORE
AFTER
Changes
1. Defer
EmbeddedTuiBackendimport (src/tui/tui.ts)The static import pulled gateway server-side modules (
server-model-catalog,session-reset-service,sessions-patch, etc.) into every TUI process at module-eval. Remote-mode TUI never constructs an embedded backend, so the import is now gated behindopts.localviaawait import().2. Remove dead helpers (
src/agents/context.ts, -117 lines)shouldEagerWarmContextWindowCache,isLikelyOpenClawCliProcess,getCommandPathFromArgv,SKIP_EAGER_WARMUP_PRIMARY_COMMANDShad no production callers after #84686 moved warmup intoEmbeddedTuiBackend.start(). Deleted them, the corresponding test, and 4 now-unused imports.Audited, no change needed
lookupContextTokenswarmup: every call site is either gateway-server-side (session-utils.ts) or passesallowAsyncLoad: false(commands/sessions.ts,cron/isolated-agent/run.ts). Cannot leak into remote TUI.package-state-probes,persisted-auth-state,configured-state): only reached viaapplyPluginAutoEnable/isChannelConfigured, none of which is called fromrunTui()on the remote path.materializeRuntimeConfigdefaults withmanifestRegistry: undefined:applyContextPruningDefaultsandapplyModelDefaultsfall throughresolveBundledProviderPolicySurface, which has a direct bundled-surface fallback; they return config unchanged when no policy applies. Remote TUI'sgateway/session/agent-ID view is untouched.Verification
pnpm tsgo:core --noEmitcleanpnpm buildclean (noINEFFECTIVE_DYNAMIC_IMPORT)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.ts— 100/100 passReal behavior proof
EmbeddedTuiBackendimport evaluates gateway server-side modules on remote TUI startup; dead CLI-argv helpers carried over from the pre-deferred warmup design.embedded-backend.jshas no other prod static importer; zero remaining references to deleted helpers acrosssrc,scripts,test,extensions.pnpm tsgo:core --noEmit;pnpm build; targeted vitest run above;node scripts/run-oxlint.mjs src/agents/context.ts src/agents/context.lookup.test.ts src/tui/tui.ts;pnpm format:check.embedded-backend.jsor its gateway-side fanout; local TUI behavior unchanged.openclaw tuiagainst a warm gateway;--localmode regression check.