All AI-Generated Code Should Be Open Source: The Case Against Licence Laundering

Models learned from GNU-era code and attribution-required Stack Exchange answers. One developer argues their output belongs in the open, and the law may agree.

Binary Buddies · 5 min read · 0 views
Code flowing from a shared archive to a single screenAt night, a skyline of stacked pages of code pours a stream of coloured lines across a room into a glowing monitor on a desk, beside a lamp and a plant.

Jakub Jankiewicz admits it may be a hot take: in a short post on his blog, he argues that all code generated by AI should be open source. Not encouraged to be, not nice if it were. Should be, by default, whoever prompted it and whatever product it ships in.

His case rests on two claims that developers pasting assistant output into closed repositories rarely stop to think about. The first is about where the code came from: models trained on decades of freely shared code and on Stack Exchange answers whose licence demands attribution. The second is about who owns the result. If no human wrote it, he argues, there may be no copyright for a company to assert in the first place.

The question is no longer academic. Jankiewicz points out that developers increasingly accept AI output without reviewing it, let alone reworking it. That is exactly the category of code he says has the weakest claim to being anyone's property.

Key takeaways

  • Jankiewicz calls closing AI-generated code “licence laundering”, because models learned from open source and attribution-required Creative Commons content.
  • In the US, the Monkey Selfie dispute set the principle that non-humans cannot hold copyright, and the US Copyright Office later cited it on AI.
  • The UK grants limited copyright to computer-generated works, so the law alone will not produce one consistent answer.
  • His remedy is voluntary but explicit: release AI-generated code under an open source licence or dedicate it to the public domain with CC0.

Licence laundering: the debt to the commons

The moral argument starts with the training data. Jankiewicz traces it back to the open source code written since Richard Stallman announced the GNU Project and launched the Free Software Movement. That body of work, he writes, was scraped from the internet and used without permission or proper attribution.

The second ingredient makes the point sharper. Models were also trained on Stack Overflow and its Stack Exchange sister sites, whose content is released under Creative Commons licences that legally require attribution. A generated function that echoes a well-known answer arrives with no credit attached, and once it lands in a proprietary codebase it is locked away from the community that produced the knowledge behind it.

His phrase for this is that turning collective knowledge into closed-source code “feels like license laundering”. Note the wording: it is a moral charge, not a court finding. Someone who sees training as learning rather than copying will not accept the premise. But the asymmetry he describes is easy to see. The inputs were shared on terms; the outputs are being enclosed without them.

The licence-laundering argumentOpen source code and Creative Commons licensed Stack Exchange posts feed model training, which produces generated code that is either closed, called licence laundering, or released as open source or CC0.Where the code came fromOpen source since GNUused without permissionStack Exchange, CC licensedattribution requiredModel trainingGenerated codeClosed: licence launderingOpen source or CC0
Follow the two inputs down: both were shared on terms, and the fork at the bottom is where Jankiewicz says those terms get dropped.

No human author, no copyright

The second argument is legal, and in some ways stronger, because it does not depend on how anyone feels about scraping. Purely AI-generated code, Jankiewicz writes, is not written by a human, so it should not be copyrightable at all.

The US foundation for that principle is the Monkey Selfie dispute, which established that non-humans cannot hold copyrights. According to Jankiewicz, the US Copyright Office later cited that precedent when it addressed AI. A photograph snapped by a macaque and a function emitted by a language model sit, on this reading, in the same category: output with no human author behind it.

He points to a working example of the principle in practice. Wikimedia Commons requires all purely AI-generated images to be tagged as public domain. If an encyclopedia's media library already treats machine-made pictures that way, the question is why machine-made code should be treated any differently.

