OpenClaw Discord proxy fix for REST API timeout issues

If your OpenClaw Discord bot appears connected but can't send messages or run commands, you might be experiencing a proxy configuration issue where WebSocket connections work but REST API calls don't.
The Problem
A user on r/openclaw reported their Discord channel suddenly stopped working. Running openclaw doctor showed "Discord failed" and logs were spamming: "fetch failed UND_ERR_CONNECT_TIMEOUT".
The issue wasn't a broken proxy, but rather that the proxy setting in OpenClaw was sufficient for Discord WebSocket connections but not for REST API requests. This created a situation where the bot looked half-connected but couldn't actually function.
The Solution
Here's what fixed it:
- Keep the Discord proxy configuration in your OpenClaw JSON file
- Create a file at
~/.openclaw/proxy-preload.cjs - Set a global undici proxy in that file
- Start OpenClaw with
NODE_OPTIONS=--require=...to load the proxy configuration
Important Notes
- Use an HTTP proxy, not SOCKS5
- If you update OpenClaw, check whether the bundled undici path has changed
This specific configuration issue can cause Discord to appear connected while REST calls fail silently, preventing message sending and command execution.
📖 Read the full source: r/openclaw
👀 See Also

5 Patterns for Getting Better Results from Claude (Non-Technical Users)
Practical scaffolding, example-based prompting, negative instructions, persistent context, and source grounding — five patterns that consistently improve output quality from Claude, backed by six months of field experience.

Practical Strategies to Avoid Claude Rate Limits on $200 Max Plan
A developer shares specific techniques that have prevented throttling on Claude's $200 max plan for over a month, including SQLite database queries, context handoff systems, and strategic hardware deployment.

Reducing Claude Hallucinations with Pre-Output Prompt Injection
A Reddit post details a method to cut Claude AI hallucinations by half using a pre-output prompt that forces the model to record uncertainties and next steps before responding. The approach involves adding specific markdown instructions to Claude's system prompt and creating a Python script.

Community Discusses Solutions for OpenClaw Token Consumption
Users share strategies for managing high token usage when running AI agents around the clock.