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. After risk returns to OK, the cap stays reduced for 60 seconds (hysteresis) before restoring to the base cap. This prevents flapping. 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 daemon state, attention level, and incident tracking
budget.jsonConcurrency leases and cap
journal.jsonlAppend-only log of every guardian action
incidents.jsonlIncident open/close history
bundle-*.zipDoctor diagnostics bundles
archive/Archived log directories