AI-Generated Code Should Be Open, but Not by Decree

AI-Generated Code Should Be Open, but Not by Decree

If someone writes instructions and accepts the code returned by a model without reviewing it, should they be able to keep it closed and sell it as if they had created it from scratch? Jakub T. Jankiewicz says no: he argues that AI-generated code should be released under an open-source license or dedicated to the public domain. The thesis is convincing for code produced with little human involvement, though it is not enough to impose the same rule on every fragment assisted by AI.

Jankiewicz’s central argument points to an asymmetry: models were trained on large open-source code corpora, and their output can then end up in proprietary software. He also mentions content from Stack Overflow and other Stack Exchange sites, published under Creative Commons licenses that require attribution. Turning this collective knowledge into closed-source code strikes him as a form of license «laundering».

Turning this collective knowledge into proprietary, closed-source code feels like license laundering.

— Jakub T. Jankiewicz

The image is powerful, but the metaphor does not settle the legal question. The fact that a model was trained on code published under a license does not, by itself, prove that each output reproduces that code or automatically inherits its terms. TechTarget describes precisely this disagreement: some argue that using systems trained on open-source code should trigger the licenses; others respond that training is not equivalent to reusing code in the conventional way.

A rule for almost fully automated code

The strongest part of the proposal is not that every line influenced by AI should be made open. It is that someone who contributes little more than an instruction and accepts the output unchanged should not be able to claim exclusivity without explaining where that result came from. Jankiewicz identifies this case: code where human effort is reduced, in practice, to writing prompts. There, releasing the result under an open license or CC0 seems like a proportionate response.

The distinction matters because assisted development is not always a copy-and-paste operation. TechTarget distinguishes between directly incorporating an output, modifying it, and using it only as guidance before writing one’s own code. Treating these scenarios as equivalent would turn a reasonable proposal for almost-total automation into a burden that is difficult to justify for any use of a tool.

There is also a practical limit: the opacity of training data. TechTarget notes that many pretrained models do not disclose what materials they used. Without that information, it is difficult to identify which licenses might apply to a particular output. Requiring every developer to open all generated code could shift responsibility to users who cannot determine it with the information available.

The law offers no single answer

Jankiewicz bases part of his position on the idea that code generated without human authorship should not have copyright. But laws are not uniform. In the United States, he notes, the principle that animals cannot own copyrights has been invoked; in the United Kingdom, the law provides a different formula for certain computer-generated works. Section 9 of the Copyright, Designs and Patents Act 1988 attributes authorship of such works to the person who makes the necessary arrangements for their creation.

For that reason, a clear voluntary policy is more defensible than presenting openness as a universal legal obligation. Jankiewicz proposes open licenses or CC0 to harmonize treatment across jurisdictions, but that choice does not erase the differences between their laws. And if a company releases code under a specific license, that alone does not resolve whether the model reused material subject to another license.

TechTarget reports that, as of June 2025, no court decision had resolved whether training models on open-source code constitutes reuse or modification for the purposes of those licenses. In the litigation over GitHub Copilot, a judge dismissed some claims in 2024, finding that the generated code was not identical to the open-source code used for training; the plaintiffs later appealed. The controversy remained unresolved in the spring of 2025. This uncertainty is reason not to confuse an ethical position with a conclusion established in court.

Open by default, with an explicit boundary

The strongest objection to automatic openness is that code can combine substantial human work with AI suggestions. A person can review, modify, and integrate an output until it becomes something different from the initial response. TechTarget suggests that the extent of modification could affect obligations, although there is no definitive court rule drawing that boundary. Requiring the whole work to be opened in all such cases could erase meaningful distinctions between creation and assistance.

The response should not be to pretend that these distinctions are easy to measure. It makes sense to require transparency about AI use and keep a record of which parts were generated, as TechTarget recommends, so they can be reviewed if licensing problems arise. At the same time, providers can better explain what data they used to train their models. These measures do not replace a license, but they make the decision about what to open less arbitrary.

The principle worth supporting is more concrete: if the AI did almost all the work, whoever releases the result should choose an open license or CC0, unless they can justify another basis. Not because a universal legal obligation already exists, but because the claim to keep closed a result obtained with minimal human contribution is difficult to reconcile with the collective origins Jankiewicz points to. For code that incorporates appreciable human work, the answer should depend on the human contribution and the licenses actually involved, not on a generic «made with AI» label.

The discussion, then, is not resolved by declaring every AI-assisted line open or ignoring how models were trained. It starts by separating the cases: who did the work, how much the output was modified, and which license may apply. While those answers remain opaque, the most sensible proposal is to open by default code generated with almost no human involvement and demand greater transparency from those who build the models.

Sources: Jakub T. Jankiewicz Blog, TechTarget, UK legislation