The smartest code you'll ever delete
The most dangerous kind of waste isn't the thing that doesn't work. It's the thing that works beautifully and shouldn't exist.
Duration: 5:27 | Size: 5.0 MB
Hey, it’s Paul. Friday, March 6th, 2026.
I deleted about 500 lines of code today. And the weird part is, every one of those lines was good. Well-structured, well-tested, doing exactly what it was designed to do. A complete agent system — tool dispatch, multi-provider support, file reading, error handling. Months of work. Working code.
I replaced it with about 60 lines and a subprocess call.
Here’s what happened. I’ve been building an autonomous system that preps GitHub issues — reads the codebase, writes implementation specs, breaks down tasks that are too big. And the core of it was a custom agent loop. My code would call the AI model, parse its responses, dispatch tool calls, manage conversation history, handle errors, track costs. A thousand lines of orchestration.
And at some point this week I realized: I’m rebuilding a worse version of something that already exists. The Claude CLI already does all of this. It reads files. It searches code. It manages its own conversation. It handles tool errors. It tracks costs. Everything my thousand lines were doing, but better — because Anthropic spent millions of dollars making it good.
So I ripped it all out. Triage still runs as a quick classification call. But the actual work — the expensive, complex, exploratory stuff — now just delegates. A subprocess call. “Here’s the issue, here’s the repo, go figure it out.” Done.
And the system is better now. Not a little better. Categorically better. Because I’m no longer maintaining a bad copy of someone else’s good work.
This is a pattern I keep running into, and I think it’s more widespread than people realize. Call it the build trap.
When you’re technically capable, you default to building. You see a problem, you have the skills, so you build a solution. And the solution works. That’s the dangerous part. It works just well enough that you never question whether it should exist.
Organizations do this constantly. Every company of a certain size has a homegrown version of something they could have bought or used off the shelf. An internal ticketing system. A custom deployment tool. A bespoke analytics dashboard. And if you ask the team that built it, they’ll have reasons — good reasons — for why the existing tools didn’t fit. They needed feature X. The integration with system Y was tricky. The existing option didn’t quite match their workflow.
All true. All beside the point. Because the cost isn’t building the thing. The cost is maintaining a thing that shouldn’t exist. Every bug fix, every feature request, every new hire who has to learn your custom system instead of the industry-standard one. That’s the real price. And it compounds.
What made today clarifying was that I did something else, too — something that looks unrelated but isn’t.
Across a different project, I spent time closing issues that were already done. Six features, all live in production, all working fine. But the issues were still open. The tracking system said they were incomplete. The milestone showed 1 of 11 closed when the real number was 7.
This is the bookkeeping problem. And it’s the same pattern as the build trap, just from a different angle.
The build trap says: you built something that shouldn’t exist, and now you’re paying maintenance tax on it forever. The bookkeeping gap says: you shipped something that works, but you didn’t close the loop, so the tracking system is lying to you.
Both of them are about the gap between what’s real and what’s recorded. And both of them create drag.
Here’s the thing about drag. It doesn’t feel like a crisis. It feels like a low hum. You get used to it. Your issue tracker says you’re behind when you’re not, and you stop trusting it. Your custom tool mostly works, so you learn to work around the parts that don’t. The cost isn’t dramatic. It’s atmospheric. It’s the reason everything feels slightly harder than it should.
I want to zoom out for a second because I think this connects to something bigger about how work is changing.
The old model of technical work rewarded building. If you could build it, you were valuable. The more complex the thing you built, the more valuable you were. Your custom agent loop with multi-provider support and tool dispatch? That’s impressive. That demonstrates skill.
But we’re moving into a world where the reward structure is shifting. The valuable skill isn’t building the thing. It’s knowing when not to. It’s recognizing that your thousand lines of clever orchestration is actually technical debt wearing a nice suit.
This is hard. It’s genuinely hard to look at working code you’re proud of and say: this shouldn’t exist. It feels like admitting failure. But it’s the opposite. Deletion is a design decision. It’s the decision to stop maintaining complexity you don’t need.
When I run a scouting pass across my projects — an automated sweep that looks for bugs, inconsistencies, drift — it regularly finds things that are wrong but not broken. A type mismatch that hasn’t caused a production error yet. A validation check that drifted out of sync with the main path. An input field that doesn’t sanitize properly. None of these are on fire. All of them are drag.
The discipline isn’t putting out fires. The discipline is reducing the surface area where fires can start. And often the most effective way to do that is subtraction. Fewer lines of code. Fewer custom tools. Fewer things you maintain that somebody else already maintains better.
So here’s the question I’m sitting with tonight.
What are you maintaining right now — a tool, a process, a habit — that works well enough that you’ve never questioned whether it should exist? What would happen if you replaced it with something simpler, something you didn’t build, something you don’t have to maintain?
The smartest code you’ll ever write might be the code you delete. The hardest part is admitting you were wrong to write it in the first place.
The agent-shaped org chart
Every real org has the same topology: principal, role-holder, specialists. Staff AI maps onto it, node for node, and the cost collapse shows up in the deliverables that were always just human-handoff overhead.
AI as staff, not software
Two frames for what AI is doing to work. The tool frame makes tools smarter. The staff frame makes roles unnecessary. Those aren't the same product, the same company, or the same industry.
Knowledge work was never work
Knowledge work was always coordination between humans who couldn't share state directly. The artifacts were never the work. They were the overhead — and AI just made the overhead optional.
The work of being available now
A book on AI, judgment, and staying human at work.
The practice of work in progress
Practical essays on how work actually gets done.
How do I get my dev team to adopt AI?
A stub on helping mixed-interest development teams find their own useful ways into AI.
Want to learn about agents? Talk to someone who ran an agency.
I spent 20 years running consulting engagements at Fortune 500 companies. Turns out that's the best preparation for running a fleet of AI agents ... because the problems are identical.
Your AI agents need a water cooler
We run a twelve-session AI fleet that coordinates through an IRC breakroom. A friend asked: why are you making AI agents act like humans? The answer turned out to be more interesting than the question.
The best customers are the first ones you turn against
Every subscription makes a bet that most customers won't use what they're paying for. The customer who closes that gap becomes a problem to be managed.
Delegation without comprehension is just prayer
The organizations that survive won't be the ones that automated the most. They'll be the ones that figured out what to stop delegating.
The case for corporate amnesia
Most organizations worship institutional memory. But what if the thing they're preserving is mostly decay?