Skip to main content

Fix Your OpenClaw Bots

One Claude Code prompt that diagnoses and fixes all three reasons your OpenClaw Clawdbot fleet goes silent — then installs itself as a /fix-bots slash command.

Fix your OpenClaw Clawdbot — Claude Code diagnostic and repair prompt
FREE PROMPTFOR OPENCLAW CLAWDBOTv2.0

Your bot finished the job. It just didn't tell you.

One prompt. Claude Code diagnoses all three failure modes and fixes every OpenClaw Clawdbot on your machine. Then it installs itself as a /fix-bots slash command in Claude Code — so the next time your bots go silent, you just type /fix-bots in Claude Code and you're done.

Seeing one of these?

AI Service Temporarily Overloaded Rate Limit Reached Network request failed These aren't Anthropic API errors. Your bots are fine — the plumbing is broken. This fixes it.

"I told my bot to deploy and it went silent. I had to ask 'status?' to find out it was done 4 minutes ago."

"My bots used to reply. Now they just... stop. Sometimes mid-conversation."

"Some messages never arrive. The bot says it sent them but I never got anything."

"It works fine with 1–2 bots but falls apart when the whole fleet is active."

Three things can go wrong. Most fleets have all three.

This isn't one problem — it's three independent failure modes that stack on top of each other.
1Doesn't know to tell you when it's done.It finishes the task, its turn ends, and it just sits there. Nobody told it to send a completion message. This is the most common one.
2Tries to tell you, but the message gets thrown away.There's a default config setting that routes completion notifications to nowhere. The bot responds — you just never see it.
3Sends the message, but the network drops it.When multiple bots are active at the same time, they flood Telegram with connection requests. Telegram silently kills the overflow. Your bot thinks it sent the message. You never receive it. This is why it gets worse with more bots.

What this prompt does

1

Diagnoses which of the three problems your fleet has (it might be all three)

2

Tests fixes on one bot first — never touches your whole fleet without validating

3

Backs up every file before changing anything

4

Patches bot instructions, config files, and connection limits

5

Runs a load test to make sure it holds under real fleet activity

6

Installs itself as a /fix-bots slash command in Claude Code — type /fix-bots anytime your bots act up

How to use it

How to use it

1. Copy the prompt below. 2. Fill in the "Your Environment" section at the top (bot names, channel, etc.). 3. Paste into Claude Code. 4. Claude Code runs the diagnostic, reports what it finds, and asks before fixing anything.

Version 2.0 — free, no sign-up required to read; log in to copy or download.

Get the prompt

Loading Fix Bots v2.0 — Community Edition

An earlier v1.7 release covered two failure modes — behavioral and plumbing — before the network-saturation fix (Failure Mode C) landed in v2.0.

Loading Fix Bots v1.7

Paste into Claude Code on your Mac. It detects what's installed and configures everything automatically.

Three failure modes — technical detail

Here's what's actually happening under the hood, mode by mode.

Failure Mode A — Behavioral (inline exec)

Bots run tasks as inline exec() calls within their active turn. When the task completes, the bot's LLM turn ends — no system event, no heartbeat trigger. Without explicit AGENTS.md instructions, the bot simply goes idle. Fix: AGENTS.md patch with completion message rules + a yieldMs tiered execution pattern. yieldMs keeps the exec within the bot's active turn so it can reply directly — no dependency on OpenClaw's event pipeline.

Mode B is the plumbing failure — the bot actually replies, but OpenClaw throws the message away before it reaches you.

Failure Mode B — Plumbing (background exec → heartbeat routing)

When bots use exec(background: true), notifyOnExit fires a system event. The system event triggers a heartbeat → the LLM generates a response. heartbeat.target defaults to "none" → the response is routed to buildNoHeartbeatDeliveryTarget({reason: "target-none"}) and silently discarded — never reaches Telegram/Discord/Slack (OpenClaw issue #29215). Fix: heartbeat.target: "last" in config routes responses to the last active channel. Also applies typingIntervalSeconds: 10 to reduce typing indicator API traffic by 40%.

Mode C is a network problem, not a bot problem — it only shows up once several bots are active at the same time.

Failure Mode C — Network Saturation (Telegram connection exhaustion)

sendChatAction (the typing indicator) fires every 6 seconds per active bot — it counts toward Telegram rate limits, not a free call. OpenClaw's undici Agent instances have no connections limit — unlimited concurrent TCP connections per bot. Telegram applies undocumented per-IP connection throttling — it RSTs connections instead of returning HTTP 429. Result: sendMessage calls fail because the connection pool is saturated with typing-indicator retries. The bot generated the reply — the network dropped it. Field test (8-bot fleet): 80 idle TCP connections at baseline, 6,219 total "Network request failed" errors. Fix: typingIntervalSeconds: 10 (40% reduction in typing traffic) + connections: 6 cap on undici Agents (prevents pool explosion) + staggered gateway restarts (prevents thundering herd).

All three fixes are required together — any two alone still leave a gap.

Why all three fixes are required

Fix A without B: background exec completions still get discarded. Fix A+B without C: messages still drop during high-activity bursts when 4+ bots are active. Fix C without A: the bot doesn't even try to send the message. All three together: complete coverage across all execution paths and load conditions. Field test results, 8-bot fleet — pre-fix: 80 idle TCP connections at baseline, 6,219 "Network request failed" errors fleet-wide, completion messages silently dropped. Post-fix: connections decreased under load (106 → 96 → 88 → 80), zero transport errors, 7/8 bots delivered under full concurrent load (the 1 failure was an unrelated Anthropic API 500).

References: OpenClaw issue #29215 (heartbeat.target defaults to "none", completions silently discarded); OpenClaw issue #8997 (background exec completion notifications can interrupt an active agent turn); grammy docs (sendChatAction counts toward rate limits, not a free call); telegraf issue #1559 (connection pool exhaustion pattern); nodejs/undici#3617 (timeout errors with high connection counts).

Changelog

2.02026-03-18Current

Failure Mode C — network saturation

Community Edition. Step 0 self-install — checks and installs /fix-bots as a Claude Code slash command. New Failure Mode C: network saturation — Telegram connection pool exhaustion under concurrent load. Phase 0.5 expanded (error log scanning, idle TCP connection measurement, typingIntervalSeconds check). Phase 1 checks undici Agent constructors for a connections cap. Phase 2D adds a concurrent load test before fleet-wide rollout. Fix B expanded — now applies typingIntervalSeconds: 10 in addition to heartbeat.target: last. Fix C — undici connections cap, patches compiled dist files, staggered gateway restarts. Phase 4 expanded with connections verification and a mandatory load test for 4+ bots. Field-tested on an 8-bot fleet: 6,219 pre-fix network failures → 0 post-fix.

1.72026-03-18

Two failure modes: behavioral and plumbing

Two failure modes identified: behavioral (AGENTS.md) and plumbing (heartbeat.target). Three-phase isolated validation testing before fleet-wide rollout. AGENTS.md surgical patch with a yieldMs tiered execution pattern. Fleet-wide rollout with backup and a verification table.