Problem Statement
When LLM providers (Anthropic, OpenAI, etc.) return overloaded_error or rate limit responses, OpenClaw sends a user-facing message:
The AI service is temporarily overloaded. Please try again in a moment.
Issues:
- Users receive "spam" error messages in Telegram/WhatsApp during high-load periods
- No way to suppress these via configuration
- No hook to intercept outbound messages before delivery
- Operators cannot log suppressed events for monitoring
Current State
Per Hooks documentation, the following events exist:
command:new, command:reset, command:stop
agent:bootstrap, gateway:startup, tool_result_persist
Planned but not implemented:
message:sent — When a message is sent
message:received — When a message is received
Proposed Solutions
Option A: Implement message:sent hook (preferred)
Allow hooks to intercept outbound messages before delivery:
const handler: HookHandler = async (event) => {
if (event.type !== 'message' || event.action !== 'sent') return;
if (event.context.text.includes('temporarily overloaded')) {
event.suppress = true;
}
};
Option B: Config-based error suppression
{
"messages": {
"errorSuppression": {
"overloaded": true,
"rateLimit": true
}
}
}
Option C: Minimal — messages.suppressSystemErrors: true
Use Case
Production cron jobs run every 15 minutes. During Anthropic API overload, each failed cron sends error to Telegram — user receives 10+ "temporarily overloaded" messages per hour.
Expected behavior:
- Error logged locally
- Telegram receives nothing (or optional retry)
Acceptance Criteria
- Ability to filter outbound messages by pattern
- Suppressed messages logged to configurable path
- Works for all channels (Telegram, WhatsApp, Discord)
Environment
- OpenClaw: 2026.2.3-1
- Channel: Telegram
- Provider: Anthropic
Problem Statement
When LLM providers (Anthropic, OpenAI, etc.) return
overloaded_erroror rate limit responses, OpenClaw sends a user-facing message:Issues:
Current State
Per Hooks documentation, the following events exist:
command:new,command:reset,command:stopagent:bootstrap,gateway:startup,tool_result_persistPlanned but not implemented:
message:sent— When a message is sentmessage:received— When a message is receivedProposed Solutions
Option A: Implement
message:senthook (preferred)Allow hooks to intercept outbound messages before delivery:
Option B: Config-based error suppression
{ "messages": { "errorSuppression": { "overloaded": true, "rateLimit": true } } }Option C: Minimal —
messages.suppressSystemErrors: trueUse Case
Production cron jobs run every 15 minutes. During Anthropic API overload, each failed cron sends error to Telegram — user receives 10+ "temporarily overloaded" messages per hour.
Expected behavior:
Acceptance Criteria
Environment