Skip to content

Configuration

Claude Guardian ships with sane defaults and exposes only three knobs. Everything else is hardcoded to keep the decision surface small.

FlagDefaultDescription
--max-log-mb200Max project log directory size in MB
--hang-timeout300Seconds of inactivity before declaring a hang
--auto-restartfalseAuto-restart on crash/hang

When disk free space drops below 5 GB, aggressive mode auto-enables:

  • Shorter log retention
  • Lower size thresholds for rotation
  • More aggressive trimming

This is a hardcoded guardrail that cannot be disabled. If disk is critically low, the guardian protects the system first.

The budget system uses deterministic cap transitions:

Attention levelMax concurrent slots
OK4
WARN2
CRITICAL1

Leases are time-limited (TTL in seconds) and automatically expire. The budget prevents multiple heavy operations from dogpiling when the system is already under pressure.

All guardian state lives under ~/.claude-guardian/:

FilePurpose
state.jsonCurrent attention level and incident state
budget.jsonConcurrency leases and cap
journal.jsonlAppend-only log of every guardian action
bundles/Doctor diagnostics bundles (zip files)