openclaw - 💡(How to fix) Fix [Bug]: Embedded run prep repeatedly resolves provider-runtime plugins, causing 80–120s+ latency [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#75912Fetched 2026-05-03 04:44:20
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Author
Timeline (top)
labeled ×2closed ×1commented ×1

OpenClaw embedded runs can spend tens of seconds before stream-ready because provider-runtime/plugin lookups are repeated across multiple prep phases. The repeated work appears in tool normalization, system prompt generation, transcript policy resolution, and stream setup.

A local proof-of-concept cache at resolveProviderRuntimePlugin() / resolveProviderHookPlugin() reduced prep time for openrouter/moonshotai/kimi-k2.6 from ~86s to ~5s without skipping provider behavior.

I have a sanitized evidence zip with timing extracts and patch-marker scans. I can provide it if useful, but I did not attach raw config/session/auth files because they may contain sensitive data.

Root Cause

OpenClaw embedded runs can spend tens of seconds before stream-ready because provider-runtime/plugin lookups are repeated across multiple prep phases. The repeated work appears in tool normalization, system prompt generation, transcript policy resolution, and stream setup.

Fix Action

Fix / Workaround

I have a sanitized evidence zip with timing extracts and patch-marker scans. I can provide it if useful, but I did not attach raw config/session/auth files because they may contain sensitive data.

  • timing extracts before and after the provider-runtime cache proof-of-concept
  • patch marker scans
  • redacted config excerpts
  • curated log snippets only, not raw auth/session files

Code Example

phase=stream-ready totalMs=86416
core-plugin-tools:1987ms
bootstrap-context:29ms
bundle-tools:7486ms
system-prompt:36383ms
session-resource-loader:8480ms
stream-setup:32040ms



### Steps to reproduce

1. Configure OpenClaw 2026.4.29 on Windows 11 with the Telegram channel enabled.

2. Set the agent model to an OpenRouter provider-runtime model. Observed with:
   openrouter/moonshotai/kimi-k2.6

3. Start or restart the gateway:
   openclaw gateway restart

4. Send a simple Telegram message to the bot, for example:
   hello

5. Watch the gateway log for the embedded run prep summary:
   [trace:embedded-run] prep stages: ... phase=stream-ready totalMs=...

6. Observe that embedded-run prep takes tens of seconds before stream-ready. In my observed Kimi run:
   totalMs=86416
   bundle-tools=7486ms
   system-prompt=36383ms
   session-resource-loader=8480ms
   stream-setup=32040ms

Instrumentation showed repeated provider-runtime/plugin resolution across multiple prep phases, including tool normalization, system prompt generation, transcript policy, and stream setup.

A local process cache around resolveProviderRuntimePlugin() and resolveProviderHookPlugin(), keyed by provider/config/workspace/plugin-relevant inputs, reduced the same Kimi path to approximately 5 seconds:

prep.total-before-stream-ready 5016ms
stream-setup.bucket-beforeMark 45ms
bucket.stream-setup 46ms

This suggests the upstream fix should cache provider-runtime/plugin resolution rather than adding model-specific fastpaths.

### Expected behavior

Embedded-run prep should reach stream-ready without repeatedly spending tens of seconds resolving the same provider-runtime/plugin hooks.

A grounded reference is the local proof-of-concept provider-runtime cache on the same OpenClaw 2026.4.29 install and same model, openrouter/moonshotai/kimi-k2.6, which reduced prep from ~86.4s to ~5.0s:

Before cache:
phase=stream-ready totalMs=86416
bundle-tools=7486ms
system-prompt=36383ms
session-resource-loader=8480ms
stream-setup=32040ms

After cache:
prep.total-before-stream-ready 5016ms
stream-setup.bucket-beforeMark 45ms
bucket.stream-setup 46ms

Expected behavior: provider-runtime/plugin resolution should be cached or otherwise reused across prep phases when provider/config/plugin state has not changed, so normal Telegram responses are not delayed by 80–120s of repeated embedded-run prep work.

### Actual behavior

Telegram responses became delayed by 12+ minutes while the gateway remained running. During these delays, the logs showed embedded-run prep taking tens of seconds before reaching stream-ready.

Observed with openrouter/moonshotai/kimi-k2.6:

phase=stream-ready totalMs=86416
core-plugin-tools=1987ms
bootstrap-context=29ms
bundle-tools=7486ms
system-prompt=36383ms
session-resource-loader=8480ms
stream-setup=32040ms

In later raw log output, the same pattern appeared with 120s+ prep:

phase=stream-ready totalMs=124560
core-plugin-tools=37760ms
bootstrap-context=39ms
bundle-tools=7246ms
system-prompt=38334ms
session-resource-loader=8958ms
stream-setup=32209ms

The logs also showed event-loop liveness warnings and Telegram transport symptoms during the delay window, including polling stalls and send failures:

liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu
[telegram] Polling stall detected
telegram sendMessage failed: Network request for 'sendMessage' failed!

### OpenClaw version

2026.4.29 (a448042)

### Operating system

Windows 11

### Install method

Global npm install on Windows; launched via OpenClaw Gateway Scheduled Task using `openclaw gateway start`.

### Model

openrouter/openai/gpt-4o-mini, openrouter/moonshotai/kimi-k2.6

### Provider / routing chain

Telegram → local OpenClaw Gateway on WindowsOpenRouter → openrouter/moonshotai/kimi-k2.6. Additional comparison used OpenRouter → openrouter/openai/gpt-4o-mini. No intentional external proxy.

### Additional provider/model setup details

The repro was run against the agent’s configured default model in C:\Users\[WINDOWS_USER]\.openclaw\openclaw.json.

During the Kimi repro, gateway startup logged:

agent model: openrouter/moonshotai/kimi-k2.6

During the comparison run, gateway startup logged:

agent model: openrouter/openai/gpt-4o-mini

OpenRouter authentication was already configured and working. API keys/tokens are omitted.

Several plugins had config entries present but were disabled, and OpenClaw logged warnings for them at startup:

- active-memory disabled but config present
- browser disabled but config present
- codex disabled but config present
- device-pair disabled but config present
- lossless-claw disabled but config present

The Telegram channel was the only active channel in the observed gateway startup:

http server listening (1 plugin: telegram)

No intentional external proxy was configured. The issue appears tied to repeated provider-runtime/plugin resolution during embedded-run prep, not to a specific downstream model response.

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Bug: Embedded run prep repeatedly resolves provider-runtime plugins, causing 80–120s+ latency

Summary

OpenClaw embedded runs can spend tens of seconds before stream-ready because provider-runtime/plugin lookups are repeated across multiple prep phases. The repeated work appears in tool normalization, system prompt generation, transcript policy resolution, and stream setup.

A local proof-of-concept cache at resolveProviderRuntimePlugin() / resolveProviderHookPlugin() reduced prep time for openrouter/moonshotai/kimi-k2.6 from ~86s to ~5s without skipping provider behavior.

I have a sanitized evidence zip with timing extracts and patch-marker scans. I can provide it if useful, but I did not attach raw config/session/auth files because they may contain sensitive data.

Environment

  • OpenClaw: 2026.4.29
  • OS: Windows 11
  • Node: 24.14.1
  • Channel: Telegram
  • Provider/models tested:
    • openrouter/openai/gpt-4o-mini
    • openrouter/moonshotai/kimi-k2.6

Symptoms

Telegram responses stall for 1–2+ minutes. Gateway remains alive, but embedded run prep blocks the event loop long enough to trigger diagnostic warnings and Telegram polling stalls.

Representative pre-fix timing with openrouter/moonshotai/kimi-k2.6:

phase=stream-ready totalMs=86416
core-plugin-tools:1987ms
bootstrap-context:29ms
bundle-tools:7486ms
system-prompt:36383ms
session-resource-loader:8480ms
stream-setup:32040ms



### Steps to reproduce

1. Configure OpenClaw 2026.4.29 on Windows 11 with the Telegram channel enabled.

2. Set the agent model to an OpenRouter provider-runtime model. Observed with:
   openrouter/moonshotai/kimi-k2.6

3. Start or restart the gateway:
   openclaw gateway restart

4. Send a simple Telegram message to the bot, for example:
   hello

5. Watch the gateway log for the embedded run prep summary:
   [trace:embedded-run] prep stages: ... phase=stream-ready totalMs=...

6. Observe that embedded-run prep takes tens of seconds before stream-ready. In my observed Kimi run:
   totalMs=86416
   bundle-tools=7486ms
   system-prompt=36383ms
   session-resource-loader=8480ms
   stream-setup=32040ms

Instrumentation showed repeated provider-runtime/plugin resolution across multiple prep phases, including tool normalization, system prompt generation, transcript policy, and stream setup.

A local process cache around resolveProviderRuntimePlugin() and resolveProviderHookPlugin(), keyed by provider/config/workspace/plugin-relevant inputs, reduced the same Kimi path to approximately 5 seconds:

prep.total-before-stream-ready 5016ms
stream-setup.bucket-beforeMark 45ms
bucket.stream-setup 46ms

This suggests the upstream fix should cache provider-runtime/plugin resolution rather than adding model-specific fastpaths.

### Expected behavior

Embedded-run prep should reach stream-ready without repeatedly spending tens of seconds resolving the same provider-runtime/plugin hooks.

A grounded reference is the local proof-of-concept provider-runtime cache on the same OpenClaw 2026.4.29 install and same model, openrouter/moonshotai/kimi-k2.6, which reduced prep from ~86.4s to ~5.0s:

Before cache:
phase=stream-ready totalMs=86416
bundle-tools=7486ms
system-prompt=36383ms
session-resource-loader=8480ms
stream-setup=32040ms

After cache:
prep.total-before-stream-ready 5016ms
stream-setup.bucket-beforeMark 45ms
bucket.stream-setup 46ms

Expected behavior: provider-runtime/plugin resolution should be cached or otherwise reused across prep phases when provider/config/plugin state has not changed, so normal Telegram responses are not delayed by 80–120s of repeated embedded-run prep work.

### Actual behavior

Telegram responses became delayed by 1–2+ minutes while the gateway remained running. During these delays, the logs showed embedded-run prep taking tens of seconds before reaching stream-ready.

Observed with openrouter/moonshotai/kimi-k2.6:

phase=stream-ready totalMs=86416
core-plugin-tools=1987ms
bootstrap-context=29ms
bundle-tools=7486ms
system-prompt=36383ms
session-resource-loader=8480ms
stream-setup=32040ms

In later raw log output, the same pattern appeared with 120s+ prep:

phase=stream-ready totalMs=124560
core-plugin-tools=37760ms
bootstrap-context=39ms
bundle-tools=7246ms
system-prompt=38334ms
session-resource-loader=8958ms
stream-setup=32209ms

The logs also showed event-loop liveness warnings and Telegram transport symptoms during the delay window, including polling stalls and send failures:

liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu
[telegram] Polling stall detected
telegram sendMessage failed: Network request for 'sendMessage' failed!

### OpenClaw version

2026.4.29 (a448042)

### Operating system

Windows 11

### Install method

Global npm install on Windows; launched via OpenClaw Gateway Scheduled Task using `openclaw gateway start`.

### Model

openrouter/openai/gpt-4o-mini, openrouter/moonshotai/kimi-k2.6

### Provider / routing chain

Telegram → local OpenClaw Gateway on Windows → OpenRouter → openrouter/moonshotai/kimi-k2.6. Additional comparison used OpenRouter → openrouter/openai/gpt-4o-mini. No intentional external proxy.

### Additional provider/model setup details

The repro was run against the agent’s configured default model in C:\Users\[WINDOWS_USER]\.openclaw\openclaw.json.

During the Kimi repro, gateway startup logged:

agent model: openrouter/moonshotai/kimi-k2.6

During the comparison run, gateway startup logged:

agent model: openrouter/openai/gpt-4o-mini

OpenRouter authentication was already configured and working. API keys/tokens are omitted.

Several plugins had config entries present but were disabled, and OpenClaw logged warnings for them at startup:

- active-memory disabled but config present
- browser disabled but config present
- codex disabled but config present
- device-pair disabled but config present
- lossless-claw disabled but config present

The Telegram channel was the only active channel in the observed gateway startup:

http server listening (1 plugin: telegram)

No intentional external proxy was configured. The issue appears tied to repeated provider-runtime/plugin resolution during embedded-run prep, not to a specific downstream model response.

### Logs, screenshots, and evidence

```shell
I have a sanitized evidence bundle with:

- timing extracts before and after the provider-runtime cache proof-of-concept
- patch marker scans
- redacted config excerpts
- curated log snippets only, not raw auth/session files

I can attach the sanitized zip if useful, but I am initially avoiding public attachment of raw logs/config/session files because they may contain local paths, bot identifiers, tokens, or other sensitive data.

Key observed timing evidence:

Before provider-runtime cache, with openrouter/moonshotai/kimi-k2.6:

phase=stream-ready totalMs=86416
core-plugin-tools=1987ms
bootstrap-context=29ms
bundle-tools=7486ms
system-prompt=36383ms
session-resource-loader=8480ms
stream-setup=32040ms

Another later raw log showed the same pattern at 120s+:

phase=stream-ready totalMs=124560
core-plugin-tools=37760ms
bootstrap-context=39ms
bundle-tools=7246ms
system-prompt=38334ms
session-resource-loader=8958ms
stream-setup=32209ms

After adding a local provider-runtime cache around resolveProviderRuntimePlugin() / resolveProviderHookPlugin(), same Kimi route:

[local-debug:provider-runtime-cache] hit runtime provider=openrouter owner=openai-completions plugin=openrouter
[local-debug:stream-setup-actual] after.providerTextTransforms.beforeWrapTextTransforms 1ms
[local-debug:stream-setup-actual] after.preparedRuntimeExtraParams.beforeApplyExtraParams 1ms
[local-debug:stream-setup-actual] after.applyExtraParams.beforeResolveCacheRetention 1ms
[local-debug:prep] stream-setup.bucket-beforeMark 45ms
[local-debug:prep] prep.total-before-stream-ready 5016ms
[local-debug:prep] bucket.stream-setup 46ms

Supporting investigation:

Instrumentation showed repeated provider-runtime/plugin resolution across multiple prep phases:

- normalizeAgentRuntimeTools
- logAgentRuntimeToolDiagnostics
- provider system prompt contribution / transform
- transcript policy
- provider stream registration
- provider text transforms
- prepared runtime extra params
- cache-retention / transport extra params

The suspected central call path is:

function resolveProviderPluginsForHooks(params) {
  return resolvePluginProviders({
    ...
    activate: false,
    cache: false,
    ...
  });
}

function resolveProviderRuntimePlugin(params) {
  const apiOwnerHint = resolveProviderConfigApiOwnerHint(...);
  return resolveProviderPluginsForHooks(...).find(...);
}

function resolveProviderHookPlugin(params) {
  return resolveProviderRuntimePlugin(params) ?? resolveProviderPluginsForHooks(...).find(...);
}

Because resolveProviderPluginsForHooks() passes cache: false, multiple prep consumers appear to repeatedly pay the provider/plugin discovery and matching cost.

Observed secondary log symptoms during the same delay windows:

liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu
[telegram] Polling stall detected
telegram sendMessage failed: Network request for 'sendMessage' failed!

I believe those Telegram transport errors are secondary symptoms/noise from the long event-loop-blocking prep window, not the root cause of the embedded-run prep latency.

Impact and severity

Affected users/systems/channels: Observed on a Windows 11 OpenClaw 2026.4.29 gateway using the Telegram channel and OpenRouter-backed models, especially openrouter/moonshotai/kimi-k2.6. The gateway stayed running, but Telegram interactions were delayed while embedded-run prep was blocked.

Severity: Blocks normal interactive use. Telegram replies were delayed by 1–2+ minutes, with embedded-run prep observed at ~86s and later 120s+ in the logs. The issue also coincided with event-loop liveness warnings and Telegram polling/send failures.

Frequency: Observed repeatedly during testing with the Kimi/OpenRouter route before the provider-runtime cache proof-of-concept. I cannot claim it affects every model or every install, but in this setup it reproduced across multiple runs.

Consequence: Interactive Telegram use became unreliable: delayed responses, typing indicators expiring, polling stalls, and sendMessage/sendChatAction failures appeared during the delay windows. The practical effect is that the agent feels hung or non-responsive even though the gateway is still running. No data loss was confirmed from the evidence I collected.

Additional information

Additional grounded context:

This appears separate from the Telegram transport failures. Telegram sendMessage/sendChatAction failures and polling stalls were visible during the same windows, but the strongest evidence points to embedded-run prep blocking first, with provider-runtime/plugin lookup repeated across multiple prep phases.

A local proof-of-concept provider-runtime cache reduced the same Kimi route from ~86.4s prep to ~5.0s prep without skipping the OpenRouter provider plugin behavior. That suggests the fix should be provider/runtime resolution caching, not a model-specific fastpath.

Earlier testing with openrouter/openai/gpt-4o-mini also showed that avoiding repeated provider-runtime/plugin resolution could reduce prep time to ~4.8s. However, OpenAI-specific fastpaths did not generalize to openrouter/moonshotai/kimi-k2.6 until a generic provider-runtime cache was added.

I do not have a confirmed last-known-good OpenClaw version. The bad version directly observed was:

OpenClaw 2026.4.29 (a448042)

The issue may be related to provider-runtime/plugin resolution being called with cache disabled:

resolveProviderPluginsForHooks(...) -> resolvePluginProviders(... cache: false ...)

but I am reporting that as an investigation finding, not as a confirmed upstream design flaw.

Local proof-of-concept fix:

I locally added a process-level provider-runtime/plugin resolution cache around:

  • resolveProviderRuntimePlugin(params)
  • resolveProviderHookPlugin(params)

The cache key included:

  • normalized provider id
  • provider config API owner hint
  • workspace dir
  • applyAutoEnable
  • bundledProviderAllowlistCompat
  • bundledProviderVitestCompat
  • installBundledRuntimeDeps
  • a small plugin config signature

The cache also stored negative results with a sentinel so repeated “no plugin found” lookups did not keep paying the same cost.

I added a temporary disable flag for validation:

OPENCLAW_DISABLE_PROVIDER_RUNTIME_PLUGIN_CACHE=1

Pseudo-code shape:

const providerRuntimePluginCache = new Map(); const providerHookPluginCache = new Map(); const NONE = Symbol("none");

function readCache(cache, key) { if (!cache.has(key)) return { hit: false }; const value = cache.get(key); return { hit: true, value: value === NONE ? undefined : value }; }

function writeCache(cache, key, value) { cache.set(key, value ?? NONE); }

function resolveProviderRuntimePlugin(params) { const apiOwnerHint = resolveProviderConfigApiOwnerHint({ provider: params.provider, config: params.config });

const workspaceDir = params.workspaceDir ?? getActivePluginRegistryWorkspaceDirFromState();

const key = makeProviderRuntimeCacheKey({ kind: "runtime", provider: normalizeProviderId(params.provider ?? ""), apiOwnerHint: normalizeProviderId(apiOwnerHint ?? ""), workspaceDir, applyAutoEnable: params.applyAutoEnable, bundledProviderAllowlistCompat: params.bundledProviderAllowlistCompat, bundledProviderVitestCompat: params.bundledProviderVitestCompat, installBundledRuntimeDeps: params.installBundledRuntimeDeps, pluginConfigSignature: makePluginConfigSignature(params.config) });

if (process.env.OPENCLAW_DISABLE_PROVIDER_RUNTIME_PLUGIN_CACHE !== "1") { const cached = readCache(providerRuntimePluginCache, key); if (cached.hit) return cached.value; }

const resolved = resolveProviderPluginsForHooks({ config: params.config, workspaceDir, env: params.env, providerRefs: apiOwnerHint ? [params.provider, apiOwnerHint] : [params.provider], applyAutoEnable: params.applyAutoEnable, bundledProviderAllowlistCompat: params.bundledProviderAllowlistCompat, bundledProviderVitestCompat: params.bundledProviderVitestCompat, installBundledRuntimeDeps: params.installBundledRuntimeDeps }).find((plugin) => { if (apiOwnerHint) { return matchesProviderLiteralId(plugin, params.provider) || matchesProviderId(plugin, apiOwnerHint); } return matchesProviderId(plugin, params.provider); });

writeCache(providerRuntimePluginCache, key, resolved); return resolved; }

function resolveProviderHookPlugin(params) { const runtime = resolveProviderRuntimePlugin(params); if (runtime) return runtime;

// Same cache idea for the fallback hook lookup. // Cache both positive and negative results. }

Observed result after the local proof-of-concept cache:

  • Provider-runtime cache hits appeared repeatedly after the first miss.
  • Kimi prep dropped from ~86.4s to ~5.0s.
  • Stream setup dropped from ~32s to ~46ms.
  • Provider behavior was preserved because the OpenRouter provider plugin still resolved and was reused rather than skipped.

Suggested success criteria:

With openrouter/moonshotai/kimi-k2.6 on the same setup, embedded-run prep should no longer spend tens of seconds in:

  • bundle-tools
  • system-prompt
  • session-resource-loader
  • stream-setup

A reasonable target based on the local proof-of-concept is stream-ready prep around ~5s instead of ~86s, with stream-setup in milliseconds rather than ~32s.

Please check whether provider-runtime/plugin resolution can be cached or memoized across embedded-run prep phases for a stable provider/config/plugin state.

The most useful upstream fix likely is not a model-specific fastpath, but caching around:

  • resolveProviderRuntimePlugin()
  • resolveProviderHookPlugin()
  • possibly resolveProviderPluginsForHooks()

The cache should preserve provider plugin behavior and invalidate when provider/plugin config, workspace, registry state, or relevant env/config flags change.

extent analysis

TL;DR

Implement a cache for provider-runtime/plugin resolution to reduce repeated lookups and latency in embedded-run prep.

Guidance

  • Identify the resolveProviderRuntimePlugin() and resolveProviderHookPlugin() functions as the primary sources of repeated provider-runtime/plugin resolution.
  • Implement a cache mechanism, such as a Map, to store the results of these resolutions, using a unique key based on provider ID, config, and other relevant factors.
  • Invalidate the cache when the provider/plugin config, workspace, registry state, or relevant env/config flags change.
  • Consider adding a temporary disable flag for validation, similar to OPENCLAW_DISABLE_PROVIDER_RUNTIME_PLUGIN_CACHE.

Example

const providerRuntimePluginCache = new Map();
const providerHookPluginCache = new Map();
const NONE = Symbol("none");

function readCache(cache, key) {
  if (!cache.has(key)) return { hit: false };
  const value = cache.get(key);
  return { hit: true, value: value === NONE ? undefined : value };
}

function writeCache(cache, key, value) {
  cache.set(key, value ?? NONE);
}

function resolveProviderRuntimePlugin(params) {
  // ...
  const key = makeProviderRuntimeCacheKey(params);
  if (process.env.OPENCLAW_DISABLE_PROVIDER_RUNTIME_PLUGIN_CACHE !== "1") {
    const cached = readCache(providerRuntimePluginCache, key);
    if (cached.hit) return cached.value;
  }
  // ...
}

Notes

The local proof-of-concept cache showed a significant reduction in prep time, from ~86s to ~5s, and stream setup time, from ~32s to ~46ms. The suggested fix should preserve provider plugin behavior and invalidate the cache when necessary.

Recommendation

Apply a caching mechanism around resolveProviderRuntimePlugin() and resolveProviderHookPlugin() to reduce repeated provider-runtime/plugin resolution and latency in embedded-run prep. This fix should provide

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Embedded-run prep should reach stream-ready without repeatedly spending tens of seconds resolving the same provider-runtime/plugin hooks.

A grounded reference is the local proof-of-concept provider-runtime cache on the same OpenClaw 2026.4.29 install and same model, openrouter/moonshotai/kimi-k2.6, which reduced prep from ~86.4s to ~5.0s:

Before cache: phase=stream-ready totalMs=86416 bundle-tools=7486ms system-prompt=36383ms session-resource-loader=8480ms stream-setup=32040ms

After cache: prep.total-before-stream-ready 5016ms stream-setup.bucket-beforeMark 45ms bucket.stream-setup 46ms

Expected behavior: provider-runtime/plugin resolution should be cached or otherwise reused across prep phases when provider/config/plugin state has not changed, so normal Telegram responses are not delayed by 80–120s of repeated embedded-run prep work.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Embedded run prep repeatedly resolves provider-runtime plugins, causing 80–120s+ latency [1 comments, 2 participants]