openclaw - 💡(How to fix) Fix Preserve Signal reply-quote context through queued followup drains [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#84364Fetched 2026-05-20 03:41:08
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Author
Timeline (top)
labeled ×2closed ×1commented ×1

Signal reply-quote context is lost when an inbound message is queued and later drained through the followup queue. Direct, non-queued delivery includes a block like:

Reply target of current user message (untrusted, for context):
{ ... quoted sender/body metadata ... }

but queued delivery replays only the raw queued body, so the agent cannot see which earlier message the user replied to.

Root Cause

Signal reply-quote context is lost when an inbound message is queued and later drained through the followup queue. Direct, non-queued delivery includes a block like:

Reply target of current user message (untrusted, for context):
{ ... quoted sender/body metadata ... }

but queued delivery replays only the raw queued body, so the agent cannot see which earlier message the user replied to.

Fix Action

Fix / Workaround

Current local patch

We are carrying workspace patch 42, scripts/patch-queued-reply-context.sh.

The patch targets the main get-reply-*.js bundle and wraps the prompt: queuedBody, field in the followup queue item construction. If ctx.ReplyToBody is present, it prepends the same untrusted JSON reply-target block used by the direct path before assigning the queued prompt.

Code Example

Reply target of current user message (untrusted, for context):
{ ... quoted sender/body metadata ... }
RAW_BUFFERClick to expand / collapse

Summary

Signal reply-quote context is lost when an inbound message is queued and later drained through the followup queue. Direct, non-queued delivery includes a block like:

Reply target of current user message (untrusted, for context):
{ ... quoted sender/body metadata ... }

but queued delivery replays only the raw queued body, so the agent cannot see which earlier message the user replied to.

Impact

This breaks direct Signal conversations when the agent is already busy and the next user message reply-quotes a prior message. The followup/collect/steer drain path drops ReplyToBody / ReplyToSender / ReplyToIsQuote, so the model answers without the quote context that would have been present in the immediate path.

This is especially visible when multiple short Signal messages arrive while a long run is active: the queued followup loses the quoted target and can answer the wrong thread/question.

Current local patch

We are carrying workspace patch 42, scripts/patch-queued-reply-context.sh.

The patch targets the main get-reply-*.js bundle and wraps the prompt: queuedBody, field in the followup queue item construction. If ctx.ReplyToBody is present, it prepends the same untrusted JSON reply-target block used by the direct path before assigning the queued prompt.

Patch intent:

  • preserve ReplyToBody
  • preserve ReplyToSender
  • preserve ReplyToIsQuote
  • apply to single followup, steer, steer-backlog, and collect, since these all eventually feed item.prompt to the agent runner
  • keep the context marked untrusted, matching direct delivery semantics

Expected upstream behavior

Queued inbound messages should preserve the same reply-context metadata as non-queued inbound messages. A reply-quoted Signal message should expose the quote target to the model whether the turn runs immediately or after queue drain.

Suggested fix direction

Instead of patching the bundled queuedBody prompt string late, upstream should probably preserve structured reply context on the queued run item and render it through the same helper/path used by direct delivery.

At minimum, when constructing the queued followup prompt, include the direct-path formatUntrustedJsonBlock("Reply target of current user message (untrusted, for context):", ...) block whenever ctx.ReplyToBody exists.

Validation

A regression test should cover:

  1. Current session is busy, so a new Signal message is queued.
  2. The queued message has reply metadata (ReplyToBody, sender, quote flag).
  3. After queue drain, the compiled prompt includes the reply-target untrusted JSON block before the user body.
  4. This works for at least single followup and collect/steer queue paths.

Local status

Clean [email protected] still appeared to queue raw queuedBody without reply-target context, so we are keeping local patch #42 until upstream covers this.

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 Preserve Signal reply-quote context through queued followup drains [1 comments, 2 participants]