
A developer asks an AI coding assistant to build a Redis-backed rate limiter for a Node.js API. A few seconds later, 150 lines of usable TypeScript appear.
They review the implementation, change the data model, fix an edge case, add tests and commit it. A week later, the code is running in production and nobody thinks much about where the first draft came from.
Now imagine the company is being acquired two years later. During the IP review, someone asks a simple question: who owns those 150 lines?
Suddenly the answer is less obvious.
The developer may have rights in some of the work. Their employer may own those rights instead. Some sections may have too little human authorship to receive copyright protection in certain countries. And if the generated code reproduces protected third-party code, another copyright owner can enter the picture entirely.
AI hasn't created a new kind of ownership so much as exposed how many different things we casually bundle under the word own.
An AI system isn't the copyright owner
This part is relatively straightforward.
An AI model such as ChatGPT, Claude, Gemini or Copilot is not treated as a person that can hold copyright in its own name. The legal argument is instead about the humans and companies around the system: the user, employer, AI provider and, potentially, owners of existing material reflected in the output.
Even then, there are two separate questions that are easy to mix together.
One is whether you are allowed to use the generated code. The other is whether you have copyright in it and can stop someone else from copying it.
Those are not always the same thing.
What if the AI provider says the output belongs to you?
Provider terms are important, but they don't settle everything.
OpenAI's business terms, for example, currently state that, as between OpenAI and the customer and to the extent permitted by applicable law, the customer owns the output. OpenAI also assigns to the customer whatever right, title and interest it may have in that output.
Notice the phrase "to the extent permitted by applicable law."
That qualification matters.
A contract can determine whether the provider keeps a claim over the output. It cannot force copyright law to protect material that does not satisfy the legal requirements for copyright in the first place.
So when a provider says you own the output, the useful interpretation is closer to this: the provider is not trying to keep its own rights in the generated material.
It does not necessarily mean that every generated function gives you an exclusive copyright that can be enforced against the rest of the world.
Human involvement matters
The United States has taken a fairly clear position on this.
In its 2025 report on generative AI, the U.S. Copyright Office said that AI-generated material can receive copyright protection where a human has determined sufficient expressive elements of the resulting work. Human modifications and creative arrangements can qualify, while simply providing prompts is not enough by itself.
That distinction becomes interesting when applied to programming.
Suppose one developer asks an assistant to produce a complete OAuth implementation, copies the response into the project with almost no changes and ships it.
Another developer starts with an AI-generated implementation but redesigns the interfaces, replaces parts of the authentication flow, rewrites several functions, handles failure cases and changes the structure during code review.
Both used AI, but describing both pieces of software as "AI-written code" hides most of what actually happened.
In normal development the boundary gets even harder to see. A generated function may be modified in three pull requests, refactored six months later and partially replaced during a framework migration.
At some point, counting which keystrokes came from the model stops telling you very much about the finished software.
Your employer may own the human-written part
There is another layer once the code is written for work.
Under U.S. copyright law, a work prepared by an employee within the scope of employment can be a "work made for hire." In that situation, the employer is treated as the author for copyright purposes and generally owns the copyright unless the parties have agreed otherwise in a signed written agreement.
So imagine you use an AI assistant while building a feature at work. You make substantial original changes and contribute enough human authorship for copyright protection to exist.
You still may not personally own that copyright.
The same practical issue appears in other countries through employment law, IP-assignment clauses and company agreements, although the details differ by jurisdiction.
Contractors require particular care. Assuming that paying someone to write software automatically transfers every relevant IP right is the sort of assumption companies tend to discover during due diligence rather than when the contract is signed.
Typing the prompt, therefore, tells us very little about who ultimately owns the finished code.
The answer changes depending on the country
AI copyright is not governed by one global rule.
The UK is particularly interesting because its copyright law already contains a provision for works generated by a computer where there is no human author. In that situation, the author is treated as the person who undertook the arrangements necessary for the work's creation.
The UK government's March 2026 report says that, for a general-purpose AI producing output in response to a prompt, that person will usually be the person who entered the prompt. The protection currently remains in place.
The future of that provision is less certain. The same 2026 report notes that many consultation respondents supported removing special protection for wholly computer-generated works, but the government said it would continue monitoring the provision's use and impact.
India has its own wording.
Section 2(d) of the Indian Copyright Act says that for a computer-generated literary, dramatic, musical or artistic work, the author is "the person who causes the work to be created."
That sounds simple until you apply it to modern AI coding.
Who caused a generated feature to exist? The developer who entered the prompt? The engineer who designed the system? The company using the model? What if one person writes the prompt and another rewrites most of the result?
The statute gives India a starting point, but today's generative coding systems make that old wording much more interesting than it used to be.
The bigger problem may be code the model didn't invent
For a software company, this can be a more immediate concern than deciding who authored a generated for loop.
AI-generated output can sometimes resemble existing source code. Similarity alone doesn't prove infringement โ software contains plenty of standard patterns, conventional APIs and straightforward implementations.
A distinctive block copied substantially from an existing project is a different matter.
Suppose an assistant returns an implementation that closely matches code from a GPL-licensed project. Your contract with the AI provider cannot erase whatever rights the original copyright holder has in that code.
The provider can assign its own rights.
It cannot assign somebody else's.
GitHub deals with this problem directly in Copilot. Its code-referencing system can identify certain suggestions that match code in public GitHub repositories and show developers the matching source and available licence information.
That is probably a healthier way for engineering teams to look at generated code. Don't assume code is legally clean merely because it arrived through an AI assistant. Treat provenance as something worth checking when the output is substantial or unusually distinctive.
Copyright isn't your only protection
There is another part of this discussion that is easy to overlook.
Imagine a company has a private repository containing proprietary pricing algorithms. Some portions started as AI-generated suggestions and their copyright status is uncertain.
That does not suddenly make the repository free for competitors to take.
Private software can be protected through confidentiality agreements, employment contracts, access controls and trade-secret law independently of copyright.
So there is an important difference between saying this particular material may not qualify for copyright and saying anyone is free to take it.
They are not equivalent.
What should engineering teams do about it?
Trying to calculate what percentage of a repository was "written by AI" isn't particularly useful.
Developers already work with generated migrations, IDE autocomplete, framework scaffolding, code snippets, internal libraries and copied documentation examples. AI makes the generated portion larger and much more sophisticated, but the need for review hasn't changed.
What matters is whether the team understands what it is shipping.
Generated code should go through normal review. Large or suspiciously distinctive outputs deserve more scrutiny. If a tool identifies matching public code, check the licence rather than assuming it is irrelevant.
Companies should also make sure employment and contractor agreements clearly address IP ownership. And proprietary source code should not be pasted into an external AI service without understanding the provider's data-use and confidentiality terms.
None of that requires developers to stop using AI.
It requires them to stop treating the AI chat window as a legal clean room.
So, who owns AI-written code?
There isn't one answer that works everywhere.
If meaningful human authorship is involved, copyright may exist in those human contributions. Depending on the employment or contractual arrangement, those rights may belong to the developer, their employer or another company.
Purely AI-generated material can receive different treatment depending on the country. The United States focuses on human authorship, while countries including the UK and India have statutory language dealing specifically with computer-generated works.
Third-party rights are separate again. If generated output substantially reproduces protected code, calling it "AI-generated" does not make the original copyright disappear.
For developers, the useful question isn't really Who pressed Generate?
It is: Who made the engineering decisions, where did the code come from, and what rights came with it?
Those are the questions that will matter when the code leaves the editor and becomes part of an actual product.
This article provides general information about software copyright and AI-generated code and is not legal advice. Copyright law, contracts and AI-provider terms vary by jurisdiction and can change.
Comments (0)
Join the discussion by logging into your account.
No comments yet. Be the first to comment!