openclaw - 💡(How to fix) Fix Workspace hooks rejected as "cannot override openclaw-managed hook code" and replaced with empty managed versions (2026.4.23+) [1 participants]

Official PRs (…)
ON THIS PAGE

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#72370Fetched 2026-04-27 05:30:46
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

On openclaw 2026.4.23 and 2026.4.24 (macOS), all workspace-defined hooks are silently rejected at gateway startup with the message:

[hooks/workspace] Ignoring openclaw-workspace hook "<name>" because it cannot override openclaw-managed hook code

openclaw then loads its own internal versions of the same-named hooks, but those internal versions have no events defined in metadata, meaning the workspace hooks are not just overridden — they're effectively replaced with no-ops. The custom logic in the workspace hook files never runs.

Error Message

  • No error or warning surfaced to user beyond the log line
  • If shadowing managed hook names is intentionally disallowed, the workspace hook loader should fail loudly (status command, dashboard surfacing) rather than only logging at WARN level on cold start.
  • If managed hooks have no events defined, they shouldn't take priority over workspace hooks that do — or at minimum, that combination should produce an actionable error so the user can rename the workspace hook.

Root Cause

[hooks/workspace] Ignoring openclaw-workspace hook "<name>" because it cannot override openclaw-managed hook code

Code Example

[hooks/workspace] Ignoring openclaw-workspace hook "<name>" because it cannot override openclaw-managed hook code

---

2026-04-26T17:29:32.260-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "cognitive-compressor" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "compaction-protocol-pin" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "compliance-logger" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "memory-arbiter" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "memory-lifecycle" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "protocol-injector" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "protocol-validators" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "semantic-protocol" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "workflow-checkpoint" because it cannot override openclaw-managed hook code

---

2026-04-26T17:29:32.275-04:00 [hooks:loader] Loading managed hook code into the gateway process. Managed hooks are trusted local code.
2026-04-26T17:29:32.306-04:00 [hooks:loader] Hook 'cognitive-compressor' has no events defined in metadata
2026-04-26T17:29:32.316-04:00 [hooks:loader] Hook 'memory-arbiter' has no events defined in metadata
2026-04-26T17:29:32.318-04:00 [hooks:loader] Hook 'memory-lifecycle' has no events defined in metadata
2026-04-26T17:29:32.321-04:00 [hooks:loader] Hook 'protocol-validators' has no events defined in metadata
RAW_BUFFERClick to expand / collapse

Summary

On openclaw 2026.4.23 and 2026.4.24 (macOS), all workspace-defined hooks are silently rejected at gateway startup with the message:

[hooks/workspace] Ignoring openclaw-workspace hook "<name>" because it cannot override openclaw-managed hook code

openclaw then loads its own internal versions of the same-named hooks, but those internal versions have no events defined in metadata, meaning the workspace hooks are not just overridden — they're effectively replaced with no-ops. The custom logic in the workspace hook files never runs.

Environment

  • openclaw version: 2026.4.23 (also reproduced on 2026.4.24)
  • OS: macOS (Mac mini M4, Darwin)
  • Node: v25.9.0
  • Service: LaunchAgent (ai.openclaw.gateway.plist)
  • Workspace: ~/clawd with hooks defined under workspace's hook configuration

Affected hooks

All 9 of our workspace's "Goldfish Brain" hooks are being rejected:

  1. cognitive-compressor
  2. compaction-protocol-pin
  3. compliance-logger
  4. memory-arbiter
  5. memory-lifecycle
  6. protocol-injector
  7. protocol-validators
  8. semantic-protocol
  9. workflow-checkpoint

These hooks share names with openclaw-managed hooks, and the gateway appears to be refusing to allow workspace versions to override them.

Log evidence

At gateway startup on 2026.4.23 (post-rollback from 4.24, fresh restart):

2026-04-26T17:29:32.260-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "cognitive-compressor" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "compaction-protocol-pin" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "compliance-logger" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "memory-arbiter" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.261-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "memory-lifecycle" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "protocol-injector" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "protocol-validators" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "semantic-protocol" because it cannot override openclaw-managed hook code
2026-04-26T17:29:32.262-04:00 [hooks/workspace] Ignoring openclaw-workspace hook "workflow-checkpoint" because it cannot override openclaw-managed hook code

Immediately followed by:

2026-04-26T17:29:32.275-04:00 [hooks:loader] Loading managed hook code into the gateway process. Managed hooks are trusted local code.
2026-04-26T17:29:32.306-04:00 [hooks:loader] Hook 'cognitive-compressor' has no events defined in metadata
2026-04-26T17:29:32.316-04:00 [hooks:loader] Hook 'memory-arbiter' has no events defined in metadata
2026-04-26T17:29:32.318-04:00 [hooks:loader] Hook 'memory-lifecycle' has no events defined in metadata
2026-04-26T17:29:32.321-04:00 [hooks:loader] Hook 'protocol-validators' has no events defined in metadata

So the gateway:

  1. Sees workspace versions of these hooks → rejects them
  2. Loads its own managed versions instead
  3. Several of the managed versions have no events configured → effective no-op

Source location (from log metadata): dist/subsystem-bmJ5rL4Q.js:338

Impact

The workspace hooks contain custom logic for compaction handling, memory lifecycle, semantic protocols, and workflow checkpoints. Silent rejection means:

  • No error or warning surfaced to user beyond the log line
  • openclaw status and similar commands report no hook problems
  • Workspace appears to be "working" but custom guardrails aren't running
  • Combined with #71325/#60858 (compaction safeguard hot loop), workspace's compaction-protocol-pin hook — which was specifically intended to mitigate that loop — is silently disabled

Versions tested

  • 2026.4.23: rejection occurs ✗
  • 2026.4.24: rejection occurs ✗

I rolled back from 4.24 → 4.23 today initially thinking this was tied to the 4.24 Bonjour Ciao crash (#71869). Confirmed today via post-rollback logs that the hook rejection persists on 4.23, so it's not version-specific to 4.24 — possibly introduced earlier in the 2026.4.x series.

Suggested investigation

  • What determines whether a workspace hook "can override" a managed hook? Is there a metadata flag (e.g. overridable: true on the managed hook) we should be looking for?
  • If shadowing managed hook names is intentionally disallowed, the workspace hook loader should fail loudly (status command, dashboard surfacing) rather than only logging at WARN level on cold start.
  • If managed hooks have no events defined, they shouldn't take priority over workspace hooks that do — or at minimum, that combination should produce an actionable error so the user can rename the workspace hook.

Happy to provide a dump of one of the workspace hook files (semantic-protocol.js etc.) if useful for repro.

extent analysis

TL;DR

Rename the workspace hooks to avoid naming conflicts with openclaw-managed hooks.

Guidance

  • Identify the naming conflicts between workspace hooks and openclaw-managed hooks.
  • Rename the workspace hooks to unique names that do not conflict with openclaw-managed hooks.
  • Verify that the renamed hooks are loaded correctly and their custom logic is executed.
  • Investigate the metadata flags for managed hooks to determine if there's an overridable flag that can be set to allow workspace hooks to override managed hooks.

Example

No code snippet is provided as the issue is related to configuration and naming conflicts.

Notes

The issue is specific to openclaw versions 2026.4.23 and 2026.4.24 on macOS, and the solution may not apply to other versions or platforms.

Recommendation

Apply the workaround by renaming the workspace hooks to avoid naming conflicts with openclaw-managed hooks, as this is a straightforward and effective solution to resolve the issue.

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…

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 Workspace hooks rejected as "cannot override openclaw-managed hook code" and replaced with empty managed versions (2026.4.23+) [1 participants]