Fix Buffered Intermediate Messages in OpenClaw
TL;DR โ Quick Fix
OpenClaw currently batches message tool outputs until the turn finishes; the only way to mitigate this is by breaking tasks into smaller, independent agent turns.
Run DiagnosticsNext Step
Fix now, then reduce repeat incidents
If this issue keeps coming back, validate your setup in Doctor first, then harden your config.
Error Signal
No specific error string; messages are simply delayed until turn completion.What's Happening
Your agent is acting correctly, but OpenClaw is holding onto every message tool call you trigger. Even if you command the agent to report progress (e.g., "Found 500 results..."), you won't see these updates in your Discord, Slack, or Telegram channel until the entire execution block finishes. This makes long-running tasks feel like they have crashed or hung, as you get a massive wall of text all at once at the very end.
The Fix
There is currently no configuration flag to force real-time flushing of the message buffer because this is an architectural limitation of how OpenClaw handles tool turns. The best workaround is to modify your agent prompt to force "turn-based progress."
Instead of one long script, instruct the agent to:
- Execute a small sub-task.
- Return control to the system (Finish the turn).
- Send the progress message as part of that turn's natural conclusion.
Example directive for your agent: "Perform tasks in small segments. After each segment, stop and wait for confirmation. Do not chain multiple long-running tool calls in a single turn."
Why This Occurs
OpenClaw wraps tool execution in a transaction-like turn lifecycle. The system waits for the model to indicate it has finished its reasoning and tool-use sequence before flushing the output buffer to external channels. Because the message tool is treated as part of the turn's total output, it gets caught in this batching logic, leading to the lag reported in issue #16137.
Prevention
Keep your tool calls granular. Avoid using complex loops within a single tool call if they require frequent status reporting. If you are building custom tools, ensure they return results quickly rather than relying on message to "stream" status updates during the execution of a single method. If the task is long, move the logging logic to a side-channel or a dedicated monitoring service rather than relying on the agent's primary communication thread.
Last Updated: March 2026
Did this guide solve your problem?