openclaw - 💡(How to fix) Fix Bug: Voice message processing permanently breaks plugin hooks [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#55534Fetched 2026-04-08 01:38:20
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1locked ×1

Error Message

  • Text messages: plugin hooks work perfectly (tested 6+ consecutive turns)
  • After ONE voice message: hooks permanently stop firing for ALL subsequent messages
  • Gateway process stays alive (same PID), bot continues responding
  • Log file stops being written after the voice message (both structured log and stderr)
  • No errors, no uncaught exceptions, no crash — silent failure
  • Only fix: openclaw gateway restart

Code Example

[INFO] 05:34:13 [Hindsight] before_prompt_build - bank: main::57945277
[INFO] 05:34:14 [Hindsight] Raw recall response (10 results before topK)
[INFO] 05:34:14 [Hindsight] After topK (unlimited): 10 results injected
[INFO] 05:34:28 [Hindsight Hook] agent_end triggered - bank: main::57945277
[INFO] 05:34:28 [Hindsight] Retained via HTTP (async): {"success":true}
RAW_BUFFERClick to expand / collapse

Bug: Voice message processing permanently breaks plugin hooks

Environment

  • OpenClaw version: 2026.3.24 (latest)
  • OS: macOS Sequoia (Apple Silicon M4)
  • Node: v25.8.2
  • Plugin: @vectorize-io/hindsight-openclaw v0.4.19
  • Channel: Telegram
  • STT: Groq whisper-large-v3
  • TTS: ElevenLabs

Steps to reproduce

  1. Configure Hindsight plugin with autoRecall: true, autoRetain: true
  2. Send several text messages via Telegram → plugin hooks fire correctly (before_prompt_build + agent_end logged, memories injected and retained)
  3. Send a voice message via Telegram
  4. Bot responds to the voice message normally
  5. Send another text message → plugin hooks NO LONGER fire. No before_prompt_build, no agent_end in logs
  6. All subsequent messages (text or voice) — hooks remain dead until gateway restart

Observed behavior

  • Text messages: plugin hooks work perfectly (tested 6+ consecutive turns)
  • After ONE voice message: hooks permanently stop firing for ALL subsequent messages
  • Gateway process stays alive (same PID), bot continues responding
  • Log file stops being written after the voice message (both structured log and stderr)
  • No errors, no uncaught exceptions, no crash — silent failure
  • Only fix: openclaw gateway restart

Expected behavior

Plugin hooks should fire on every turn regardless of message type (text, voice, image, etc.)

Diagnostic data

Last successful hook call (text message):

[INFO] 05:34:13 [Hindsight] before_prompt_build - bank: main::57945277
[INFO] 05:34:14 [Hindsight] Raw recall response (10 results before topK)
[INFO] 05:34:14 [Hindsight] After topK (unlimited): 10 results injected
[INFO] 05:34:28 [Hindsight Hook] agent_end triggered - bank: main::57945277
[INFO] 05:34:28 [Hindsight] Retained via HTTP (async): {"success":true}

After voice message: ZERO log entries. Log file modification timestamp freezes.

Additional context

  • STT config: tools.media.audio.models: [{provider: "groq", model: "whisper-large-v3"}]
  • Groq provider has empty models: [] in models.providers.groq
  • plugins.allow was tested both empty and with explicit ["hindsight-openclaw"] — same behavior
  • Not related to hot-reload: tested with no config changes between messages
  • Plugin has try-catch around both hooks — errors would be logged
  • Hypothesis: voice/STT processing path corrupts the plugin hook registry or event loop, causing hasHooks("before_prompt_build") to return false for all subsequent calls

extent analysis

Fix Plan

To resolve the issue of plugin hooks not firing after a voice message is processed, we need to ensure that the event loop and plugin hook registry are not corrupted by the voice/STT processing path.

Here are the steps to fix the issue:

  • Modify the hindsight-openclaw plugin to properly handle voice messages and prevent corruption of the plugin hook registry.
  • Add error handling to the voice message processing code to catch and log any potential errors.
  • Implement a mechanism to reset the plugin hook registry after processing a voice message.

Example code changes:

// In the hindsight-openclaw plugin
const { hasHooks } = require('openclaw');

// ...

// Before processing a voice message
const originalHooks = hasHooks("before_prompt_build");

// Process the voice message
try {
  // Voice message processing code here
} catch (error) {
  console.error('Error processing voice message:', error);
}

// After processing a voice message, reset the plugin hook registry
if (originalHooks) {
  // Re-register the before_prompt_build hook
  // This will ensure that the hook is fired for subsequent messages
  require('openclaw').registerHook("before_prompt_build", () => {
    // Hook implementation here
  });
}

Verification

To verify that the fix worked, follow these steps:

  • Send a voice message via Telegram and verify that the plugin hooks are still firing after the message is processed.
  • Check the log file to ensure that log entries are being written after the voice message.
  • Test with multiple consecutive voice messages to ensure that the plugin hooks continue to fire.

Extra Tips

  • Make sure to test the fix thoroughly to ensure that it resolves the issue without introducing any new problems.
  • Consider adding additional logging and error handling to the voice message processing code to help diagnose any future issues.
  • If the issue persists, try debugging the hindsight-openclaw plugin to identify the root cause of the problem.

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

Plugin hooks should fire on every turn regardless of message type (text, voice, image, etc.)

Still need to ship something?

×6

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

Back to top recommendations

TRENDING