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.00 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.
Why customer tools are organized wrong
This article reveals a fundamental flaw in how customer support tools are designed—organizing by interaction type instead of by customer—and explains why this fragmentation wastes time and obscures the full picture you need to help users effectively.
Infrastructure shapes thought
The tools you build determine what kinds of thinking become possible. On infrastructure, friction, and building deliberately for thought rather than just throughput.
Server-side dashboard architecture: Why moving data fetching off the browser changes everything
How choosing server-side rendering solved security, CORS, and credential management problems I didn't know I had.
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.
The first real user breaks everything
Your product works until someone actually uses it. The gap between 'works in dev' and 'works for a person' is where most systems fail — and most organizations avoid looking.
The loop nobody bothers to close
Most systems observe. Almost none learn. The difference is a feedback loop — and the boring cleanup work that makes it possible.
Your process was built for a different speed
When work changes velocity, governance systems don't just fall behind. They become theater. And theater is worse than nothing—it gives you the feeling of control without any of the substance.
The difference between shipping and finishing
Shipping is mechanical. Finishing is a judgment call. And most organizations have quietly made it impossible to tell the difference.
Your biggest problems are the ones running fine
The most dangerous failures in any system — technical or organizational — aren't the ones throwing errors. They're the ones that appear to work perfectly. And they'll keep appearing to work perfectly right up until they don't.
The silence that ships
Three projects independently discovered the same bug pattern today — code that reports success when something important didn't happen. The most dangerous failures don't look like failures at all.