| name | autoconfig |
| description | 24/7 self-improving Claude configuration loop — continuously optimizes runtime config via automated benchmarking |
| user_invocable | true |
| commands | ["status","run","report","rollback","best","pause","resume"] |
AutoConfig — Self-Improving Configuration Loop
Inspired by Karpathy's autoresearch: autonomously mutate config knobs, benchmark via claude -p, keep improvements, discard regressions. Improvements compound — each kept change becomes the new baseline.
Commands
/autoconfig status
Show current state: phase, experiments run, improvements found, rate limit status, daemon state.
Steps:
- Read
~/.claude/state/autoconfig/program_state.json
- Query experiment DB for totals:
get_experiment_count(), get_total_kept(), get_cumulative_improvement()
- Check daemon process:
pgrep -f experiment_daemon.py
- Check rate limit state
- Display summary table
/autoconfig run
Run one experiment cycle manually (foreground).
Steps:
- Import and call
run_one_experiment() from experiment_daemon.py
- Display the mutation tried, benchmark results, and keep/discard decision
- If kept, show the improvement percentage
/autoconfig report
Generate a comprehensive report of experiment history.
Steps:
- Query experiment DB: top improvements, trend analysis, per-phase stats
- Compute Pareto frontier (best composite at each phase)
- Show per-knob attribution (which changes contributed most improvement)
- Show total drift from original config (knobs changed)
- Show cumulative improvement curve
- Show convergence status per phase
/autoconfig rollback
Restore the original baseline config.
Steps:
- Confirm with user: "This will restore the config to the initial baseline. Continue?"
- Call
restore_snapshot("baseline")
- Verify config is valid (JSON parse, required fields present)
- Display what changed
/autoconfig best
Apply the best-ever config.
Steps:
- Check if best snapshot exists
- Show comparison: current score vs best score
- Call
restore_snapshot("best")
- Verify config validity
/autoconfig pause
Stop the daemon temporarily.
Steps:
- Run
launchctl unload ~/Library/LaunchAgents/com.chadsimon.autoconfig.plist
- Verify daemon stopped
- If mid-experiment, restore checkpoint
/autoconfig resume
Restart the daemon.
Steps:
- Run
launchctl load ~/Library/LaunchAgents/com.chadsimon.autoconfig.plist
- Verify daemon started
- Show current phase and experiment count
Config Surface
| Target | File | Knobs |
|---|
| Route manifest | ~/.claude/state/route_manifest.json | ~200 (models, effort, lanes, swarm, dispatch) |
| Settings | ~/.claude/settings.json | ~5 (effort level, model defaults) |
| Agent defs | ~/.claude/agents/*.md | ~15 (model, effort, behavioral rules per agent) |
Safety
- Immutable fields are NEVER touched (permissions, hooks, MCP servers, risk classes)
- All mutations validated against bounds before application
- Checkpoint/rollback on every experiment
- Crash recovery on daemon restart
- See
references/safety_spec.md for full guardrail documentation
References
references/safety_spec.md — Immutable fields, mutation bounds, isolation rules
references/metric_spec.md — Composite metric formula, noise band, confirmation trials
program.md — Current research phases and exploration strategy
scripts/run_benchmark_matrix.py — Files-first repeated benchmark comparison across current, baseline, and best presets