Deleting 2000 lines of code simplifies AI system

We (my agents and I) deleted 2,000 lines of code yesterday. The system works better. Our Control Tower - the brain that coordinates our AI agents - had grown to 2,700 lines across 3 files. 20+ config knobs. Observation backoff curves. Multi-tier escalation. Event debouncing. Cycle versioning. It didn't work. Agents weren't receiving tasks. Session keys were overflowing. The observation loop was sleeping for minutes between cycles. Our review agent was rubber-stamping everything. Every fix added more mechanism. Every mechanism added more failure modes. The codebase was a graveyard of solutions to problems caused by previous solutions. So we deleted it all. The rewrite: 650 lines. Three functions. gather_state() plan() dispatch() One loop, ticks every 60 seconds. The LLM still makes all the decisions - we just removed everything standing between "here's the state" and "do what it says." Before: 2,700 lines, 50+ functions, 20+ config knobs After: 650 lines, 4 core functions, 7 config values Result: fully autonomous, dispatching tasks, agents building, dual review pipeline running, 1,294 tests passing. The lesson we should have started with: Complexity is not sophistication. It's a sign you stopped asking whether the simpler solution would work. Every mechanism you add is a mechanism that can break. Every config knob is a knob someone will set wrong. The best version of our system is the one where we deleted 2,000 lines. If you can't name the simpler alternative you considered, you haven't thought hard enough.

  • diagram, schematic

To view or add a comment, sign in

Explore content categories