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
| Key | Type | Default | Description |
|---|---|---|---|
assistant.type | string | "auto" | Which AI assistant to target. "auto" detects from the hook caller. |
restrictions.disabled | string[] | [] | Rule IDs to disable. HardDeny rules cannot be disabled. |
telemetry.anomaly_detection | bool | true | Detect unusual command frequency or error spikes. |
telemetry.quality_predictor | bool | true | Predict session quality from the first 10 turns. |
telemetry.cost_tracking | bool | true | Estimate token costs per session. |
telemetry.error_prevention | bool | true | Inject hints before likely errors (based on learned patterns). |
telemetry.token_forecast | bool | true | Estimate remaining context budget. |
telemetry.smart_truncation | bool | true | Adaptive compression thresholds based on context pressure. |
telemetry.project_dna | bool | true | Learn project-specific conventions and patterns. |
telemetry.rule_effectiveness | bool | true | Track whether rules improve outcomes over time. |
telemetry.drift_velocity | bool | true | Monitor how far the session drifts from its original goal. |
telemetry.compaction_optimizer | bool | true | Optimize what goes into the resume packet after compaction. |
telemetry.command_recovery | bool | true | Suggest 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