Skip to content

All outbound HTTP fails inside gateway process on Windows 10 + Node 22 (WebSocket works) #65164

@Ereece8

Description

@Ereece8

Summary

All outbound HTTP/HTTPS requests from inside the running openclaw gateway process fail on Windows 10 (Node 22.22.0, OpenClaw 2026.4.10). WebSocket connections work fine. Standalone fetch tests with the same tokens, code, and Agent configuration pass immediately.

Environment

  • OS: Windows 10 Home 10.0.19045
  • Node: v22.22.0
  • OpenClaw: 2026.4.10 (44e5b62)
  • undici (openclaw): 8.0.2
  • undici (Node built-in): 6.23.0
  • @buape/carbon: 0.15.0
  • Network: Private profile, no proxy, direct internet

Symptoms

What Result
Telegram deleteWebhook Network request for 'deleteWebhook' failed!
Discord REST (bot identity, metadata) AbortError / fetch failed
Model-pricing bootstrap TimeoutError (hangs then aborts)
Internal WS handshake (native-approval to 127.0.0.1:18789) handshake timeout 10s
Discord WebSocket gateway WORKS (bots show online but can't respond)
Webchat WS WORKS
Control UI WORKS

Standalone test (passes on the same machine)

// Returns 200 OK in ~500ms from a plain node process:
fetch('https://api.telegram.org/bot<TOKEN>/deleteWebhook', { method: 'POST' })
  .then(r => r.json())
  .then(j => console.log(j)); // { ok: true, result: true }

Also passes when replicating openclaw's exact Agent config:

import { Agent, setGlobalDispatcher } from 'undici';
setGlobalDispatcher(new Agent({
  bodyTimeout: 1800000,
  headersTimeout: 1800000,
  connect: { autoSelectFamily: true, autoSelectFamilyAttemptTimeout: 300 }
}));
// fetch() still works fine from standalone process

What I've ruled out

  • Firewall: No outbound rules for node.exe. Inbound block exists for Public profile but network is Private.
  • Proxy: No system/winhttp/env proxy.
  • IPv4/IPv6: Tried autoSelectFamily: false, dnsResultOrder: ipv4first, OPENCLAW_TELEGRAM_DISABLE_AUTO_SELECT_FAMILY=1 — no change.
  • undici version: Downgraded openclaw's undici from v8.0.2 to v6.23.0 (matching Node built-in) — no change.
  • DNS: dns.lookup() works fine. dns.resolve4() returns ECONNREFUSED but openclaw uses dns.lookup.
  • TLS/CA: NODE_USE_SYSTEM_CA=1 present/absent — no difference.
  • Env vars: Stripped Claude Code env vars (OPERON_SANDBOXED_NETWORK, etc.) — no change.
  • Reboot: Fresh Windows reboot — same behavior immediately.

Additional observation: prewarmConfiguredPrimaryModel hangs 5 min

With agents.defaults.model.primary set (e.g. openai-codex/gpt-5.4), the gateway hangs for ~5 minutes between "starting channels and sidecars" and channels actually starting. The hang is in prewarmConfiguredPrimaryModelensureOpenClawModelsJson which makes a network call that never completes (same HTTP bug).

Setting agents.defaults.model.primary: "" skips prewarm and channels start in ~2 seconds. Each agent has their own model.primary so conversations are unaffected.

Feature request: Could you add an OPENCLAW_SKIP_MODEL_PREWARM env var as a workaround?

Hypothesis

Something in openclaw's initialization corrupts the process-level HTTP stack on Windows. Possible causes:

  1. setGlobalDispatcher from undici@8.0.2 conflicts with Node 22's built-in undici@6.23.0 global state
  2. Resource exhaustion during parallel startup of 8+ channel providers (4 Discord + 4 Telegram)
  3. Internal deadlock between HTTP server listener and self-connecting subsystems (native-approval handlers connecting to self on 127.0.0.1:18789)
  4. Windows-specific undici/libuv behavior not seen on macOS/Linux

Steps to reproduce

  1. Windows 10, Node 22.22, openclaw 2026.4.10
  2. Configure 4 agents with Discord + Telegram channels each (8 providers total)
  3. Run openclaw gateway
  4. Observe: all HTTP/fetch calls fail, all WebSocket connections succeed
  5. Run standalone fetch('https://api.telegram.org/...') from a separate node process on same machine — succeeds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions