Skip to content

[Windows] Gateway exits silently without crash log #50472

@chinazll

Description

@chinazll

Bug type

Regression (worked before, now fails)

Summary

Gateway on Windows exits silently without any crash log or exit reason. No JavaScript error, stack trace, or uncaught exception is logged before the process terminates.

Steps to reproduce

  1. Start OpenClaw Gateway on Windows 11
  2. Let it run for a while processing Feishu messages
  3. Observe that Gateway suddenly stops without any warning
  4. Check logs - no crash, no error stack trace, no exit code logged

Expected behavior

Gateway should log exit reason before terminating. Uncaught exceptions should produce stack traces. Process.exit() should be intercepted and logged.

Actual behavior

Gateway running normally, processing Feishu messages. Suddenly stops - no more logs. Health check returns error (connection refused). No crash, no error stack, no exit code logged.

OpenClaw version

2026.3.13

Operating system

Windows 11 (10.0.22631)

Install method

No response

Model

minimax-portal/MiniMax-M2.5

Provider / routing chain

minimax-portal (direct)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Timeline (2026-03-19 22:22-22:23 CST):
22:22:45.108 - WebSocket handshake timeout
22:22:45.110 - gateway connect failed
22:22:45.117 - Error: gateway closed (1000): no close reason
22:22:48 - Assistant agent executed gateway restart
22:22:54-57 - Gateway restarted, processing messages normally
22:23:01.729 - Last log: feishu[product] dispatch complete
22:23:02.318 - Last log: reply completed
Then SILENCE - no more logs until manual restart

Key error log:
{subsystem:gateway/ws} gateway connect failed: handshake-timeout
Error: gateway closed (1000): no close reason
Gateway target: ws://127.0.0.1:18789
Source: local loopback

Impact and severity

Affected: OpenClaw Gateway users on Windows
Severity: High (Gateway stops silently, no auto-recovery)
Frequency: Multiple times observed on the same day
Consequence: Gateway stops working until manually restarted

Additional information

Possible causes:

  1. Uncaught JavaScript exception that bypasses error handler
  2. External process termination (system/anti-virus)
  3. Memory exhaustion leading to process kill
  4. Port 18789 being forcefully taken

Requested fix:

  1. Intercept process.exit() and log exit code
  2. Add global uncaughtException/unhandledRejection handlers that log before exit
  3. Log memory usage before exit if possible
  4. Add watchdog to capture and log unexpected termination

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    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