Your Claude Code flight computer.
Detects hangs, captures evidence, enforces concurrency budgets, and exposes 8 MCP tools so Claude can self-monitor mid-session. Local-only, no network, no telemetry.
Install
npm install -g claude-guardian
Status
claude-guardian status --banner
# [guardian] disk=607GB | logs=150MB | risk=ok
MCP
// Claude calls guardian_status mid-session
// "Health looks bad. Running guardian_nudge."
How It Works
Signals, incidents, budgets — deterministic reliability with zero heuristics.
Composite hang detection
Three independent signals (log mtime, CPU activity, grace window) vote on whether Claude is stuck. No single false positive can trigger.
Incident state machine
ok → warn → critical lifecycle with automatic bundle capture, deduplication, and timeline reconstruction.
Concurrency budget
Deterministic cap transitions (4 → 2 → 1 slots) with lease-based control. Prevents dogpiling when under pressure.
Evidence, not guesses
Doctor bundles capture process snapshots, log tails, timelines, and journal entries. Attach to issues, not vibes.
8 MCP tools
Claude can check health, fix logs, capture bundles, manage budget, and get step-by-step recovery plans — all mid-session.
Local-only trust model
No network, no telemetry, no cloud. Reads local logs and process metrics. Writes only to ~/.claude-guardian/.
Usage
Install & check health
npm install -g claude-guardian
claude-guardian status
claude-guardian status --banner Fix log bloat
# Scan and auto-repair oversized logs
claude-guardian preflight --fix
# Aggressive mode when disk is critical
claude-guardian preflight --fix --aggressive Background daemon
# Continuous monitoring + budget enforcement
claude-guardian watch --verbose
# Check budget
claude-guardian budget show MCP server for Claude
// Add to ~/.claude.json:
{
"mcpServers": {
"guardian": {
"command": "npx",
"args": ["claude-guardian", "mcp"]
}
}
} MCP Tools
Quality scorecard
Ship Gate audit — 49/50.