openclaw - 💡(How to fix) Fix [Bug]: Gateway shutdown can miss hook-runner-global dist alias [1 pull requests]

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…

Gateway shutdown can fail to run gateway_stop hooks when the built server resolves a missing dist/plugins/hook-runner-global.js module.

Error Message

Window analyzed: 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z Counts:

  • 1 line contained: Cannot find module '[redacted repo path]/dist/plugins/hook-runner-global.js'

Redacted excerpt: signal SIGINT received received SIGINT; shutting down shutdown error: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '[redacted repo path]/dist/plugins/hook-runner-global.js' imported from [redacted repo path]/dist/server.impl-[hash].js received SIGINT during shutdown; ignoring

Root Cause

Impact and severity

Affected: built gateway shutdown. Severity: Medium, because shutdown cleanup hooks can be skipped. Frequency: one observed shutdown error in the analyzed two-day log window. Consequence: gateway_stop plugin cleanup may not run.

Fix Action

Fixed

Code Example

Window analyzed: 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z
Counts:
- 1 line contained: Cannot find module '[redacted repo path]/dist/plugins/hook-runner-global.js'

Redacted excerpt:
signal SIGINT received
received SIGINT; shutting down
shutdown error: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '[redacted repo path]/dist/plugins/hook-runner-global.js' imported from [redacted repo path]/dist/server.impl-[hash].js
received SIGINT during shutdown; ignoring
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Gateway shutdown can fail to run gateway_stop hooks when the built server resolves a missing dist/plugins/hook-runner-global.js module.

Steps to reproduce

  1. Run a built OpenClaw gateway from a dist tree where the stable plugins/hook-runner-global.js alias is missing.
  2. Send SIGINT to the gateway.
  3. Observe shutdown attempt to dynamically import the missing module.

Expected behavior

Gateway shutdown should resolve the global hook runner from a stable dist path and run gateway_stop hooks without a module-not-found error.

Actual behavior

One shutdown in the analyzed log window failed with ERR_MODULE_NOT_FOUND for dist/plugins/hook-runner-global.js imported from a built server.impl chunk.

OpenClaw version

2026.5.25 dev checkout

Operating system

Linux WSL2

Install method

pnpm dev / built gateway dist

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Window analyzed: 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z
Counts:
- 1 line contained: Cannot find module '[redacted repo path]/dist/plugins/hook-runner-global.js'

Redacted excerpt:
signal SIGINT received
received SIGINT; shutting down
shutdown error: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '[redacted repo path]/dist/plugins/hook-runner-global.js' imported from [redacted repo path]/dist/server.impl-[hash].js
received SIGINT during shutdown; ignoring

Impact and severity

Affected: built gateway shutdown. Severity: Medium, because shutdown cleanup hooks can be skipped. Frequency: one observed shutdown error in the analyzed two-day log window. Consequence: gateway_stop plugin cleanup may not run.

Additional information

The fix should keep the lazy shutdown import boundary while ensuring postbuild can repair the stable nested hook-runner alias when only the hashed root chunk is present.

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

Gateway shutdown should resolve the global hook runner from a stable dist path and run gateway_stop hooks without a module-not-found error.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING