# OpenClaw Gateway Diagnose-Routine

Wenn die Kommunikation mit OpenClaw/FRIDAY fehlschlägt, diese Sequenz durchlaufen:

## Schritt 1: Gateway-Status prüfen
```bash
openclaw health          # Grundstatus
openclaw gateway status  # Detaillierter Gateway-Status
```

## Schritt 2: Gateway starten (falls gestoppt)
```bash
openclaw gateway start   # Startet + repariert veraltete Service-Definitionen
```

## Schritt 3: Kommunikationsweg testen
```bash
# CORRECT way:
openclaw agent -m "Testnachricht" --agent main

# WRONG way (funktioniert NICHT):
openclaw agent -m "Test" --to telegram:1344779884  # TIMED OUT!
```

## Schritt 4: ACP testen (falls MCP benötigt)
```bash
openclaw acp client      # Test ACP connection
openclaw approvals get   # Prüfe pending approvals
```

## Schritt 5: Config prüfen
```bash
openclaw config file     # Zeigt Config-Datei
openclaw config get gateway.token  # Prüfe Token
```

## Häufige Fehler

| Fehler | Ursache | Lösung |
|--------|---------|--------|
| `--to telegram` timeout | Falscher Parameter | Nutze `--agent main` |
| `scope upgrade pending` | ACP Approval nötig | `openclaw approvals get` |
| `service needs repair` | Version mismatch | `openclaw gateway start` |
| Gateway stopped | Service down | `openclaw gateway start` |
| `unknown option` | Falsche CLI Syntax | Siehe `openclaw --help` |

## Wichtige Pfade
- Config: `~/.openclaw/openclaw.json`
- Gateway Port: 18789
- Dashboard: `http://localhost:18789/`
- Health API: `http://127.0.0.1:18789/health`
