Clawdbot Troubleshooting

Debug and fix common Clawdbot AI assistant issues. Learn how to diagnose connection problems, message failures, and gateway errors.

Clawdbot Troubleshooting Overview

This guide helps you diagnose and fix common issues with your Clawdbot deployment. Find solutions for connection problems, message failures, and gateway errors.

Common Issues

Gateway Won't Start

Symptoms: Gateway fails to start or exits immediately.

Solutions:

  1. Check port availability:
lsof -i :3010
  1. Verify configuration:
clawdbot config validate
  1. Check logs:
clawdbot gateway logs

WhatsApp Connection Failed

Symptoms: QR code not showing or connection drops.

Solutions:

  1. Clear WhatsApp session:
rm -rf ~/.clawdbot/providers/whatsapp/session
  1. Restart gateway:
clawdbot gateway restart
  1. Check network connectivity

Messages Not Delivered

Symptoms: Messages sent but not received.

Solutions:

  1. Check session status:
clawdbot sessions list
  1. Verify provider connection:
clawdbot providers status
  1. Check rate limits

Agent Not Responding

Symptoms: Agent doesn't generate responses.

Solutions:

  1. Check agent status:
clawdbot agents status
  1. Verify API key:
echo $ANTHROPIC_API_KEY
  1. Check model availability

Diagnostic Commands

Gateway Status

# Check gateway health
clawdbot gateway status

# View active connections
clawdbot gateway connections

# Show resource usage
clawdbot gateway stats

Session Diagnostics

# List all sessions
clawdbot sessions list

# View session details
clawdbot sessions get <session-key>

# Clear stuck session
clawdbot sessions clear <session-key>

Provider Diagnostics

# Check provider status
clawdbot providers status

# Test provider connection
clawdbot providers test whatsapp

# Reconnect provider
clawdbot providers reconnect telegram

Log Analysis

Enable Debug Logging

clawdbot gateway start --log-level debug

Log Locations

LogLocation
Gateway~/.clawdbot/logs/gateway.log
Providers~/.clawdbot/logs/providers/
Agents~/.clawdbot/logs/agents/

Log Levels

LevelDescription
errorErrors only
warnWarnings and errors
infoGeneral information
debugDetailed debug info

Error Codes

Connection Errors

CodeDescriptionSolution
ECONNREFUSEDPort not openCheck gateway is running
ETIMEDOUTNetwork timeoutCheck network
EAUTHAuth failedVerify credentials

Provider Errors

CodeDescriptionSolution
WA_DISCONNECTEDWhatsApp disconnectedRescan QR
TG_INVALID_TOKENBad Telegram tokenCheck token
DC_MISSING_INTENTSDiscord intentsEnable intents

Performance Issues

Slow Responses

Causes:

  • High message volume
  • Large context size
  • Network latency

Solutions:

  1. Enable streaming
  2. Reduce context size
  3. Check network

Memory Usage

Check memory:

clawdbot gateway stats --memory

Reduce memory:

{
  "gateway": {
    "messageBuffer": 500,
    "maxHistory": 50
  }
}

Recovery Procedures

Reset Gateway

# Stop gateway
clawdbot gateway stop

# Clear state
clawdbot gateway reset --state

# Restart
clawdbot gateway start

Reset Provider

# Disconnect provider
clawdbot providers disconnect whatsapp

# Clear provider data
rm -rf ~/.clawdbot/providers/whatsapp

# Reconfigure
clawdbot providers setup whatsapp

Reset Agent

# Clear agent sessions
clawdbot agents reset main --sessions

# Clear agent workspace
clawdbot agents reset main --workspace

Getting Help

Support Resources

Bug Reports

Include in bug reports:

  • Clawdbot version
  • Operating system
  • Error messages
  • Steps to reproduce

Next Steps