openclaw - 💡(How to fix) Fix Tool turns can fail on stale hashed pi-tools.before-tool-call runtime import [1 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#63281Fetched 2026-04-09 07:55:56
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
closed ×1

Some tool turns can fail before execution with a missing bundled runtime module error like:

Cannot find module '/opt/homebrew/lib/node_modules/openclaw/dist/pi-tools.before-tool-call.runtime-CT4-8YQv.js'

On the affected install, the package actually contained:

  • dist/pi-tools.before-tool-call.runtime.js
  • dist/pi-tools.before-tool-call.runtime-j0A_sHKG.js

but not the stale hashed filename being requested.

Error Message

Some tool turns can fail before execution with a missing bundled runtime module error like:

Root Cause

Likely root cause

A stale hashed chunk reference survived an update, partial install, or persisted runtime/session state. The current package ships a stable alias (pi-tools.before-tool-call.runtime.js), but some path in the runtime still tries to import the old hashed filename directly.

Fix Action

Fix / Workaround

Local workaround

cd /opt/homebrew/lib/node_modules/openclaw/dist
ln -s pi-tools.before-tool-call.runtime-j0A_sHKG.js pi-tools.before-tool-call.runtime-CT4-8YQv.js

Code Example

Cannot find module '/opt/homebrew/lib/node_modules/openclaw/dist/pi-tools.before-tool-call.runtime-CT4-8YQv.js'

---

cd /opt/homebrew/lib/node_modules/openclaw/dist
ln -s pi-tools.before-tool-call.runtime-j0A_sHKG.js pi-tools.before-tool-call.runtime-CT4-8YQv.js
RAW_BUFFERClick to expand / collapse

Summary

Some tool turns can fail before execution with a missing bundled runtime module error like:

Cannot find module '/opt/homebrew/lib/node_modules/openclaw/dist/pi-tools.before-tool-call.runtime-CT4-8YQv.js'

On the affected install, the package actually contained:

  • dist/pi-tools.before-tool-call.runtime.js
  • dist/pi-tools.before-tool-call.runtime-j0A_sHKG.js

but not the stale hashed filename being requested.

Observed impact

This breaks tool execution in-session before the real tool call happens, so filesystem and messaging actions can become unavailable in an otherwise healthy running gateway.

What I verified

  • openclaw status was healthy overall.
  • dist/pi-tools.before-tool-call.runtime.js correctly re-exported the current hashed chunk.
  • The stale hashed filename was still being referenced somewhere at runtime or in persisted session state.
  • Creating a symlink from the missing stale filename to the current chunk immediately restored imports and tool execution.

Local workaround

cd /opt/homebrew/lib/node_modules/openclaw/dist
ln -s pi-tools.before-tool-call.runtime-j0A_sHKG.js pi-tools.before-tool-call.runtime-CT4-8YQv.js

Likely root cause

A stale hashed chunk reference survived an update, partial install, or persisted runtime/session state. The current package ships a stable alias (pi-tools.before-tool-call.runtime.js), but some path in the runtime still tries to import the old hashed filename directly.

Expected behavior

Runtime imports should go through the stable alias or otherwise tolerate hashed filename churn across updates, so package updates do not strand active sessions/tool loops on missing chunk names.

Suggested fix directions

  • Ensure all dynamic imports use the stable alias file instead of concrete hashed chunk names.
  • Audit persisted session/runtime metadata so hashed chunk filenames are never stored across restarts/updates.
  • Consider a startup/runtime sanity check that detects missing hashed sidecars referenced by persisted state and rewrites them to stable aliases.

Environment

  • OpenClaw: 2026.4.8
  • Install path: /opt/homebrew/lib/node_modules/openclaw
  • Platform: macOS arm64

extent analysis

TL;DR

Creating a symlink from the missing stale filename to the current chunk or ensuring dynamic imports use the stable alias file can resolve the missing bundled runtime module error.

Guidance

  • Verify that the dist/pi-tools.before-tool-call.runtime.js file correctly re-exports the current hashed chunk to ensure the stable alias is functioning as expected.
  • Check for any persisted session or runtime state that may be referencing the old hashed filename and update it to use the stable alias instead.
  • Consider implementing a startup/runtime sanity check to detect and rewrite missing hashed sidecars referenced by persisted state to stable aliases.
  • Review dynamic imports in the code to ensure they are using the stable alias file (pi-tools.before-tool-call.runtime.js) instead of concrete hashed chunk names.

Example

No explicit code example is provided, but the local workaround suggests creating a symlink to resolve the issue:

ln -s pi-tools.before-tool-call.runtime-j0A_sHKG.js pi-tools.before-tool-call.runtime-CT4-8YQv.js

Notes

This solution assumes that the issue is caused by a stale hashed chunk reference surviving an update or persisted runtime/session state. The provided workaround and suggested fix directions should be tested and verified to ensure they resolve the issue without introducing new problems.

Recommendation

Apply the workaround by creating a symlink or ensuring dynamic imports use the stable alias file, as this is a more immediate solution to the problem. Implementing the suggested fix directions will provide a more permanent solution but may require more time and testing.

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

Runtime imports should go through the stable alias or otherwise tolerate hashed filename churn across updates, so package updates do not strand active sessions/tool loops on missing chunk names.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING