openclaw - 💡(How to fix) Fix BB envelope: prefer MessageSidFull over MessageSid so one-shot CLI can resolve message ids [1 comments, 2 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#80316Fetched 2026-05-11 03:16:20
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

Error Message

Error: BlueBubbles short message id short:N-digit is no longer available. Use MessageSidFull.

Root Cause

reactions-D1ETgpPi.js:864 (resolveBlueBubblesMessageId) consults an in-memory Map (blueBubblesShortIdToUuid) populated by monitor-processing.js:603 when messages flow through the long-running gateway. The CLI is a fresh subprocess per invocation, so the in-memory map is empty in the CLI's process and the short→uuid lookup misses.

Meanwhile get-reply.js:1735-1737 constructs the agent's metadata block:

const messageId = normalizePromptMetadataString(ctx.MessageSid);
const messageIdFull = normalizePromptMetadataString(ctx.MessageSidFull);
const resolvedMessageId = messageId ?? messageIdFull;

It prefers the SHORT id over the FULL GUID, so the agent never sees the GUID it would need to call the CLI directly. The agent gets "message_id": "353" in its envelope, has no GUID to fall back on, and the CLI rejects the short id.

Fix Action

Fix / Workaround

Patched the dist file at /opt/homebrew/lib/node_modules/openclaw/dist/get-reply-462JLlw-.js with the one-line swap. Patch reapply script at https://github.com/<workspace> for survival across brew upgrade openclaw. Will retire the script when this lands upstream.

Code Example

Error: BlueBubbles short message id <short:N-digit> is no longer available. Use MessageSidFull.

---

const messageId = normalizePromptMetadataString(ctx.MessageSid);
const messageIdFull = normalizePromptMetadataString(ctx.MessageSidFull);
const resolvedMessageId = messageId ?? messageIdFull;

---

-    const resolvedMessageId = messageId ?? messageIdFull;
+    const resolvedMessageId = messageIdFull ?? messageId;
RAW_BUFFERClick to expand / collapse

Symptom

openclaw message react --channel bluebubbles --message-id <short> from a one-shot CLI subprocess fails with:

Error: BlueBubbles short message id <short:N-digit> is no longer available. Use MessageSidFull.

Same class hits reply, edit, unsend whenever the agent invokes them via the CLI using the short id from its conversation_info envelope.

Root cause

reactions-D1ETgpPi.js:864 (resolveBlueBubblesMessageId) consults an in-memory Map (blueBubblesShortIdToUuid) populated by monitor-processing.js:603 when messages flow through the long-running gateway. The CLI is a fresh subprocess per invocation, so the in-memory map is empty in the CLI's process and the short→uuid lookup misses.

Meanwhile get-reply.js:1735-1737 constructs the agent's metadata block:

const messageId = normalizePromptMetadataString(ctx.MessageSid);
const messageIdFull = normalizePromptMetadataString(ctx.MessageSidFull);
const resolvedMessageId = messageId ?? messageIdFull;

It prefers the SHORT id over the FULL GUID, so the agent never sees the GUID it would need to call the CLI directly. The agent gets "message_id": "353" in its envelope, has no GUID to fall back on, and the CLI rejects the short id.

Proposed fix

One-line swap at get-reply.js:1737:

-    const resolvedMessageId = messageId ?? messageIdFull;
+    const resolvedMessageId = messageIdFull ?? messageId;

Agent now gets the full GUID when available, falls back to short id only when the full GUID isn't present. CLI works directly. No in-memory map dependency.

Alternative (more invasive): add a separate message_id_full field to the conversation_info envelope so both ids are available. Useful if any consumers depend on the short id format.

Verified locally

Patched the dist file at /opt/homebrew/lib/node_modules/openclaw/dist/get-reply-462JLlw-.js with the one-line swap. Patch reapply script at https://github.com/<workspace> for survival across brew upgrade openclaw. Will retire the script when this lands upstream.

Version: openclaw 2026.5.7

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 BB envelope: prefer MessageSidFull over MessageSid so one-shot CLI can resolve message ids [1 comments, 2 participants]