-
-
Notifications
You must be signed in to change notification settings - Fork 54.4k
Closed
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Problem
The system prompt instructs the agent to react to messages (especially in reactionLevel: "extensive" mode), but the agent has no way to obtain the messageId of the triggering message.
Current behavior
reactionLevel: "extensive"adds guidance: "React whenever it feels natural"- The
messagetoolreactaction requiresmessageId(required parameter) inbound_metaJSON (built bybuildInboundMetaSystemPromptininbound-meta.ts) does not includemessage_id- Agent calls
message react→ fails with"messageId required"
Expected behavior
The agent should be able to react to the current/triggering message. Two possible solutions:
Option A (minimal): Expose message_id in the inbound_meta payload:
{
"schema": "openclaw.inbound_meta.v1",
"message_id": "12345",
...
}Option B (ergonomic): Support messageId: "current" in the react action, similar to how [[reply_to_current]] resolves the current message ID internally via parseInlineDirectives.
Context
MessageSidis already available inTemplateContextand used internally (ack reactions viamaybeSendAckReaction, reply threading via[[reply_to_current]])- The plumbing exists — it just needs to be surfaced to the agent tool layer
- Affects all channels that support reactions (Telegram, Discord, Slack, WhatsApp, Signal)
Relevant code
src/auto-reply/reply/inbound-meta.ts— builds inbound metadata (missing message_id)src/utils/directive-tags.ts— parses[[reply_to_current]]usingcurrentMessageIdsrc/agents/tools/telegram-actions.ts:99—messageIdrequired for reactsrc/agents/system-prompt.ts— reaction guidance injected based on reactionLevel
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity