Back to browse
GitHub Repository

AI-powered self-healing system for OpenClaw Gateway • 4-tier autonomous recovery • macOS & Linux

37 starsShell

Claude Code as a Doctor for Claude Code

by ramsbaby-dev·Feb 18, 2026·1 point·0 comments

AI Analysis

●●SolidNiche GemWizardry
The Take

Four escalating layers — instant keepalive restart, watchdog with doctor --fix, a spawned Claude Code debugging session, then Discord alerts — give a clear, pragmatic playbook for automated recovery. Spinning an LLM inside tmux to read logs and apply fixes is a clever, hands-on demonstration that autonomous agents can be part of incident remediation. Expect tradeoffs: LLM-driven fixes introduce cost, non-determinism, and safety/hardening needs before you treat this as primary incident handling.

Target Audience

SREs / DevOps engineers, AI-ops teams, operators of OpenClaw Gateway

Post Description

I built a 4-tier self-healing runtime for AI agents running 24/7.

When the gateway goes down, it escalates: watchdog → HTTP health check → Claude Code "doctor" (reads logs, diagnoses, autonomously fixes) → Discord alert.

The interesting part: Claude Code is both the patient and the doctor. Open source, bash-only, macOS/Linux.

Similar Projects

Infrastructure●●Solid

Spawn – Deploy and Self-Heal Any GitHub Repo

It uses an LLM not just for scaffolding but as an active repair agent: Claude generates Dockerfiles, diagnoses crashes (diagnoseCrash) and can trigger redeploys or memory scaling. The architecture ties BullMQ, Fly Machines and a 30s health loop into a real feedback loop — clever and ambitious, but it also leans heavily on Claude + Fly/Supabase so expect nontrivial setup and vendor/LLM dependency.

WizardryBold Bet
gauravguitara
103mo ago
AI/ML●●Solid

Nerve – self hosted runtime for AI agents

Self-hosted agent runtime with persistent memory and personality modes via SOUL.md files.

SlickSolve My Problem
animetyan
6419d ago