openclaw - ✅(Solved) Fix [Bug] core-plugin-tools blocks for 30-40s on every cold start — Windows + Node 24 only [1 pull requests, 5 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#75907Fetched 2026-05-03 04:44:22
View on GitHub
Comments
5
Participants
2
Timeline
8
Reactions
3
Author
Timeline (top)
commented ×5closed ×1cross-referenced ×1subscribed ×1

Root Cause

Trace data pinpoints core-plugin-tools → createOpenClawCodingTools() → createCodingTools() from @mariozechner/pi-coding-agent as the blocking call. This runs unconditionally on every cold start regardless of:

  • tools allowlist (only exec, group:fs, write, edit, read are enabled)
  • tools.profile: minimal — made it WORSE, pushing timing to 43-45s
  • Browser plugin enabled or disabled — no effect

Fix Action

Fixed

PR fix notes

PR #75922: Fix plugin-only tool and registry latency regressions

Description (problem / solution / changelog)

Summary

  • Skip core coding tool construction when an explicit allowlist only requests plugin tools.
  • Keep the full workspace plugin registry cache separate from scoped plugin registry loads.
  • Add regressions for both latency paths.

Tests

  • OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test src/agents/pi-embedded-runner/run/attempt.tools-allow-regression.test.ts src/agents/pi-embedded-runner/run/attempt.test.ts src/agents/tool-policy.plugin-only-allowlist.test.ts src/agents/pi-tools.create-openclaw-coding-tools.test.ts src/plugins/plugin-lru-cache.test.ts src/plugins/loader.runtime-registry.test.ts src/plugins/loader.test.ts
  • pnpm exec oxfmt --check --threads=1 src/agents/pi-embedded-runner/run/attempt.ts src/agents/pi-embedded-runner/run/attempt.spawn-workspace.test-support.ts src/agents/pi-embedded-runner/run/attempt.tools-allow-regression.test.ts src/plugins/loader.ts src/plugins/loader.runtime-registry.test.ts
  • git diff --check origin/main...HEAD

Fixes #75882 Fixes #75907 Fixes #75906 Fixes #75887 Fixes #75851

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/agents/pi-embedded-runner/run/attempt.spawn-workspace.test-support.ts (modified, +36/-20)
  • src/agents/pi-embedded-runner/run/attempt.tools-allow-regression.test.ts (added, +59/-0)
  • src/agents/pi-embedded-runner/run/attempt.ts (modified, +53/-4)
  • src/agents/pi-tools.ts (modified, +190/-145)
  • src/plugins/loader.runtime-registry.test.ts (modified, +28/-1)
  • src/plugins/loader.ts (modified, +40/-20)
RAW_BUFFERClick to expand / collapse

Problem Summary

On Windows 11 (WSL2) + Node 24.14.0, the OpenClaw gateway exhibits a consistent 30-40 second blocking delay on every embedded run cold start, traced specifically to the core-plugin-tools initialization stage. This renders the Telegram bot unresponsive for the duration.

Linux agents on the same config/versions do not exhibit this problem.

System Info

  • OS: Windows 11 (WSL2)
  • Node.js: 24.14.0
  • OpenClaw: 2026.4.29
  • Platform: x86_64 (WSL2)

Root Cause

Trace data pinpoints core-plugin-tools → createOpenClawCodingTools() → createCodingTools() from @mariozechner/pi-coding-agent as the blocking call. This runs unconditionally on every cold start regardless of:

  • tools allowlist (only exec, group:fs, write, edit, read are enabled)
  • tools.profile: minimal — made it WORSE, pushing timing to 43-45s
  • Browser plugin enabled or disabled — no effect

Timing Evidence (78 runs)

Early runs (baseline): core-plugin-tools: 31,337ms – 33,857ms total pipeline: 75,792ms – 81,284ms

Later runs (after ~3 hours): core-plugin-tools: 34,251ms – 38,232ms total pipeline: 85,526ms – 90,764ms

With tools.profile=minimal (reverted): core-plugin-tools: 43,098ms – 44,537ms total pipeline: 105,194ms – 131,557ms

What Was Tried

  • tools.profile=minimal: Made it WORSE (43-45s vs 35s baseline)
  • Browser plugin disabled: No effect
  • Windows Defender exclusion: No effect
  • Telegram bot token replacement: Resolved 409 conflict; lag persists

Code Path

pi-tools-hI2Hhdd_.js:806 createOpenClawCodingTools() → pi-coding-agent/dist/core/tools/index.js: createCodingTools() → returns [createReadTool, createBashTool, createEditTool, createWriteTool]

The pi-coding-agent performs filesystem probing, tool-description generation, and PTY/shell detection on every call. On Windows + Node 24 this is dramatically slower than Linux.

Request

  • Investigate why createCodingTools() is so slow on Windows + Node 24 specifically
  • Consider caching the tool inventory instead of rebuilding on every cold start
  • Or provide a way to defer/lazy-load the coding tools when only basic tools are in the allowlist

extent analysis

TL;DR

Investigate caching the tool inventory or deferring the loading of coding tools to mitigate the 30-40 second blocking delay on Windows 11 (WSL2) with Node 24.14.0.

Guidance

  • Verify that the createCodingTools() function is the bottleneck by adding logging or profiling to measure its execution time on Windows and Linux.
  • Consider implementing a caching mechanism for the tool inventory to avoid rebuilding it on every cold start, potentially using a library like lru-cache or a simple in-memory cache.
  • Explore deferring or lazy-loading the coding tools when only basic tools are in the allowlist, potentially by modifying the createOpenClawCodingTools() function to only load necessary tools.
  • Review the pi-coding-agent code to identify potential optimizations for filesystem probing, tool-description generation, and PTY/shell detection on Windows.

Example

// Simple in-memory cache example
const toolInventoryCache = {};
function createCodingTools() {
  if (toolInventoryCache.inventory) {
    return toolInventoryCache.inventory;
  }
  const inventory = /* rebuild tool inventory */;
  toolInventoryCache.inventory = inventory;
  return inventory;
}

Notes

The issue seems to be specific to Windows 11 (WSL2) with Node 24.14.0, and the pi-coding-agent library. Caching or deferring the loading of coding tools may help mitigate the delay, but further investigation is needed to determine the root cause.

Recommendation

Apply a workaround by caching the tool inventory or deferring the loading of coding tools, as this is likely to provide a significant performance improvement.

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…

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 - ✅(Solved) Fix [Bug] core-plugin-tools blocks for 30-40s on every cold start — Windows + Node 24 only [1 pull requests, 5 comments, 2 participants]