OpenClaw Freezes for 5–7 Minutes on Windows Startup (Multi-Agent Bug)

Published April 17, 2026 · Bug #67869 · Affects: 2026.4.11+ · Platform: Windows

If you've configured OpenClaw with 2 or more agents (each with its own workspace) and you're on Windows, you may have noticed the gateway completely freezes after printing "starting channels and sidecars..." — for anywhere from 5 to 7 minutes. Discord bots never come online. HTTP health endpoints don't respond. It looks like a crash, but it isn't.

What's Actually Happening

The culprit is synchronous plugin discovery inside OpenClaw's core. On every boot, the gateway calls discoverOpenClawPlugins(), which performs approximately 62,000 synchronous filesystem callsrealpathSync, existsSync, readFileSync — to scan the 102+ bundled extensions.

On Windows, each sync file call is slow. A single full scan takes ~85 seconds. But here's the kicker: the in-memory discovery cache has a default TTL of 1 second (DEFAULT_DISCOVERY_CACHE_MS = 1e3), and the cache key includes the workspaceDir. With 4 agents on 4 different workspaces, each initialization triggers an independent full rescan — bypassing the cache entirely.

The math: 4 agents × 85 seconds = ~5–7 minutes of a completely blocked event loop.

During that window, Discord's 15-second gateway readiness timeout fires repeatedly, creating an infinite zombie restart loop where the bot never comes online.

Am I Affected?

You're likely affected if:

Workarounds (Until a Fix Ships)

1. Consolidate to a Single Workspace

If your agents don't strictly need separate workspaces, point them all at the same workspace directory. This collapses 4 full rescans into 1 (and the cache actually hits on scans 2–4).

2. Stagger Agent Startup

Start agents one at a time with a delay between each. This doesn't eliminate the hang, but prevents the Discord reconnect loop from spiraling. A simple wrapper script with timeout /T 120 between agent starts helps.

3. Run in WSL Instead of Native Windows

The Linux filesystem in WSL2 handles sync calls significantly faster than Windows NTFS. If you're on Windows 10/11, running OpenClaw inside WSL2 largely eliminates this problem — the same 62,000 calls complete in a few seconds instead of 85 seconds.

4. Wait for the Upstream Fix

The suggested upstream fixes are clearly documented in the issue:

Track fix progress at issue #67869.

Quick Diagnosis

# Run gateway in the foreground and time the startup freeze
openclaw gateway start --no-detach

# You'll see:
# [gateway] starting channels and sidecars...
# (... nothing for 5+ minutes on affected systems ...)
# [gateway] discord channel ready

Need Help?

If you're hitting this bug and need help restructuring your multi-agent setup — or migrating to WSL — ClawReady's setup service covers exactly this. We've seen this pattern a lot on Windows deployments.

← Back to blog