Agents didn't kill libraries—they just changed the math
AI-generated content may be inaccurate or misleading.
I've been writing software long enough to remember when "don't reinvent the wheel" was gospel. Find a library. Import it. Move on. The assumption was clear: someone else's maintained code beats your one-off implementation every time.
That assumption is breaking down. Not because libraries got worse—they didn't. Because agents got good enough to change the economics.
The selection overhead problem
For many small needs, evaluating a dependency's quality, license, maintenance status, transitive dependencies, and security posture takes more time than just generating a minimal implementation. The agent scaffolds tests and edge cases instantly. The library requires a trust decision.
This flips the default. The question used to be "is there a library for this?" Now it's "is this worth a dependency?"
For utility-grade code adapters, parsers, CLI tools, thin wrappers, glue logic—the answer increasingly is no. The floor for "good enough" implementations rose while we were still installing the same libraries.
Pattern reuse replaced package reuse
Here's the shift that matters: reuse didn't disappear. It moved upstream.
Instead of importing some-lib, teams now reuse the design patterns the model has learned. The agent produces code that looks like the library you would have picked, but shaped to your specific constraints. Researchers call this "generative reuse"—reuse via synthesized code rather than direct adoption.
Your internal codebase becomes something new: an agent-addressable library. The agent writes a module, you keep it in-repo, and later that same agent refactors it or generates matching code that follows your conventions. First implementation is cheaper. Second reuse is easier.
The honest counterargument
If I stopped here, I'd be misleading you. The "agents replace everything" take is dangerously incomplete.
Libraries don't just ship initial code. They ship years of maintenance: weird edge-case fixes, platform bug workarounds, security hardening, CVE responses, backward compatibility, API stability. An agent generates code that works today. It doesn't generate a release process or a security response team.
There's a new kind of debt to account for: comprehension debt. AI output can be highly functional but architecturally naive. It works, but nobody fully understands why or how it fits the larger system. That's a maintenance time bomb.
Security compounds the problem. Studies show substantial fractions of AI-generated code fail security checks—one analysis found roughly 45% with flaws. And there's the supply-chain nightmare of "slopsquatting": agents hallucinate package names, attackers register them, installs get compromised. One study found nearly 20% hallucinated packages across large generated sets.
The productivity data is humbling
Here's the uncomfortable finding: a randomized controlled trial on experienced open-source developers found AI tools increased completion time. Experts got slower, despite expecting gains.
That doesn't invalidate AI assistance entirely. It means the benefits aren't uniform. Some tasks get easier. Some get harder. Knowing which is which requires honest assessment, not hype.
A practical framework Agents raise the floor for first-draft code. Libraries remain the floor for reliable systems, but that floor is higher than it used to be and constantly rising.
Worth generating: Small utilities, one-off adapters, thin wrappers, bespoke business logic, last-mile integration.
Worth depending on: Crypto, auth, parsers, compilers, distributed systems clients, databases, serialization—anything where security, performance, or ecosystem compatibility is table stakes and likely still going to be around in 10 years or more. There is probably some insight here that probably deserves a closer look.
The new default dependency is your own repo—written overnight by a machine, maintained forever by you. That's a real tradeoff, not a free lunch.
Open source isn't just code you can copy. It's bugs you don't have to rediscover. That value didn't go away. But the bar for "worth installing" went up.
Agents changed how we reuse software. They didn't eliminate the need for someone to maintain it.