Common Runtime Errors
Quick reference for the most frequently encountered OpenClaw errors, with causes and step-by-step fixes.
Quick Fix Checklist — Try these first before diving deeper:
- Run
openclaw --versionto confirm installation is working - Check your API key:
echo $OPENCLAW_API_KEY(Linux/Mac) or$env:OPENCLAW_API_KEY(Windows) - Verify config file exists:
openclaw config show - Try
openclaw run "hello" --debugto see verbose error output - Check log files for the full error trace
Error Quick Reference
| Error Message | Cause | Fix |
|---|---|---|
AuthenticationError: Invalid API key | Missing or wrong API key | Check OPENCLAW_API_KEY env var or config.yaml |
RateLimitError: 429 Too Many Requests | API quota exceeded | Add rate_limit.requests_per_minute in config |
TimeoutError: Request timed out after 30s | Slow network or model | Increase timeout_seconds in config |
ToolExecutionError: tool 'web_search' failed | Pack not installed | Run openclaw install web |
ContextWindowError: Input exceeds max tokens | Input too large | Use --chunk-size flag |
ConnectionError: Failed to connect to localhost:11434 | Ollama not running | Run ollama serve |
ConfigError: config.yaml not found | Running from wrong dir | Pass --config /path/to/config.yaml |
ModelNotFoundError: gpt-5 does not exist | Typo or unavailable model | Check openclaw config list-models |
API Authentication Errors
# Verify your key is set
echo $OPENCLAW_API_KEY
# Test the API key directly
openclaw config test-connection
# Re-set the key
export OPENCLAW_API_KEY="sk-..."
# Or save permanently:
openclaw config set api_key "sk-..."Rate Limit Errors
# config.yaml
rate_limit:
requests_per_minute: 15 # Stay under your plan's limit
retry_on_rate_limit: true
retry_delay_seconds: 60
max_retries: 5
Free tier limits
OpenAI free tier: 3 RPM. GPT-4 tier-1: 500 RPM. Use --model gpt-4o-mini for higher limits at lower cost.
Timeout Errors
# config.yaml
timeout_seconds: 120 # default: 30
stream: true # streaming prevents timeouts on long outputsTool Execution Errors
# List installed packs
openclaw config list-packs
# Install missing pack
openclaw install web
# Run with debug to see tool calls
openclaw run "search the web for latest AI news" --debugNetwork & Connection Errors
| Error | Cause | Fix |
|---|---|---|
ConnectionRefusedError: [Errno 111] | Ollama not running on localhost | Run ollama serve; check port 11434 |
SSLError: certificate verify failed | Corporate proxy / self-signed cert | Set ssl_verify: false in config (testing only) |
ProxyError: HTTPSConnectionPool | Network proxy intercepts HTTPS | Set HTTPS_PROXY env var or proxy_url in config |
ReadTimeout: did not receive data | Slow API, large context | Increase timeout_seconds: 180 |
MaxRetryError: HTTPSConnectionPool | LLM API is down | Check status.openai.com |
Test Network Connectivity
# Test OpenAI API reachability
curl -s https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY" | head -50
# Test Ollama locally
curl -s http://localhost:11434/api/tags | python3 -m json.tool
# Test behind proxy
curl -x http://proxy:8080 https://api.openai.com/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY" | head -20Environment & Config Errors
# "No module named openclaw" — wrong Python / not in PATH
which python; python --version
which openclaw # should match same Python environment
# Fix: ensure you're in the right venv
source ~/.venv/openclaw/bin/activate
openclaw --version
# "config.yaml: permission denied"
ls -la ~/.openclaw/
chmod 600 ~/.openclaw/config.yaml # restrict to owner only
# "API key not found" despite it being set
# Check for invisible characters in the key string:
openclaw config get openai.api_key | cat -A
# Should end with $ not ^M$ (Windows line ending contamination)Error Code Reference
OpenClaw uses structured error codes for machine-readable output and log filtering. Each code has the pattern CATEGORY_NNN.
Authentication (AUTH)
| Code | Message | Resolution |
|---|---|---|
AUTH_001 | API key not found | Set OPENAI_API_KEY or equivalent environment variable |
AUTH_002 | API key invalid or expired | Regenerate the key in your provider's dashboard |
AUTH_003 | Insufficient permissions | Your API key plan doesn't cover this model/feature |
AUTH_004 | Organization quota exceeded | Check billing and usage limits on the provider site |
Connectivity (CONN)
| Code | Message | Resolution |
|---|---|---|
CONN_001 | Connection refused | Check that the target service is running and the URL is correct |
CONN_002 | Request timeout | Increase request_timeout in config or check network latency |
CONN_003 | SSL certificate error | Update CA certificates or set verify_ssl: false for internal services only |
CONN_004 | Proxy authentication required | Set HTTP_PROXY and HTTPS_PROXY env vars with credentials |
Tool Execution (TOOL)
| Code | Message | Resolution |
|---|---|---|
TOOL_001 | Tool not found | Pack providing this tool is not installed; run openclaw install --list |
TOOL_002 | Tool execution failed | Check tool logs; often a misconfigured path or missing system dependency |
TOOL_003 | Permission denied | allow_command_exec: true must be set in config for shell tools |
Memory & Configuration (MEM/CFG)
| Code | Description | Resolution |
|---|---|---|
MEM_001 | Context window exceeded | Reduce max_context_tokens in config or split the task |
MEM_002 | Embedding store corrupt | Run openclaw doctor --repair-memory |
CFG_001 | Config file not found | Run openclaw config init to create a default config |
CFG_002 | YAML parse error | Validate your config.yaml with openclaw config validate |
CFG_003 | Unknown config key | Check the Configuration reference for valid keys |
Platform-Specific Errors
| Platform | Error | Fix |
|---|---|---|
| Windows | 'openclaw' is not recognized | Scripts not on PATH; see Windows installation |
| Windows | UnicodeDecodeError cp1252 | Set $env:PYTHONIOENCODING="utf-8" before running |
| macOS | Operation not permitted | Grant Terminal full-disk access in System Settings > Privacy & Security |
| macOS | xcrun: invalid developer path | Run xcode-select --install |
| Linux | externally-managed-environment | Use a virtual environment; never install to system Python |
| Linux | libssl.so.1.1 not found | Install: sudo apt install libssl-dev or equivalent |