Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
OpenClaw handles inbound messages through a pipeline of session resolution, queueing, streaming, tool execution, and reasoning visibility. This page maps the path from inbound message to reply.
textInbound message -> routing/bindings -> session key -> queue (if a run is active) -> agent run (streaming + tools) -> outbound replies (channel limits + chunking)
Key knobs live in configuration:
messages.*agents.defaults.*channels.whatsapp.*channels.telegram.*See Configuration for full schema.
Channels can redeliver the same message after reconnects. OpenClaw keeps a short-lived cache keyed by channel/account/peer/session/message id so duplicate deliveries do not trigger another agent run.
Rapid consecutive messages from the same sender can be batched into a single agent turn via
messages.inboundConfig (global default + per-channel overrides):
json5{ messages: { inbound: { debounceMs: 2000, byChannel: { whatsapp: 5000, slack: 1500, discord: 1500, }, }, }, }
Notes:
coalesceSameSenderDmsSessions are owned by the gateway, not by clients.
Multiple devices/channels can map to the same session, but history is not fully synced back to every client. Recommendation: use one primary device for long conversations to avoid divergent context. The Control UI and TUI always show the gateway-backed session transcript, so they are the source of truth.
Details: Session management.
Tool result
contentdetailsOpenClaw keeps that boundary explicit:
toolResult.detailsdetailspersistedDetailsTruncated: truecontentdetailsOpenClaw separates the prompt body from the command body:
BodyForAgentBodyBodyForAgentCommandBodyRawBodyCommandBodyWhen a channel supplies history, it uses a shared wrapper:
[Chat messages since your last reply - for context][Current message - respond to this]For non-direct chats (groups/channels/rooms), the current message body is prefixed with the sender label (same style used for history entries). This keeps real-time and queued/history messages consistent in the agent prompt.
History buffers are pending-only: they include group messages that did not trigger a run (for example, mention-gated messages) and exclude messages already in the session transcript.
Directive stripping only applies to the current message section so history remains intact. Channels that wrap history should set
CommandBodyRawBodyBodymessages.groupChat.historyLimitchannels.slack.historyLimitchannels.telegram.accounts.<id>.historyLimit0If a run is already active, inbound messages can be queued, steered into the current run, or collected for a followup turn.
messages.queuemessages.queue.byChannelsteersteerfollowupcollectsteer-backloginterruptqueueDetails: Command queue and Steering queue.
Channel plugins may preserve ordering, debounce input, and apply transport backpressure before a message enters the session queue. They should not impose a separate timeout around the agent turn itself. Once a message is routed to a session, long-running work is governed by the session, tool, and runtime lifecycle so all channels report and recover from slow turns consistently.
Block streaming sends partial replies as the model produces text blocks. Chunking respects channel text limits and avoids splitting fenced code.
Key settings:
agents.defaults.blockStreamingDefaulton|offagents.defaults.blockStreamingBreaktext_end|message_endagents.defaults.blockStreamingChunkminChars|maxChars|breakPreferenceagents.defaults.blockStreamingCoalesceagents.defaults.humanDelay*.blockStreaming*.blockStreamingCoalesce*.blockStreaming: trueDetails: Streaming + chunking.
OpenClaw can expose or hide model reasoning:
/reasoning on|off|streamDetails: Thinking + reasoning directives and Token use.
Outbound message formatting is centralized in
messagesmessages.responsePrefixchannels.<channel>.responsePrefixchannels.<channel>.accounts.<id>.responsePrefixchannels.whatsapp.messagePrefixreplyToModeDetails: Configuration and channel docs.
The exact silent token
NO_REPLYno_replyOpenClaw also uses silent replies for internal runner failures that happen before any assistant reply in non-direct chats, so groups/channels do not see gateway error boilerplate. Direct chats show compact failure copy by default; raw runner details are shown only when
/verboseonfullDefaults live under
agents.defaults.silentReplyagents.defaults.silentReplyRewritesurfaces.<id>.silentReplysurfaces.<id>.silentReplyRewriteWhen the parent session has one or more pending spawned subagent runs, bare silent replies are dropped on all surfaces instead of being rewritten, so the parent stays quiet until the child completion event delivers the real reply.
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine