[BUG] Dispatch burns through API rate limit when OpenClaw gateway is unreachable
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When the OpenClaw gateway (ai.openclaw.gateway) goes down, Dispatch continues retrying indefinitely instead of detecting the gateway is unreachable and stopping. This causes rapid API call consumption that exhausts the user's Anthropic API rate limit, leaving them unable to use Claude until the limit resets.
What Should Happen?
Dispatch should detect that the gateway is unreachable (e.g. via a health check before starting a task, or after N failed attempts) and fail gracefully with a clear error message rather than retrying indefinitely.
Error Messages/Logs
Steps to Reproduce
Stop or allow the OpenClaw gateway service to go down
Give Dispatch a task to execute
Dispatch begins attempting to process the task but cannot reach the gateway
Dispatch continues looping/retrying without stopping or surfacing an error
Anthropic API rate limit is hit
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.81 — you're up to date.
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
macOS (Darwin 25.3.0)
OpenClaw gateway service: ai.openclaw.gateway (v2026.3.2)
Gateway port: 18789
Suggested fix
Add a gateway health check before Dispatch begins executing a task
Implement a circuit breaker or max retry cap so Dispatch stops after N consecutive failures
Surface a clear error to the user: "OpenClaw gateway is unreachable — please restart the service"
Environment
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