HomeArticle

"AI-generated code must be open source!" Developers are caught in a fierce debate over this claim, and Anthropic, which has been largely trained on massive amounts of open-source code, is very likely the first to disagree.

极客邦科技InfoQ2026-11-16 18:00
All AI-generated code should be open source.

"All AI-generated code should be open source."

On November 15, open-source developer Jakub T. Jankiewicz publicly called for all AI-generated code to be made open source or directly placed in the public domain. He argued that AI models benefit from decades of accumulated code and technical knowledge in the open-source community, yet enterprises can use these models to generate closed-source software, converting collective achievements that originally belong to the community into their own commercial assets. In his view, this practice already raises suspicions of "license laundering".

This viewpoint quickly sparked widespread discussion in the community. Some agreed, arguing that AI companies have grown and thrived relying on open-source code, and now the code they generate should be given back to the community; others directly pushed back: the software I spent months designing and debugging, why should I have to make all its source code publicly available for free just because I used Claude Code?

In fact, Anthropic, which has risen to the top of the AI industry relying on its programming capabilities, also acknowledged in its prospectus that code generated using tools like Claude Code may contain or reproduce open-source software, thus triggering license obligations, and in severe cases even requiring part of the proprietary source code to be disclosed. At the same time, Anthropic's commercial terms explicitly transfer the relevant rights to model outputs it owns to its customers.

Jankiewicz's proposition precisely touches the other end of this business model: if the capabilities of AI models are partially built on the long-term accumulated achievements of the open-source community, to what extent can the code generated by enterprises using these models become their own proprietary assets?

Some open-source developers advocate returning AI-generated code to the public ecosystem, while commercial AI companies such as Anthropic need to ensure that enterprise customers can continue to use generated code for proprietary software development. The two sides have not had direct conflicts, but the clashes between code ownership, open-source licenses and commercial interests have become a publicly debated topic in the developer community.

1  Open-source code nurtures programming models, but the generated code makes money with closed sources 

Jakub T. Jankiewicz has long been involved in open-source development, is the author of the JavaScript project jQuery Terminal, and has also participated in maintaining isomorphic-git. He is very familiar with the relationship between open source and commercial software. On his blog, the first thing he questioned was the way the AI industry uses open-source code.

From the GNU Project to the modern software ecosystem, open-source developers have spent decades accumulating a large amount of code. The training corpora of large language models also contain a large amount of public software code and technical knowledge, some of which are bound by open-source licenses or Creative Commons agreements. Jankiewicz believes that AI companies use these resources to train models, and then let the models generate code that can be sold under closed-source licenses, which essentially amounts to converting collective knowledge into private commercial assets.

He even described this phenomenon as "license laundering". In his view, models provide an indirect path to utilize open-source software: after code and knowledge originally bound by licenses enter the model, they may re-emerge as new generated outputs in closed-source products.

His second reason relates to copyright. Purely AI-generated code has no human author, and according to his understanding of US copyright principles, such content should not be eligible for copyright protection. Therefore, he advocates that developers actively release AI-generated code under open-source licenses, or contribute it to the public domain via CC0.

Of course, he also admits that it is difficult to strictly distinguish between human-written and AI-generated code in current software development. Some people only ask AI to write a few lines of code, some let the model be responsible for the implementation of the entire project, and some directly accept the model's output without even carefully reading the generated code. He especially emphasized that the latter type of code, which has almost no human review and modification, deserves to be made open source.

This is obviously a fairly radical proposal. If widely adopted, the technical achievements brought by AI programming will no longer be controlled only by model providers and enterprises using the models, and the open-source community can also directly use and improve this code. However, making source code public does not mean that enterprises cannot continue to generate commercial revenue through software and services.

2  Developers push back: Why should I give away for free a product I spent months building? 

This debate touches on the vital interests of developers.

