# Must AI-generated code be open source? Three questions before you ship

> No blanket rule makes AI-generated code open source. Separate US and UK copyright rules from license authority and the human work of reviewing a release.

- Published: Nov 16, 2026
- Author: Linden Kern, Chief Scientist
- Tags: agents, coding-agents, ecosystem, opinion
- Canonical: https://pirouter.ai/blog/ai-generated-code-open-source-obligations

---
Cover illustration generated with GPT Image: a metaphor for availability, permission, and maintenance, not a real legal document.

No blanket rule requires AI-generated code to be open source simply because a model helped produce it. The argument that developers *ought* to give back to an open ecosystem is worth taking seriously, but it does not settle whether a particular output has copyright protection, whether you have authority to license every part of it, or whether the code is fit to ship. Those questions depend on the work and the applicable rules; a public repository cannot answer them for you.

Imagine a developer preparing a patch drafted mostly by a coding assistant. They could keep it private, publish the source without a license, choose an open-source license, or propose the patch to somebody else's project. Those actions have different consequences. The developer first needs to know what they can claim about the code, what permissions they can actually give, and who will review the result. This is a hypothetical decision, not a claim about a particular product or contributor. Ask, in order: is it protectable, can you grant rights, and who will review it?

## The case for opening AI code is about reciprocity, not an automatic license

