claw-monitor
v0.1.3Use the `clawmonitor` CLI/TUI to inspect OpenClaw sessions, model health, token usage, and gateway service health.
Installation
ClawMonitor (OpenClaw monitoring)
Use this skill when the user asks questions like:
- “Did my agent finish? Why no feedback?”
- “Which session/thread received the last message, and when?”
- “Is the agent working, interrupted, or stuck? Any delivery failures?”
- “Which model is failing, and is the problem the provider or OpenClaw itself?”
- “Which session burned the most tokens recently?”
- “Do we have zombie/helper processes or a dirty gateway cgroup?”
Preconditions
- This skill runs on a machine that has OpenClaw state at
~/.openclaw/. clawmonitoris installed on that same machine.
Preflight (recommended)
Before using the commands below, verify the binary exists and can read local OpenClaw state:
clawmonitor --version
clawmonitor init --non-interactive || true
clawmonitor status --format md
If clawmonitor is missing, or status fails, install it first.
Install:
pip install -U clawmonitor
Alternative installs:
pipx:
bash
pipx install clawmonitor
- Virtualenv:
bash
python3 -m venv .venv
. .venv/bin/activate
pip install -U pip
pip install clawmonitor
Notes:
- Some OpenClaw environments intentionally disallow installing packages at runtime. If installs are blocked, ask the user to install
clawmonitoron the host first. clawmonitor initwrites config under~/.config/clawmonitor/config.tomland is safe to re-run.
Core commands
0) Tree view (who owns which sessions)
If you suspect ACP/subagent routing issues (for example Telegram thread bindings), start with:
clawmonitor tree
1) Status (Markdown)
Show the core status table:
clawmonitor status --format md
For a more verbose table including task/message previews:
clawmonitor status --format md --detail
2) Model health
Probe configured models directly and/or through OpenClaw:
clawmonitor models --format md
Useful variants:
clawmonitor models --mode direct --format json
clawmonitor models --mode openclaw --timeout 20
3) Drill down on one session
Export a redacted report for a single session key:
clawmonitor report --session-key 'agent:main:main' --format md
4) Nudge (ask the session to report progress)
Send a progress request into the session:
clawmonitor nudge --session-key 'agent:main:main' --template progress
5) Full TUI for interactive inspection
Run the TUI when you need interactive triage:
clawmonitor tui
Important TUI keys:
v: cycle Sessions / Models / Systems: jump directly to Systemh: toggle right-side Status / Historyu: cycle token windows (now/1d/7d/30d)r: refresh current active surfacez: cycle pane widthsZ: fullscreen detailo: open the English operator note in System view
Troubleshooting quick wins
- If
clawmonitor statusshowsDELIVERY_FAILEDorNO_FEEDBACK, export a report next:
bash
clawmonitor report --session-key 'agent:main:main' --format md
- If model checks disagree, separate
direct provider pathfromOpenClaw path. - If Telegram looks bound to the wrong session key, run
clawmonitor treeand follow the bound session instead of assumingagent:main:...is the active path. - If the problem is service-level, use the TUI
Systemview and summarizerisk,reclaimable memory estimate, and whether zombies/orphans were detected. - If the TUI is unavailable, fall back to
clawmonitor status --format md --detailplusclawmonitor models --format md.
Reply guidelines
- Prefer
--format mdoutputs for IM replies. - If status shows
DELIVERY_FAILEDorNO_FEEDBACK, include the relevant sessionKey and recommend areportexport next. - If token questions are time-windowed, mention whether the number is a current session snapshot or a
1d / 7d / 30dGateway usage range. - Avoid pasting raw gateway logs unless the user asks; use
clawmonitor reportwhich redacts common secrets.