One developer said he stands on both sides of the debate: his open-source code may be used to train AI, and he himself also uses AI to develop proprietary software. For the latter, he firmly opposes mandatory open-sourcing.

In his view, AI is just a tool, somewhat similar to a compiler. Even if the model writes all the code, developers still need to decide the product direction, design the system architecture, conduct repeated tests, fix bugs, and take technical responsibility for the entire project. A project he is developing requires months of continuous iteration. If the entire project is required to be made public just because the code is output by AI, it clearly ignores the massive amount of human labor involved.

He also raised a question: if other people can also directly use Claude Code to develop similar software, how much extra value to society can mandatory disclosure of the code he personally designed and debugged actually bring?

This view is supported by some developers. Some argue that as AI-generated code becomes more common, what determines the value of software may no longer be the number of lines of code, but developers' understanding of requirements, architectural choices, and the ability to ensure reliable system operation.

Opponents point out that just because AI reduces the production cost of code, we cannot ignore the license terms of original authors. Especially when the code generated by the model is highly similar to existing open-source projects, users may use protected code without their knowledge.

Developer "blagie" shared his experience:

I am the author of multiple software systems licensed under AGPL, many of which are widely used. Early large language models (LLMs) could generate my code almost word for word. Although today's models no longer directly reproduce my code, they still draw heavily on the creative designs of these systems.

A company initially directly plagiarized my AGPL-licensed code, for example, removing my name and copyright notices when releasing the software, and failing to provide source code as required by the license. I sent them an infringement notice. After months of negotiations and disputes, they used a large language model to clone the entire system.

But this AI cloned version feels to me like:

a) Compared with my original code, it is of very poor quality, full of vulnerabilities and errors.

b) Despite that, it still essentially uses a large amount of my original content.

It's like asking a large language model to rewrite Harry Potter: the plot is almost identical, just the dialogue is terribly written.

This experience also reflects a concern of open-source maintainers: replicating a mature project usually requires direct access to and modification of the original code, but now AI can make reimplementation much easier, making it more difficult for original authors to determine whether infringement has occurred.

The debate also raises another legal dilemma: if purely AI-generated code is not eligible for copyright protection in the first place, can developers impose constraints on this code through copyright-dependent licenses such as MIT and GPL? If an enterprise chooses not to disclose the code at all, does "no copyright" necessarily mean that it should be open sourced?

Developers have not reached a consensus on these issues.

3  Anthropic's contradiction: promising output rights to customers, but worrying about its own closed-source code being disclosed 

Anthropic is not a complete bystander in the open-source space.

In November 2024, Anthropic open-sourced MCP; in December 2025, it donated it to the Agentic AI Foundation (AAIF) under the Linux Foundation. Today, MCP has become one of the important open standards for Agents to connect to external tools and data sources. The company's SDKs, development examples and some agent tools are also released under open licenses. But on the other hand, the Claude model weights are not made public, and the core Claude Code product is still under proprietary licensing.

Compared with the exchange of views among developers, the content disclosed by Anthropic in its official commercial documents is more specific.

According to Anthropic's Commercial Services Terms, to the extent permitted by applicable law, customers own the output of Claude, and Anthropic also transfers any relevant rights it may own to customers.

This arrangement is particularly important for enterprises adopting Claude Code. Enterprises can use AI-generated code for commercial projects without automatically handing over their achievements to Anthropic just because they used Claude.

At the same time, Anthropic itself has not given up control over its proprietary technology. Its public Claude Code project license reserves Anthropic's rights, and stipulates that use must comply with the company's commercial terms. The fact that the project repository is accessible on GitHub does not mean that the entire tool is licensed under a license that meets the open-source definition.

It is noteworthy that Anthropic dedicated a section in its IPO prospectus updated on November 10 to discuss the operational risks brought by open-source software.

The company acknowledges that its models, platforms and applications use some open-source software, and it also uses its own AI tools such as Claude Code to develop software. Generated code may contain or reproduce third-party open-source content, thus triggering relevant license obligations, especially copyleft clauses, without prior knowledge.