In [“All AI-generated code should be Open Source”](https://jakub.jankiewicz.org/blog/ai-code-open-source/), Jakub T. Jankiewicz argues that models benefit from decades of open-source development and material shared under attribution requirements. Turning that collective input into private output, they write, “feels like license laundering.” The phrase names a perceived unfairness. It is not, by itself, a finding that a specific output reproduced protected code or inherited a particular license from training material.

Their proposal is explicit: developers and companies should release AI-produced code under an open-source license or use CC0 to dedicate rights they hold to the public domain. The broad headline is not the whole argument. The essay acknowledges that human and machine contributions lie on a spectrum, then singles out code produced with little human work beyond prompting and little review as an especially strong case for openness. Nor does it say that using an assistant obliges a company to publish an entire private repository.

![The original essay's title card reads All AI-generated code should be Open Source, with the author's byline and a November 13 date](/blog/images/ai-generated-code-open-source-obligations-original-claim.png "The original essay argues what developers should choose to do; its title is not a statement of a universal legal duty. Source: [Jakub T. Jankiewicz, original essay](https://jakub.jankiewicz.org/blog/ai-code-open-source/)")

The [public source file](https://raw.githubusercontent.com/jcubic/jankiewicz-blog/master/src/blog/en/ai-code-open-source.md) carries a November 13, 2026 date; the rendered essay does not independently display a first-publication date. The [Hacker News discussion](https://news.ycombinator.com/item?id=50507303) was submitted on November 15. Its attention explains why the question is being asked now, not which answer the law supplies or what all developers think. We do not need to invent a unified opposing camp to make the question useful.

The fairness concern is strongest as a request for a choice. A developer may decide that work made with help from a shared corpus should be shared in turn. That choice can be principled even when there is no universal rule compelling it. But if we stop there, we mistake the moral reason to publish for permission to license every component we publish.

## Can you claim copyright in an AI-produced file? Start with the jurisdiction

The first legal question is narrower than “Is AI code open source?” It asks which expressive parts of a particular work, if any, qualify for copyright protection under the relevant law. The answer is not a percentage of lines written by a person. A developer might prompt once and accept a result untouched; another might make expressive choices in selecting, arranging or rewriting material. Those are different factual records, and the label “AI-assisted” does not erase the difference.

In the United States, the [U.S. Copyright Office's January 2025 copyrightability announcement](https://www.copyright.gov/newsnet/2025/1060.html) says AI-assisted work can be protected where a human author has determined sufficient expressive elements. It identifies creative arrangement or modification as possible ways that human expression can appear, while saying that merely providing prompts is not enough. The Office's position does not let us inspect an unknown code file and announce either “copyrighted” or “public domain.” It tells us what kind of human contribution matters to the U.S. analysis.

![U.S. Copyright Office NewsNet 1060, dated January 29, 2025, explaining sufficient human expression and the limits of prompts alone](/blog/images/ai-generated-code-open-source-obligations-copyright-office.png "The U.S. Copyright Office addresses copyrightability, not a duty to open-source code. This January 2025 announcement is background for the current debate, not a new rule published this week. Source: [U.S. Copyright Office, NewsNet 1060](https://www.copyright.gov/newsnet/2025/1060.html)")

The original essay points out that national laws differ. In the United Kingdom, the [Copyright, Designs and Patents Act 1988, section 9(3)](https://www.legislation.gov.uk/ukpga/1988/48/section/9) addresses the author of a qualifying computer-generated literary, dramatic, musical or artistic work: the person who undertook the arrangements necessary for its creation. [Section 178](https://www.legislation.gov.uk/ukpga/1988/48/section/178) defines “computer-generated” by reference to circumstances in which the work has no human author. These provisions are a meaningful contrast with a slogan that all work without a human author must be treated the same everywhere. They do **not** tell us that every AI-produced code file qualifies, who made the necessary arrangements in an individual case, or how a cross-border project should settle ownership.

That is why “the U.S. may not protect a purely machine-produced contribution” cannot be translated into “all AI code worldwide is free for anyone to take.” The former concerns a defined copyright question in one jurisdiction. The latter would make claims about every output, every component and every place, without checking any of them. Even a file containing an unprotectable generated passage may also contain human-authored expression or third-party material; the legal analysis cannot be assigned to the whole file by its filename or by a model's involvement.

And protection is not permission. A copyrightability answer does not independently establish that the output is clear of rights in material it may reproduce, nor does it resolve contracts governing the work. That is a separate question from whether training on open-source material was authorized. The essay raises that concern, but it does not provide a comparison showing that our hypothetical patch copied a protected passage from any identified repository. We should not invent that link in either direction.

## A public repository is not the same thing as an open-source grant

Now suppose the developer posts the patch online. Another developer can read it. Can they take it, modify it and redistribute their version? The answer is not supplied merely by the visibility of the source. The [Open Source Initiative's FAQ](https://opensource.org/faq) distinguishes source that people can see from software distributed with permissions to use, modify and share. A visible file with no license attached is not made open source just because a browser can display it.

The [Open Source Definition](https://opensource.org/osd) describes conditions a qualifying license must meet, including free redistribution, access to source in a form programmers can modify, and permission for modified or derived works. Those conditions explain what the term *open source* promises to the recipient. They do not order everyone who uses a model to make their code public. Nor does publishing an output under a familiar license establish that the publisher controlled all the rights implicated by that output.

Jankiewicz offers CC0 as another route. [Creative Commons describes CC0](https://creativecommons.org/public-domain/cc0/) as a way for a person to waive copyright and related rights to the extent the law permits, and cautions against applying it to someone else's work without legal authority. OSI's FAQ also distinguishes a public-domain dedication from an OSI-approved software license; public-domain treatment can vary by jurisdiction. CC0 can express a wish to remove claims a releaser holds. It cannot waive a stranger's rights, and attaching it does not create a copyright interest that did not exist.

Consider a hypothetical repository with human-authored application code, an assistant's suggestions and a dependency under its own license. Calling the whole thing “AI-generated” does not identify who can license the human-written parts, whether any suggestion reproduces third-party material, or how the dependency may be redistributed. The right practical response is to check provenance and the relevant terms before choosing what to release. It is **not** to presume that all generated suggestions are infringing; it is equally unsound to presume that an open-source badge cures a problem nobody has investigated.

Sharing a patch can honor the community that made the tools possible. But “open” should mean dependable permission for recipients, not merely a public download.

## Before you ship, ask three separate questions

The same generated patch can pass one question and fail another. A team may have made enough human expressive choices to claim protection under an applicable rule, yet still need to check an included library's license. They may be able to distribute the code under an open-source license while having no reviewer prepared to maintain it. Conversely, uncertainty about copyright protection in a wholly generated passage does not excuse a security defect in the program that contains it.

| Decision | Evidence to collect | What an answer does not prove |
|---|---|---|
| Copyrightability in the applicable jurisdiction | Record the human selection, arrangement and revision of expressive material; identify which jurisdiction's rule is being considered. | A U.S. conclusion does not decide the UK position or clear third-party rights. |
| Authority to grant a license or dedicate rights | Identify who contributed each relevant component, what rights they control, and the terms governing included material and dependencies. | A public repository, license label or CC0 notice cannot grant a stranger's rights. |
| Readiness and responsibility for release | Assign a human to review behavior, tests, security and dependency compatibility; decide who will handle defects. | Visibility and a permissive license do not establish that the code works or that anyone has reviewed it. |

This is a decision aid, not a legal test with three automatic verdicts. The first row draws on the [U.S. Copyright Office's human-expression account](https://www.copyright.gov/newsnet/2025/1060.html) and the distinct [UK statutory route](https://www.legislation.gov.uk/ukpga/1988/48/section/9). The second uses the [OSI FAQ's licensing distinction](https://opensource.org/faq) alongside [Creative Commons' CC0 limits](https://creativecommons.org/public-domain/cc0/). The third concerns the work a releaser still has to do, whatever license they choose. If rights or provenance are unknown, “investigate” is more honest than “it must be open” or “we own it all.”

Identify what you can offer before promising broad rights, then make the release reviewable. Declining to impose a blanket duty does not dismiss the essay's fairness question.

## Open code still needs someone who can stand behind it

Open-sourcing a patch can let others inspect and improve it. It does not automatically give a maintainer enough time to test it or an incoming contributor enough understanding to explain it. In [GitHub's guidance for Copilot inline suggestions](https://docs.github.com/en/copilot/responsible-use/inline-suggestions), users are told to review generated suggestions and account for bugs, security vulnerabilities and intellectual-property risks. Its [guide to reviewing AI-generated code](https://docs.github.com/en/copilot/tutorials/review-ai-generated-code) calls for examining behavior, tests and dependencies, including license compatibility. These are product guidance and useful engineering practices, not statutes governing every user or project.

A maintainer may also set a project-specific rule about AI-assisted contributions. That question is different again from whether the resulting software is open source. Our earlier [account of a specific repository's AI contribution policy](/blog/qgis-ai-code-contribution-policy) concerns which patches that project accepts; it does not establish a global legal rule for how AI-assisted outputs must be licensed. Before contributing, read the receiving project's current rules rather than assuming an open-source license gives you an unconditional right to have a patch merged.

The release choices can therefore be stated without pretending the facts have already been settled. If you want to share code produced with an assistant, keep a record of the human choices and edits that shaped it, inspect third-party material and dependencies, and choose an open-source license or a dedication only for rights you can actually address. Have a person review what the code does and decide who will respond when it fails. If a rights question is material and unresolved, investigate it before making a broad permission claim; a public repository is not a substitute for that work.

Jankiewicz's argument remains a meaningful invitation: a developer who benefited from a shared ecosystem may choose to return code to it. Whether a particular developer can license a particular file, and what they must check before shipping it, cannot be settled by the slogan alone. The honest distinction is not “open versus closed” as a measure of virtue; it is between a deliberate, supportable release and a label attached before the work is understood. This article explains general boundaries, not legal advice on any specific codebase.

---

## Sources

### jakub.jankiewicz.org

- [All AI-generated code should be Open Source](https://jakub.jankiewicz.org/blog/ai-code-open-source/)

### raw.githubusercontent.com

- [public source file](https://raw.githubusercontent.com/jcubic/jankiewicz-blog/master/src/blog/en/ai-code-open-source.md)

### news.ycombinator.com

- [Hacker News discussion](https://news.ycombinator.com/item?id=50507303)

### copyright.gov

- [U.S. Copyright Office's January 2025 copyrightability announcement](https://www.copyright.gov/newsnet/2025/1060.html)

### legislation.gov.uk

- [Copyright, Designs and Patents Act 1988, section 9(3)](https://www.legislation.gov.uk/ukpga/1988/48/section/9)
- [Section 178](https://www.legislation.gov.uk/ukpga/1988/48/section/178)

### opensource.org

- [Open Source Initiative's FAQ](https://opensource.org/faq)
- [Open Source Definition](https://opensource.org/osd)

### creativecommons.org

- [Creative Commons describes CC0](https://creativecommons.org/public-domain/cc0/)

### docs.github.com

- [GitHub's guidance for Copilot inline suggestions](https://docs.github.com/en/copilot/responsible-use/inline-suggestions)
- [guide to reviewing AI-generated code](https://docs.github.com/en/copilot/tutorials/review-ai-generated-code)
