Skip to content

Handling Request Retries in OpenClaw

I have often dealt with flaky network connections or strict rate limits when sending automated messages. It is frustrating when a single failed HTTP request breaks an entire notification flow. I want my system to handle these hiccups automatically so I don’t have to write custom error-handling logic for every message.

OpenClaw handles this by retrying individual HTTP requests. It focuses on keeping things simple: it retries the current step to preserve ordering and avoids repeating actions that shouldn’t be duplicated.

  • An active OpenClaw installation.
  • Access to your ~/.openclaw/openclaw.json configuration file.

By default, OpenClaw tries to send a request 3 times. It uses exponential backoff with a 10% jitter and caps the delay at 30,000 ms.

To customize these settings, you need to edit your ~/.openclaw/openclaw.json file. You can set specific policies for Telegram and Discord. Here is the exact structure you should use:

{
channels: {
telegram: {
retry: {
attempts: 3,
minDelayMs: 400,
maxDelayMs: 30000,
jitter: 0.1,
},
},
discord: {
retry: {
attempts: 3,
minDelayMs: 500,
maxDelayMs: 30000,
jitter: 0.1,
},
},
},
}

These retries apply to every individual request, whether you are sending a message, uploading media, adding a reaction, or posting a poll.

If you notice Discord requests failing without retrying, check the error code. Discord is configured to retry only on HTTP 429 (rate-limit) errors. It will use the retry_after value provided by Discord if it is available.

Telegram handles retries for transient errors like timeouts or connection resets. However, if you have a Markdown parse error, OpenClaw will not retry the request. Instead, it falls back to sending the message as plain text to ensure the content arrives.

If you are running a multi-step flow and a later step fails, OpenClaw only retries that specific failed step. It does not go back and retry steps that already finished successfully. This prevents duplicating non-idempotent operations.

If you have questions about specific provider behaviors, check out the AI Setup Assistant.

  • Telegram Provider Documentation
  • Discord Provider Documentation
  • Configuration Schema Reference
  • Message Formatting Guide
OpenClaw

OpenClaw Expert

Still stuck?

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