If this happens, Anthropic may need to redevelop the relevant software, bear litigation and compensation costs, and even disclose part of its proprietary source code as required by the license. The company also noted that similar concerns may lead enterprise customers to restrict the use of its products.

These concerns are emerging at a stage when Anthropic's valuation and financing scale are expanding rapidly.

According to the prospectus, Anthropic plans to issue 825 million Class A common shares at a price range of $70 to $78 per share, of which approximately 801 million shares will be issued by the company, and the remaining shares will be sold by existing shareholders. Calculated at the upper limit of the offering price range, the total size of the public offering is up to approximately $643.5 billion.

At the same time, Anthropic has also arranged a concurrent private placement of $260 billion, with participants including Google, NVIDIA, AMD, Broadcom, Micron, Microsoft and TSMC. Among them, Google and NVIDIA each plan to subscribe for approximately $100 billion worth of shares. The total size of the two transactions can reach up to approximately $904 billion, which is expected to exceed the fundraising scale of previous listings by other large technology companies.

Despite ongoing market discussions about the AI investment bubble, the relationship between infrastructure spending and commercial returns, investors still hope to get the opportunity to directly invest in a cutting-edge large model company through Anthropic. Foreign media reports say that subscription demand for the Anthropic IPO has reached approximately 6 times the number of shares available for subscription. Underwriting banks also told potential investors that existing supporters will be given priority in share allocation, which may leave some new investors with fewer shares than expected.

The relationship between NVIDIA and Anthropic has also received special attention. NVIDIA is not only an AI chip supplier, but also a strategic partner and potential major shareholder of Anthropic.

This relationship adds a practical dimension to the open-source debate: AI enterprises have higher and higher valuations, hardware suppliers provide computing power to model companies and participate in their investments, and model companies then realize commercial returns by selling intelligent services and programming capabilities to enterprises. What kind of feedback should the technical accumulation contributed by the open-source community over many years receive in this system?

4  Who exactly owns the code written by AI? 

The US Copyright Office has provided part of the legal basis for this debate.

In Part 2 of its "Copyright and Artificial Intelligence" report released in 2025, the US Copyright Office held that content purely generated by AI and lacking sufficient human creative contribution should not be eligible for copyright protection. Merely providing prompts is usually not sufficient to prove that humans have sufficient control over the expression of the final work.

However, the Copyright Office also emphasized that using AI-assisted creation does not automatically cancel copyright protection. If humans make creative choices, arrangements, modifications to the work, or provide identifiable original expressions in it, the work may still be eligible for protection. Whether it meets the criteria needs to be judged on a case-by-case basis.

This means that if a developer asks Claude Code to write tens of thousands of lines of code, they do not necessarily lose the copyright of the entire software project; similarly, enterprises cannot assume that there are no third-party rights in the code just because it comes from AI.

There is also a frequently confused issue here: no copyright protection does not mean that the source code must be disclosed to the public; using AI for programming also does not mean that the generated output necessarily inherits the open-source license of the training data. Whether open-sourcing is required still depends on the specific legal relationship, code content and license terms.

But for AI programming tools that are now entering the core business of enterprises, these boundaries have become increasingly important. Enterprises need to know whether AI-generated code can be safely incorporated into proprietary products, whether it replicates protected open-source implementations, whether it will bring additional source code disclosure obligations, and who should bear the relevant risks.

References:

https://jakub.jankiewicz.org/blog/ai-code-open-source/

https://news.ycombinator.com/item?id=50507303

https://www.anthropic.com/legal/commercial-terms

https://github.com/anthropics/claude-code/blob/main/LICENSE.md

https://www.copyright.gov/newsnet/2025/1060.html

This article is from the WeChat public account "InfoQ" (ID: infoqchina), written by Chu Xingjuan, and published with authorization from 36Kr.