openclaw - 💡(How to fix) Fix [5.2] Gateway crashes after ~12h uptime: consumeGatewayRestartIntentPayloadSync is not a function, then supervisor downgrade leaves install schema-incompatible [1 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#77095Fetched 2026-05-05 05:52:17
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
2
Author
Timeline (top)
commented ×1

After running openclaw 2026.5.2 (a448042) cleanly for ~12 hours, the gateway crashed with an unhandled rejection:

TypeError: consumeGatewayRestartIntentPayloadSync is not a function

The supervisor (or some recovery path I haven't been able to fully trace) then downgraded the global npm package to 2026.4.29 — but the on-disk ~/.openclaw/openclaw.json was still at 5.2 schema. Result: the older binary refuses to start ("Refusing to start the gateway service because this OpenClaw binary (2026.4.29) is older than the config last written by OpenClaw 2026.5.2"), launchd KeepAlive's it forever in a tight loop, and the gateway is permanently unreachable until the user manually npm i -g openclaw@latest.

This is not the first occurrence — the same downgrade backup pattern (openclaw.json.before-downgrade-20260429-...) appeared 12 hours earlier, suggesting the crash is reproducible at roughly the 12-hour uptime mark.

Error Message

TypeError: consumeGatewayRestartIntentPayloadSync is not a function

Root Cause

The supervisor (or some recovery path I haven't been able to fully trace) then downgraded the global npm package to 2026.4.29 — but the on-disk ~/.openclaw/openclaw.json was still at 5.2 schema. Result: the older binary refuses to start ("Refusing to start the gateway service because this OpenClaw binary (2026.4.29) is older than the config last written by OpenClaw 2026.5.2"), launchd KeepAlive's it forever in a tight loop, and the gateway is permanently unreachable until the user manually npm i -g openclaw@latest.

Code Example

TypeError: consumeGatewayRestartIntentPayloadSync is not a function

---

{
  "version": 1,
  "generatedAt": "2026-05-03T16:31:08.909Z",
  "reason": "unhandled_rejection",
  "process": {
    "pid": 82397,
    "platform": "darwin",
    "arch": "arm64",
    "node": "25.8.2",
    "uptimeMs": 43208279
  },
  "error": {
    "name": "TypeError",
    "message": "consumeGatewayRestartIntentPayloadSync is not a function"
  }
}

---

diagnostic.heartbeat:           240
diagnostic.memory.sample:       240
exec.process.completed:         150
session.state:                  119
queue.lane.enqueue/dequeue:     96 / 96
diagnostic.liveness.warning:    16
session.long_running:           5
message.queued:                 11

---

# Move the downgrade backup out of the way so future "auto repair" can't reuse it
mkdir -p ~/.openclaw/_archive
mv ~/.openclaw/openclaw.json.before-downgrade-20260429-* ~/.openclaw/_archive/

# Re-upgrade
npm i -g openclaw@latest      # back to 2026.5.2
openclaw gateway restart
RAW_BUFFERClick to expand / collapse

Bug type

Crash + recovery path bug. The crash itself is bad; the post-crash recovery makes the install unbootable.

Beta release blocker

Yes — affects 5.2 GA users on macOS. Recovery requires manual npm i -g openclaw@latest; the supervisor's auto-recovery actively makes the situation worse.

Summary

After running openclaw 2026.5.2 (a448042) cleanly for ~12 hours, the gateway crashed with an unhandled rejection:

TypeError: consumeGatewayRestartIntentPayloadSync is not a function

The supervisor (or some recovery path I haven't been able to fully trace) then downgraded the global npm package to 2026.4.29 — but the on-disk ~/.openclaw/openclaw.json was still at 5.2 schema. Result: the older binary refuses to start ("Refusing to start the gateway service because this OpenClaw binary (2026.4.29) is older than the config last written by OpenClaw 2026.5.2"), launchd KeepAlive's it forever in a tight loop, and the gateway is permanently unreachable until the user manually npm i -g openclaw@latest.

This is not the first occurrence — the same downgrade backup pattern (openclaw.json.before-downgrade-20260429-...) appeared 12 hours earlier, suggesting the crash is reproducible at roughly the 12-hour uptime mark.

Crash signature

From ~/.openclaw/logs/stability/openclaw-stability-2026-05-03T16-31-08-909Z-82397-unhandled_rejection.json:

{
  "version": 1,
  "generatedAt": "2026-05-03T16:31:08.909Z",
  "reason": "unhandled_rejection",
  "process": {
    "pid": 82397,
    "platform": "darwin",
    "arch": "arm64",
    "node": "25.8.2",
    "uptimeMs": 43208279
  },
  "error": {
    "name": "TypeError",
    "message": "consumeGatewayRestartIntentPayloadSync is not a function"
  }
}

uptimeMs = 43,208,279 ms ≈ 12.0 hours. Heap was at 412 MB used / 532 MB total at crash, RSS 116 MB — not memory-pressured.

Snapshot summary leading up to the crash (last 1000 events, 642 dropped):

diagnostic.heartbeat:           240
diagnostic.memory.sample:       240
exec.process.completed:         150
session.state:                  119
queue.lane.enqueue/dequeue:     96 / 96
diagnostic.liveness.warning:    16
session.long_running:           5
message.queued:                 11

So there had been some long-running sessions and liveness warnings, but the process was otherwise functional.

Reproduction (best inference)

  1. Install [email protected] on macOS (Apple Silicon, Node 25.8.2).
  2. Use it normally for ~12 hours — including agent runs that perform gateway tool restart actions (channels reload, plugins update, etc.).
  3. At some point a gateway restart intent payload is consumed via the synchronous code path.
  4. Process throws TypeError: consumeGatewayRestartIntentPayloadSync is not a function and crashes (unhandled rejection).
  5. Supervisor / recovery path downgrades global package to 2026.4.29.
  6. 2026.4.29 binary refuses to start because ~/.openclaw/openclaw.json meta.lastTouchedVersion is 2026.5.2.
  7. Gateway is now in a permanent restart loop — gateway.err.log fills with "Refusing to start the gateway service...".

I don't have a deterministic trigger for step 3 yet — it's possible the function is called on every Nth restart intent, or specifically when an intent coalesces with an in-flight one (cf. #74424, which is the same restart-intent payload subsystem with a different failure mode).

Expected behavior

  • The function being called (consumeGatewayRestartIntentPayloadSync) should exist, or the call site should use the available async variant.
  • The post-crash recovery should not leave the install in a state that's neither bootable nor downgrade-clean. If a downgrade is going to happen, the supervisor should also restore a config snapshot from before the schema bump, or refuse to downgrade.

Actual behavior

  • Crash with TypeError.
  • Supervisor downgrades binary; config left at newer schema; install unbootable.
  • launchd KeepAlive churns indefinitely.

Recovery steps that worked for me

# Move the downgrade backup out of the way so future "auto repair" can't reuse it
mkdir -p ~/.openclaw/_archive
mv ~/.openclaw/openclaw.json.before-downgrade-20260429-* ~/.openclaw/_archive/

# Re-upgrade
npm i -g openclaw@latest      # back to 2026.5.2
openclaw gateway restart

After ~45s of plugin staging, gateway probe was healthy: ok=true connect=true rpcOk=true.

But the underlying ~12h crash is unresolved; this is a reset, not a fix.

Environment

  • macOS Darwin 25.4.0 (Apple Silicon)
  • Node v25.8.2
  • npm v11.11.1
  • openclaw 2026.5.2 (a448042) → auto-downgrades to 2026.4.29 on crash
  • Plugins enabled: memory-core, telegram, browser, ... (full list available on request)

Related

  • #74424 — same restart-intent payload subsystem; different symptom (silent drop of continuationMessage)
  • #76586 — different 5.2 upgrade-path break (externalized plugins); shows meta.lastTouchedVersion-based downgrade-blocking has been a known footgun in 5.2

Attachments

I can attach (sanitised):

  • openclaw-stability-2026-05-03T16-31-08-909Z-82397-unhandled_rejection.json (262 KB, contains last 1000 telemetry events)
  • Last 200 lines of gateway.err.log showing the Refusing-to-start loop
  • ~/.openclaw/openclaw.json.before-downgrade-20260429-20260503-105351 — the config snapshot the auto-downgrade preserved (showing this isn't a one-shot — same downgrade was triggered 12 hours earlier)

Let me know what's most useful.

extent analysis

TL;DR

The most likely fix is to ensure the consumeGatewayRestartIntentPayloadSync function exists or use the available async variant to prevent the crash, and modify the supervisor's recovery path to handle config schema versions correctly.

Guidance

  • Investigate the consumeGatewayRestartIntentPayloadSync function call site to determine why it's being called as a synchronous function when it might not exist or should be asynchronous.
  • Review the supervisor's auto-recovery logic to prevent downgrading the global package to an incompatible version (2026.4.29) when the config schema version is newer (2026.5.2).
  • Consider adding a check to ensure the config schema version is compatible with the downgraded package version before attempting to start the gateway service.
  • To mitigate the issue temporarily, users can follow the provided recovery steps: move the downgrade backup out of the way, re-upgrade to the latest version, and restart the gateway.

Example

No code snippet is provided as the issue requires further investigation into the consumeGatewayRestartIntentPayloadSync function and the supervisor's recovery logic.

Notes

The root cause of the crash is the TypeError exception due to the missing consumeGatewayRestartIntentPayloadSync function. However, the recovery path's behavior of downgrading the package and leaving the config schema version incompatible exacerbates the issue. The provided reproduction steps and environment details should help in debugging and resolving the problem.

Recommendation

Apply a workaround by modifying the recovery path to handle config schema versions correctly and ensuring the consumeGatewayRestartIntentPayloadSync function is properly defined or called asynchronously. This approach addresses both the crash and the subsequent recovery issue, making it a more comprehensive solution.

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…

FAQ

Expected behavior

  • The function being called (consumeGatewayRestartIntentPayloadSync) should exist, or the call site should use the available async variant.
  • The post-crash recovery should not leave the install in a state that's neither bootable nor downgrade-clean. If a downgrade is going to happen, the supervisor should also restore a config snapshot from before the schema bump, or refuse to downgrade.

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 - 💡(How to fix) Fix [5.2] Gateway crashes after ~12h uptime: consumeGatewayRestartIntentPayloadSync is not a function, then supervisor downgrade leaves install schema-incompatible [1 comments, 2 participants]