Your AI-Written Code Isn't Open Source. It's Worse.
AI-written code can't be open-sourced because you don't own it. It's unowned and secret at once, and anyone can re-derive it. What you still own is what you chose: architecture, data, distribution.
OPC Community
OPC Community

You can still keep it secret. You just can't call it yours anymore, and the market quit caring about the difference a while ago.
Chunks of Twitter's source code sat on a public GitHub repo for months in early 2023 before anyone at the company noticed. The takedown came in March. A week later, Twitter published its recommendation algorithm on purpose.
Nobody built a Twitter out of either one. The competitor that drew blood showed up four months later, when Meta launched Threads and signed up 100 million people in five days. Meta had no use for Twitter's code. It had Instagram's graph.
Hold that thought, because Jakub Jankiewicz has an essay on the Hacker News front page this week arguing that AI-generated code should be open source. His case is a moral one. The models learned from public code, so whatever they produce belongs back in the commons. Most founders will take it as a provocation and close the tab.
I'd stay a minute longer. Jankiewicz has the remedy wrong and the wound right. If a model wrote 90% of your repo, the thing you're holding has an odd legal status and a worse economic one.
Unowned Is Not the Same as Open
Law first, since "should be open source" falls apart the moment it touches any.
An open source license is a copyright license. MIT and the GPL only work because somebody owns the code and grants permissions on it. No owner, no license.
And the US Copyright Office has been consistent about who gets to be an owner. Its January 2025 report on copyrightability says prompts alone don't give a human enough control over the output to count as its author. Two months later the D.C. Circuit said the same thing in Thaler v. Perlmutter: authorship requires a human.
The Office had already tested the principle in 2023, on a comic book called Zarya of the Dawn. Kris Kashtanova kept copyright in the text they wrote and in how they selected and arranged the pages. The Midjourney images got nothing.
Now run that on a repo. The functions your agent wrote from a two-line prompt are the Midjourney images. You can't open-source them, because you can't license what you don't own. You can't enforce copyright on them either.
So no, AI-written code is not open source. It's something stranger, unowned and secret at the same time, and it behaves like private property for exactly as long as nobody else can see it.
The Best Rebuttal Is Correct and Doesn't Help
Every thread on this topic produces the same counterargument. It's the strongest one going, and it deserves a straight answer.
The argument runs like this. Copyright was never what protected closed-source software. Your SaaS code sits on a server, where trade secret law covers it, and the Defend Trade Secrets Act has no authorship test. It asks two things: does the information have value from being secret, and did you take reasonable steps to keep it that way? Pile employment contracts and terms of service on top and the copyright question is trivia.
All true. I'd go further and say that for a closed-source startup, copyright has been decorative for twenty years.
But look at what trade secret law leaves out. It protects you against theft. Against someone who builds the same thing independently, it gives you nothing.
For a long time that gap was academic, because building the same thing independently cost a team and two years. The secrecy of your code was really a proxy for the labor inside it. A rival who couldn't steal it had to pay for it all over again.
That price has collapsed. In early 2025, YC partner Jared Friedman said a quarter of the winter batch had codebases that were about 95% AI-generated. Those teams didn't each invent something scarce. They each rented the same capability, and so can whoever watches their demo video.
The chardet fight this spring showed how far it goes. The Python library had carried an LGPL license since Mark Pilgrim's original port. Then a maintainer had Claude rewrite it and shipped the result under MIT. Pilgrim objected, loudly. Set aside who was right and look at the mechanics. A license that had bound a codebase for well over a decade turned into something you could route around in days.
If a rewrite can dissolve a copyleft license, it can dissolve your head start. Your code is still a secret, sure. It's a secret anyone can re-derive.
The Ownership Question Bites in the Data Room
There's one place where all this legal fuzz turns into money, and founders tend to find it late.
Every acquisition agreement, and most priced rounds, includes a representation that the company owns all intellectual property in its software. For years that sentence was boilerplate. You had invention assignment agreements from every engineer, so you signed.
Now a careful buyer's counsel asks what fraction of the repo a human authored, and whether you can show it. Most teams can't. Nobody logs which functions were written, which were edited, and which were accepted with a keystroke.
I don't think this kills deals. I think it changes what gets priced. A buyer who can't get a clean rep on the code discounts the code and pays for everything else: the customer contracts, the usage data, the brand, the team.
Which is the honest valuation anyway. The lawyers just happen to be the first people forced to write it down.
What Twitter's Leak Already Proved
Code leaks are natural experiments, and by now we've run a lot of them.
Twitch lost its entire source tree in October 2021, all 125 gigabytes. No Twitch clone appeared. What Twitch had was streamers with audiences and audiences with habits, and none of that was in the tarball.
Cursor is the cleaner case, because it runs the experiment in reverse. Cursor is a fork of VS Code, a codebase Microsoft hands to everyone under an MIT license. Every competitor started from the same free foundation. Cursor passed $100 million in annual revenue in about a year anyway, on product decisions about how an editor should feel when a model is in it.
Same code available to all, wildly different outcomes. Whatever explains the gap is the thing worth protecting.
Founders know this in the abstract and then act the opposite way. They'll burn a week arguing over whether to open-source a helper library and spend no time at all asking who else can reach their customers. The repo feels like the company because the repo is where the hours went.
That feeling is the real casualty here. If you've written software for a living, the quiet fear under this whole debate is that the thing you were proud of has become the cheap part.
It has. Better to say so plainly and move.
The Law and the Market Drew the Same Line
One thing I didn't expect when I went back through the Copyright Office's reasoning.
The Office doesn't say AI-assisted work gets nothing. It says protection attaches where human creative choices are perceptible: what you selected, how you arranged it, what you changed and why. Kashtanova lost the images and kept the arrangement.
In a codebase, selection and arrangement have a name. We call them architecture. Which problems you chose to solve and which you refused, what the data model assumes about your customer, where you put the seams. A model will hand you any of ten designs on request. Picking the right one for a market you understand is the human contribution, and it's the only layer the law still credits to you.
So the regulator's test and the market's test turn out to be the same test. Both ask what a person decided, and neither cares who typed.
“You don't own what the model wrote. You own what you chose.”
People dismiss taste as a soft word. I think it's the most concrete asset in the building. Two teams with the same model and the same prompt budget ship products that feel nothing alike, and taste is why.
Move the Fence
If code is the commodity, protecting it harder is wasted effort. I'd spend that effort in four other places.
Treat your data like you used to treat your source. The repo can be regenerated. Three years of what your customers did inside the product can't. Check your terms of service to see whether you have the rights to learn from that usage. Then check your vendor contracts to see whether someone else does.
Keep a record of your decisions. Write down why the system is shaped the way it is: the design docs, the rejected alternatives, the human edits to generated code. When a buyer's lawyer asks, that record is your evidence of authorship. It also makes the system re-creatable by you and opaque to a copier, who gets the output without the reasons.
Buy distribution before you need it. Meta beat a decade-old incumbent's feature set in a week because the audience was already there. An email list of 20,000 people who open your messages is a better moat than any module in your repo. A rival's agent can rewrite the module. It has no way to get your list.
Be generous with the code itself. If the helper library gets you developers' attention, ship it. Jankiewicz's instinct to give it back is a fine business move for the wrong reason. You aren't repaying a debt to the commons. You're trading something cheap for something scarce.
The uncomfortable version of all this goes: assume everything in your repo will be public or reproduced within two years, then ask what's left. If the answer is "not much," no license or NDA would have saved you.
Twitter's code leaked and nothing happened. Then Twitter's audience got a better offer for a week, and the company felt it for a year.
Somebody will see your code. Find out now what they still can't take.
Frequently Asked Questions
Can you copyright AI-generated code?
Not the parts a model wrote from prompts alone. The US Copyright Office's January 2025 report says prompts don't give a human enough control to count as the author, and the D.C. Circuit confirmed in Thaler v. Perlmutter that authorship requires a human. Protection still attaches where human creative choices are perceptible: what you selected, how you arranged it, and what you changed. In a codebase, that means the architecture.
If AI-written code can't be copyrighted, how is a closed-source startup's code protected?
Through trade secret law. The Defend Trade Secrets Act has no authorship test; it only asks whether the information has value from being secret and whether you took reasonable steps to keep it that way. The catch is that trade secret law protects against theft, not against someone building the same thing independently, and AI has collapsed the cost of doing that.
How does AI-generated code affect fundraising or an acquisition?
Acquisition agreements and most priced rounds include a representation that the company owns all IP in its software. A careful buyer's counsel now asks what fraction of the repo a human authored and whether you can show it. It likely won't kill the deal, but a buyer who can't get a clean rep discounts the code and pays for the customer contracts, usage data, brand, and team. A record of design decisions and human edits is your evidence of authorship.
Join the OPC Community
Connect with solo founders worldwide. Get daily insights, curated opportunities, and peer support.
Join free