Fixing the "[from ...]" Prefix on WhatsApp Messages in OpenClaw
Deepankar Bhade /
Feel free to skip to the fix if you just want the solution.
I've been using OpenClaw as my personal AI assistant on WhatsApp. It's been great for automating replies and managing conversations across contacts. But I noticed something annoying: whenever my assistant replied to other contacts, the message would look like this:
[from +1234567890] Hello, time for gym. Action first, feelings later. Move.
That [from ...] prefix with my phone number was getting sent to everyone. Not ideal.
Why This Happens
OpenClaw has a feature called cross-context decoration. When the AI sends a message to a different chat than where the original message came from, it adds a prefix to indicate the origin. This is actually useful in some scenarios as it helps recipients understand the context of forwarded or cross-posted messages.
The logic lives in src/infra/outbound/outbound-policy.ts:
const prefixTemplate = markerConfig?.prefix ?? "[from {channel}] "; const prefix = prefixTemplate.replaceAll("{channel}", originLabel);
The {channel} placeholder gets replaced with your phone number or chat ID, resulting in that [from +123...] prefix.
The Fix
Disabling this is a one-liner:
openclaw config set tools.message.crossContext.marker.enabled false
That's it. No more prefix on your messages.
NoteIf you want to keep the marker but change its format, you can customize the prefix template instead:
openclaw config set tools.message.crossContext.marker.prefix ""Or set it to something else like
"[via OpenClaw] "if you prefer.
Telling Your Bot to Do It
If your OpenClaw gateway is already running, you can just message your bot:
Turn off the [from ...] prefix on messages. Set tools.message.crossContext.marker.enabled to false.
The bot will run the config command for you.
Hope this saves you some debugging time. The cross-context feature is thoughtful, it just wasn't what I needed for my personal setup.