Skip to content

[Bug]: Gateway probe shows 3000ms budget but uses 800ms internally — false timeout on healthy local loopback #46226

@Mdx2025

Description

@Mdx2025

Bug Description

The openclaw gateway probe command displays Probe budget: 3000ms to the user, but internally applies Math.min(800, overallMs) for local loopback connections. This creates a misleading mismatch where:

  1. The CLI shows a 3000ms budget
  2. The actual connection timeout is 800ms
  3. Healthy gateways on slightly slower systems (or under load) falsely report Reachable: no with Connect: failed - timeout

Environment

Symptoms

$ openclaw gateway probe
Gateway Status
Reachable: no
Probe budget: 3000ms

Targets
Local loopback ws://127.0.0.1:18789
Connect: failed - timeout

Yet the gateway is operational:

  • openclaw status --deep reports gateway reachable
  • Control UI connects successfully
  • WebSocket health endpoint responds correctly

Root Cause

In the gateway probe implementation:

  • The CLI displays overallMs (default 3000ms) as the probe budget
  • But for localLoopback kind, it applies: Math.min(800, overallMs)
  • This hardcoded 800ms is insufficient when:
    • The system is under load
    • WebSocket handshake takes longer than expected
    • The gateway client's internal connectChallengeTimeoutMs (4000ms) hasn't even been given time to complete

Related

Suggested Fix

  1. Align displayed budget with actual budget, OR
  2. Increase local loopback budget to at least 4000ms to match the client's internal timeout, OR
  3. Make the budget configurable via openclaw.json

Workaround (Manual Runtime Patch)

For affected deployments, a manual patch on compiled bundles can restore functionality:

// Change from:
Math.min(800, overallMs)
// To:
Math.max(4000, Math.min(overallMs, 8000))

Files requiring patch in installed distribution:

  • dist/gateway-cli-*.js (various hashed filenames)

This is a temporary workaround until the fix is released upstream.

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