Warden
beta · v2.14.0
beta · v2.14.0
Documentation

config.toml

Located at ~/.warden/config.toml. All fields have sensible defaults — a missing file or missing field is handled gracefully.

[assistant]
type = "auto"  # "claude-code", "gemini-cli", or "auto"

[restrictions]
disabled = []  # Rule IDs to disable, e.g. ["substitution.0", "substitution.2"]

[telemetry]
anomaly_detection = true      # Detect unusual command patterns
quality_predictor = true       # Predict session quality from early signals
cost_tracking = true           # Track token costs per session
error_prevention = true        # Proactive error avoidance
token_forecast = true          # Estimate remaining context budget
smart_truncation = true        # Adaptive output compression
project_dna = true             # Learn project-specific patterns
rule_effectiveness = true      # Track which rules improve outcomes
drift_velocity = true          # Monitor session goal drift
compaction_optimizer = true    # Optimize context compaction behavior
command_recovery = true        # Suggest recovery after command failures

Field Reference

KeyTypeDefaultDescription
assistant.typestring"auto"Which AI assistant to target. "auto" detects from the hook caller.
restrictions.disabledstring[][]Rule IDs to disable. HardDeny rules cannot be disabled.
telemetry.anomaly_detectionbooltrueDetect unusual command frequency or error spikes.
telemetry.quality_predictorbooltruePredict session quality from the first 10 turns.
telemetry.cost_trackingbooltrueEstimate token costs per session.
telemetry.error_preventionbooltrueInject hints before likely errors (based on learned patterns).
telemetry.token_forecastbooltrueEstimate remaining context budget.
telemetry.smart_truncationbooltrueAdaptive compression thresholds based on context pressure.
telemetry.project_dnabooltrueLearn project-specific conventions and patterns.
telemetry.rule_effectivenessbooltrueTrack whether rules improve outcomes over time.
telemetry.drift_velocitybooltrueMonitor how far the session drifts from its original goal.
telemetry.compaction_optimizerbooltrueOptimize what goes into the resume packet after compaction.
telemetry.command_recoverybooltrueSuggest recovery steps after command failures.

The telemetry keys control which intelligence modules are active. Disabling a module removes its signal from session health scoring and advisory generation. For example, setting drift_velocity = false means drift won’t generate advisories.

Common Configuration Tasks

Disable a specific substitution:

# In ~/.warden/config.toml
[restrictions]
disabled = ["substitution.0"]  # Stops grep → rg redirection

Change thresholds:

[thresholds]
max_read_size = 100000        # Allow reading files up to 100KB (default: 50KB)
doom_loop_threshold = 6       # Detect loops after 6 cycles (default: 4)
stagnation_turns = 8          # Flag stagnation after 8 turns without progress

Enable git read-only mode for a project:

git_readonly = true

This blocks all mutating git commands regardless of other settings.

Useful Commands

# Show the config file path
warden config path

# Print current config
warden config list

# Set a value
warden config set telemetry.drift_velocity false

# Get a specific value
warden config get assistant.type

# Output JSON Schema for config.toml
warden config schema