Skip to content

[Bug] Bundled hooks missing handler files in npm package #9582

@mafabiorx

Description

@mafabiorx

Description

The bundled hooks in dist/hooks/bundled/ are missing their handler files (.ts or .js). Only HOOK.md files are included in the npm package, but the actual handler implementations are not compiled/copied from src/hooks/bundled/.

Affected Hooks

All bundled hooks:

  • boot-md
  • session-memory
  • command-logger
  • soul-evil

Expected Behavior

Each hook directory in dist/hooks/bundled/ should contain:

  • HOOK.md (metadata)
  • handler.js (compiled handler)

Actual Behavior

Only HOOK.md is present:

$ ls dist/hooks/bundled/boot-md/
HOOK.md

The hook loader in hooks-status-*.js looks for handler.ts, handler.js, index.ts, or index.js and logs a warning when not found:

[hooks] Hook "boot-md" has HOOK.md but no handler file in /path/to/boot-md

This causes openclaw hooks list to return "No hooks found".

Source Code Verification

The handlers exist in the source:

  • src/hooks/bundled/boot-md/handler.ts
  • src/hooks/bundled/session-memory/handler.ts
  • etc.

But they are not being compiled/copied to dist/hooks/bundled/ during the build process.

Environment

  • OpenClaw version: 2026.2.2-3 / 2026.2.3-1
  • Platform: Cloudflare Workers (Linux)

Suggested Fix

The build script should compile the TypeScript handlers to JavaScript and include them in the dist/hooks/bundled/ directories, or alternatively bundle them into a shared module that the hook loader can import.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions