Claude Code Routines Tunes CLI Performance 2.4x in 20+ PRs

Claude Code's Routines feature can be used for continuous autonomous optimization. A developer (u/yamadashy) set it up on a 2-hour cron schedule to tune their open-source CLI tool Repomix. Over 20+ PRs, the runtime improved by 2.4x.
Key Components
- Automated Tuning via Routines: A prompt defines performance goals; Claude Code's Routines run every 2 hours, generates changes and opens PRs.
- Benchmark Workflow (GitHub Actions): A custom workflow runs multi-OS measurements to validate each AI-suggested change before merging.
- Merge Flow: AI suggestions are picked up and merged into main after passing benchmarks.
The exact prompt used is shared in the article, along with all configuration files. Everything is open source — no paid tiers required. Repomix is the CLI that was optimized; Claude Code Routines and the benchmark workflow are also free to try.
For developers using AI coding agents, this demonstrates a practical CI loop: let AI continuously propose optimizations, validate against real benchmarks, and merge only improvements.
📖 Read the full source: r/ClaudeAI
👀 See Also

Connecting OpenClaw to Qwen2.5 Coder: Feasibility and Considerations
Explore the possibility of connecting OpenClaw to a local Qwen2.5 Coder model with 7 billion parameters to address rate limits with API Gemini 3.

Leanstral: Open-Source Code Agent for Lean 4 and Formal Proof Engineering
Mistral AI released Leanstral, the first open-source code agent designed for Lean 4, with 6B active parameters and Apache 2.0 licensing. Benchmarks show it outperforms larger open-source models and offers competitive performance to Claude at significantly lower cost.
Using an adversarial Claude chat to catch kickoff ambiguities before they cost you
A developer added a second Claude chat whose only job is to adversarially review kickoffs for ambiguous specs and silent failures, saving an estimated $150-400 in Claude Code rework across a project phase.

Fine-tuned Qwen3-0.6B model outperforms 120B teacher on structured function calling
Distil Labs published an end-to-end pipeline that fine-tunes a Qwen3-0.6B model to achieve 79.5% exact match on IoT smart home function calling, outperforming a 120B teacher model by 29 points. The pipeline uses production traces to generate synthetic training data without manual annotation.