The non-human author argumentA chain from the Monkey Selfie dispute, to the principle that non-humans hold no copyright, to its citation by the US Copyright Office on AI, to the conclusion that purely AI code is uncopyrightable.The non-human author argumentMonkey Selfie disputeNon-humans hold no copyrightCited by US Copyright OfficePurely AI code: uncopyrightable
Read top to bottom: the conclusion only holds as far as the first link holds in your jurisdiction.
A public library of shared code at duskTall windows pour evening light across shelves of colourful spines while dust rises through the beams and a lamp hangs gently swaying.

One rule for every jurisdiction

The copyright argument has an obvious weak spot, and Jankiewicz names it himself: copyright law differs across the globe. The UK, for instance, grants limited copyright protection to computer-generated works. The same file, generated from the same prompt, could be unowned in one country and protected in another.

That patchwork is why he does not rely on the law to settle the matter. His proposal is that developers and companies act explicitly, releasing AI-generated code under open source licences or dedicating it to the public domain with the Creative Commons Zero (CC0) licence. A declared licence travels with the code. A legal theory about authorship does not.

United States

Non-humans cannot hold copyright, a principle Jankiewicz traces to the Monkey Selfie dispute.

  • The US Copyright Office cited that precedent on AI
  • Purely AI-generated code, on this reading, has no author to own it

United Kingdom

Limited copyright protection is available for computer-generated works.

  • Machine output is not automatically ownerless
  • The US reasoning does not carry over unchanged

Where the line falls between assisted and generated

Real code is rarely all one thing. Jankiewicz concedes that it is not always 100% manual or 100% automated: a developer might accept a suggestion, rename half of it, rewrite the error handling and wire it into a design only they understand. That is a long way from asking a model for a feature and committing whatever comes back.

His target is the second case. Developers, he writes, increasingly rely on AI without even reviewing the generated output, let alone modifying it to fit their needs. Code where the human contribution amounts to writing prompts should, in his words, definitely be open source. The more a person shapes the result, the weaker his argument becomes, and he does not claim otherwise.

The spectrum of human involvementA bar runs from 100 percent manual code through mixed human and AI work to prompt-only unreviewed output, and the prompt-only end points to should be open source.Who actually wrote it?100% manual100% automatedWritten by handMix of human and AIPrompts only, unreviewedShould be open source
The claim is strongest at the right-hand end of the bar and makes no firm demand about the middle.
A single prompt on a screen at nightA laptop on a desk shows one line and a blinking cursor against a city at night, with steam rising from a mug and clouds drifting past the moon.

Limits and open questions

The argument leaves several things unsettled. It offers no threshold for how much human editing turns generated code into authored code, beyond the clear case of unreviewed, prompt-only output. It also depends on voluntary action: nothing in Jankiewicz's proposal compels a company to release anything, and the UK example shows that law in some places points the other way.

The licence-laundering charge, meanwhile, is a position people will contest on principle. Those who see model training as learning rather than copying will not accept that generated output carries a debt to its training data. Those who maintain open source projects, or answered questions on Stack Overflow expecting attribution, may find it hard to see it any other way. Jankiewicz's post drew a Hacker News discussion, which is a fair sign of how divided developers are.

Is AI-generated code copyrightable?

In the US, Jankiewicz argues no for purely AI-generated code, based on the Monkey Selfie principle that non-humans cannot hold copyright, which the US Copyright Office has cited on AI. The UK grants limited protection to computer-generated works, so the answer depends on where you are.

What licence would make AI-generated code open source?

He suggests any open source licence, or a public domain dedication using Creative Commons Zero (CC0).

Does this apply to code I wrote with AI help?

His firmest claim covers code where the human contribution is mainly prompts, with little review or modification. He acknowledges that much real code is a mix, and his argument weakens as human work increases.

This article draws on Open Source Alternatives to Reflector? and answers to it (1, 2), on the Stack Exchange network, licensed under CC BY-SA 4.0.

  • #AI-generated code
  • #CC0
  • #Open Source
  • #copyright AI code
  • #licence laundering
  • #public domain

Comments

Add a comment
Sign in with Google to join the conversation