← Back to library

replyToMode 自动注入回复锚点,线程回复真正可控(PR #15011)

解决“已配置 replyToMode=first/all 但仍不进线程”的场景:在 reply tag 处理前自动注入 replyToCurrent,确保 replyToId 可被正确计算。

GITHUBDiscovered 2026-02-13Author shtse8
Prerequisites
  • Channel supports threaded or reply-style messaging (e.g., Telegram/Slack).
  • Channel config enables replyToMode with value first or all.
  • You can reproduce at least one case where replies were previously sent as plain messages.
Steps
  1. Set replyToMode in channel config and restart gateway with PR #15011 included.
  2. Send a trigger message without manually adding [[reply_to_current]] and capture the assistant response.
  3. Verify response payload now carries replyToId/currentMessageId mapping before filtering.
  4. Test multi-block responses to ensure both final-reply and block-streaming paths keep threading behavior.
  5. Document per-chat-type override strategy (direct/group/thread) to avoid over-threading.
Commands
openclaw gateway status
openclaw gateway restart
openclaw status
Verify

With replyToMode enabled, replies thread correctly even when the model does not emit explicit reply tags.

Caveats
  • Some channels flatten replies by design; message may still appear in main feed depending on provider UX(需验证)。
  • If custom middleware rewrites payloads post-filter, it may override reply threading behavior.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post