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

Enforcing AI Agent Compliance: Bootstrap Language and Tool-Based Approaches
A developer shares practical methods for improving AI agent compliance, including using negative language in bootstraps and switching from soft rules to hard-coded tools when needed.
Stop Using Claude Code Like Autocomplete: Real Wins from Repo-Aware Refactoring
One developer shares how treating Claude Code as a repo-aware refactoring assistant — not an autocomplete — delivered major wins in tracing architecture, untangling files, and finding hidden coupling.

Routing cuts OpenClaw Max usage cost by 85%: $200/mo to $30/mo with API routing
A user tracked token usage and found only 15% of tasks need Opus. By routing routine work to Sonnet via API, monthly cost dropped from $200 to $30 with identical output quality.

Building a Developer Portfolio with Claude Code: A Junior Dev's Workflow and Lessons Learned
A 21-year-old junior MERN stack dev shares how he built nidhil.live using Claude Code, emphasizing the importance of specific prompting and understanding generated code instead of blind copy-pasting.