Skip to content

Master OpenClaw Commands and Bot Control

Ever had a bot go off the rails or start generating a massive wall of text you didn’t ask for? It is a common headache when you are testing new prompts or logic and realize halfway through that you made a mistake. You need a way to pull the plug immediately without killing the entire process.

Managing your bot shouldn’t feel like a struggle with a black box. Here is how you can take control of your tasks and communication flow.

If things go wrong, you can kill the current process instantly. Send one of these as a standalone message in your chat:

  • /stop
  • /abort
  • /cancel

You have several built-in shortcuts to manage your session. These help you clear the slate, switch models, or check what is happening under the hood.

CommandDescription
/new, /resetStart a fresh session
/stop, /abortCancel the current task
/compactCompress context (keeps conversation)
/model <alias>Switch models
/model listList available models
/statusShow bot status
/helpShow available commands

Can I send a message to a different chat from the CLI?

Section titled “Can I send a message to a different chat from the CLI?”

Yes. You can push updates or notifications from your terminal to a specific user or channel. Use the --deliver flag along with your target options:

Terminal window
openclaw agent --message "Hello from CLI" --deliver --channel telegram --chat-id 123456789

If you want to send a message to your current active session, the command is even shorter:

Terminal window
openclaw agent --message "Quick update" --deliver

Queue mode defines how your bot handles a pile of incoming messages. You can choose how to prioritize work based on your specific needs:

  • fifo (default): Process messages in order, one at a time.
  • parallel: Process multiple messages concurrently, which results in higher token usage.
  • latest: Drop queued messages and only process the most recent one.

You can set this in your agents.defaults.queue.mode configuration:

{
agents: {
defaults: {
queue: { mode: "fifo" }
}
}
}

Internal messages are system-level events. These do not come from users but are necessary for automation and monitoring. These include:

  • Cron job triggers
  • Heartbeat pings
  • Skill invocations
  • Webhook callbacks

These events show up in your logs so you can track them, but they do not appear in the chat history.

Can I make the bot ignore certain messages?

Section titled “Can I make the bot ignore certain messages?”

You can prevent the bot from reacting to specific prefixes or bot-to-bot chatter. Use patterns or rules in your channel configuration to filter these out:

{
channels: {
whatsapp: {
ignorePatterns: ["^!ignore", "^\\[bot\\]"]
}
}
}

Messages that match these patterns will not trigger any bot response.

How do I make the bot respond only when mentioned?

Section titled “How do I make the bot respond only when mentioned?”

In busy group chats, you probably do not want the bot replying to every single sentence. You can enable mentionGating for group channels so it only wakes up when someone specifically tags it.

{
channels: {
telegram: {
groups: {
mentionGating: true
}
}
}
}

The bot will only respond when @mentioned in these groups.

AI Setup Assistant

OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.