← 返回
未分类

Agent Health Diagnostics

Diagnose and fix the 4 most common OpenClaw agent failures — heartbeat spam, API rate limit cascades, channel death loops, and memory/embedding errors. Battl...
诊断并修复最常见的四个OpenClaw代理故障——心跳刷屏、API速率限制级联、频道死亡循环以及内存/嵌入错误。Battl...
agenthyjack
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 359
下载
💾 0
安装
1
版本
#diagnostics#health#latest#monitoring#ops#troubleshooting

概述

Agent Health Diagnostics

Scripts available in the Collective Skills repo

Overview

When an OpenClaw agent misbehaves — spamming messages, going dark, burning API credits, or looping on dead channels — this skill provides the diagnostic playbook. Covers the 4 most common failure modes with exact commands to diagnose and fix each one.

Battle-tested across a 6-agent deployment spanning 3 hosts (Windows + Linux + Proxmox).

When to Use This Skill

Use when you observe any of these symptoms:

  • Agent sending repeated heartbeat/status messages to Telegram/Discord/etc.
  • Agent goes silent despite gateway showing "active"
  • Logs show 429 Too many tokens or rate_limit errors
  • Channel connection loops: auto-restart attempt 1/10, 2/10, etc.
  • Memory search errors: input length exceeds context length
  • Gateway says "active" but agent doesn't respond to messages

The 4 Failure Modes

1. Heartbeat Spam

Symptom: Agent sends repeated messages every N minutes.

Root cause: Heartbeat interval too low (10m = 144 messages/day) + verbose prompt that always generates output instead of HEARTBEAT_OK.

Quick fix:

# Check interval
grep -A5 heartbeat ~/.openclaw/openclaw.json

# Fix: set to 30m minimum, simplify prompt to checklist + HEARTBEAT_OK default
# Then restart gateway
openclaw gateway restart

Prevention: Never set heartbeat below 20 minutes. Heartbeat prompts should CHECK things, not CREATE things.

2. API Rate Limit Cascade

Symptom: All models fail, agent goes dark.

Root cause: Heartbeat + N crons = (N+1) API calls per interval. Exceeds provider TPM limit → all fallbacks exhausted simultaneously.

Quick fix:

# Check for rate limits
journalctl -u <service> --since '1h ago' | grep '429\|rate_limit'

# Count your crons (each burns tokens)
openclaw cron list

# Fix: reduce heartbeat to 30-60m, disable non-essential crons, stagger schedules

Prevention: Calculate token budget before adding crons. Each run ≈ 2K-10K tokens. Route heartbeats to cheap/local models.

3. Channel Death Loop

Symptom: Logs show repeated auto-restart attempt N/10 for IRC/Discord/etc.

Root cause: Target server unreachable → health monitor restarts → fails again → loop. Each restart may trigger model calls, burning API tokens.

Quick fix:

# Check for loops
journalctl -u <service> --since '1h ago' | grep 'auto-restart\|timed out'

# Test connectivity
nc -zv <target-ip> <target-port> -w 5

# Fix: disable the broken channel in openclaw.json
# channels.<name>.enabled = false
openclaw gateway restart

Prevention: Test connectivity BEFORE enabling channels. Disable channels you can't reach.

4. Memory/Embedding Overflow

Symptom: memory sync failed or input length exceeds context length errors.

Root cause: File too large for embedding model's context window (mxbai-embed-large = 8K tokens).

Quick fix: Archive old sections of large files (MEMORY.md → memory/archive/). Keep active files under 8K tokens.

Prevention: Don't let MEMORY.md grow unbounded. Archive quarterly.

Remote Diagnostic Quick Reference

WhatCommand
---------------
Service statussystemctl is-active
Recent logs`journalctl -u --since '1h ago' --no-pager \tail -40`
Live tailjournalctl -u -f
Rate limits`journalctl -u --since '1h ago' \grep '429'`
Cron listopenclaw cron list
Port testnc -zv -w 5
Config backupcp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak

Golden Rules

  1. Always back up config before editing. cp openclaw.json openclaw.json.bak
  2. Always restart gateway after config changes. Hot reload doesn't catch everything.
  3. Check logs before guessing. journalctl tells you what's wrong 90% of the time.
  4. Calculate your API budget. Heartbeat freq × (crons + 1) × avg tokens = burn rate.
  5. Disable what you can't reach. Dead channels create loops that waste resources.
  6. "Configured" ≠ "working." Verify with actual output after every change.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 07:32 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Marrs

agenthyjack
内存维护助手,适用于RAG/向量数据库。包含save_memory()辅助函数、监控和碎片整理脚本模板、热队列支持以及可配置...
★ 0 📥 471

Multi-Agent Status

agenthyjack
跨代理多主机OpenClaw部署的健康监控。每个代理将结构化状态报告(JSON)推送至中心位置,用于PM/监控。
★ 0 📥 408

Dial A Cron

agenthyjack
用于OpenClaw的有状态Cron系统,支持持久化内存、变更检测、智能路由、Token预算跟踪及自愈,需安装 'openclaw' 等依赖。
★ 0 📥 406