Skip to content
← Back to articles
8 min

Building the First Windows Health Monitor for OpenClaw

How debugging a 30-second gateway response led to building the first cross-platform diagnostic toolkit for ClawHub.

Building the First Windows Health Monitor for OpenClaw
In this post

It started with a performance regression. After upgrading OpenClaw from 2026.5.20 to 2026.5.22, health checks went from 226ms to 26,000ms — a 115x slowdown. Every CLI command took 20-30 seconds. The gateway event loop was completely saturated.

The Debugging Rabbit Hole

Four hours of investigation followed. We stripped config blocks, switched model providers, patched source code at the npm package level, and ran dozens of diagnostic commands. The breakthrough came when we tested the gateway HTTP endpoint directly — it responded in 70ms. The gateway itself was perfectly fast. The CLI health command was the bottleneck — it does an expensive WebSocket auth handshake on Windows that the HTTP endpoint skips.

The real culprit: warmCurrentProviderAuthState() in 2026.5.22 synchronously probes every provider for every agent at startup, blocking the event loop for 30-79 seconds.

From Debugging Workflow to Published Plugin

While debugging, I built a diagnostic workflow that I kept reusing:

openclaw health --json
Get-ScheduledTask -TaskName "OpenClaw Gateway"
Select-String "provider auth state pre-warmed" ~/.openclaw/logs/*.log
Select-String "restart.*deferred.*background task" ~/.openclaw/logs/*.log

This was manual and repetitive. Every Windows OpenClaw user would hit the same issues. No monitoring tooling existed on ClawHub — not for Windows, not for Linux, not for macOS.

So I built it.

What It Does

A skill + plugin combo available on ClawHub:

  • Skill (windows-health-monitor): Teaches your agent how to diagnose and fix common gateway issues across all platforms
  • Plugin (@jordan-thirkle/openclaw-winhealth): Background monitoring service that polls every 5 minutes, detects degradation, and alerts via WhatsApp or Telegram

Real-Time Alerts

⚠️ OpenClaw Health Alert
[CRITICAL] Event loop degraded: p99=8500ms (threshold 5000ms)
Consider: OPENCLAW_SKIP_PROVIDER_AUTH_PREWARM=1

Three Agent Tools

  • winhealth_check — Instant health snapshot with event loop, channel, and platform-specific metrics
  • winhealth_diagnostics — Full diagnostic bundle with logs, status, and channel probes
  • winhealth_alerts — List, dismiss, or clear health alerts

Market Gap Discovery

While researching what to build, I analyzed the ClawHub marketplace:

  • 100 plugins, 99 skills available
  • Zero system health monitors
  • Zero Windows-specific tools
  • Zero plugins with automated test suites

The category was completely empty. So I created it.

v1.2.0 — Now Cross-Platform

What started as Windows-only has grown to support Linux and macOS. The skill teaches agents platform-specific diagnostics:

  • Windows: Task Scheduler health, PowerShell-based log analysis, prewarm detection
  • Linux: systemd service status, journal logs, process health
  • macOS: launchd service status, disk usage, process monitoring

v1.1.0 — First ClawHub Plugin with Tests

Of the 100 plugins on ClawHub, zero had automated tests. We shipped 27 tests across 3 test files with a GitHub Actions CI/CD pipeline testing against Node 22, 24, and 25. Every PR runs the test suite automatically.

Open Source from Day One

  • MIT licensed
  • 14 commits, 28 files
  • CONTRIBUTING.md, CHANGELOG.md, issue templates
  • Published on ClawHub and GitHub
  • Cross-platform: Windows, Linux, macOS

Install

openclaw skills install windows-health-monitor
openclaw plugins install clawhub:@jordan-thirkle/openclaw-winhealth

Built during a debugging session that turned into a deep understanding of OpenClaw on multiple platforms. MIT licensed. Contributions welcome.

Written by Jordan Thirkle

Stay-at-home dad building AI-accelerated products. I write code during naps and after bedtime — every post comes from real work, not theory.

X GITHUB LINKEDIN NEWSLETTER
0