AI code copyright dispute: Who owns the copyright after Claude Code wrote 510,000 lines of code?
Anthropic's Claude Code leaked 510,000 lines of self-generated code due to a configuration error, triggering an in-depth discussion about the copyright ownership of AI-generated code. This article summarizes the latest position of the U.S. Copyright Office, the outcome of the Supreme Court’s Thaler case, and the actual legal risks of using AI programming tools.
Core conclusion
On March 31, 2026, Anthropic accidentally leaked approximately 510,000 lines of Claude Code source code during a routine update due to a configuration error. Developers soon discovered that this batch of code - including a version where the entire repository was cloned and rewritten in Python - was actually written primarily by Claude Code himself. When the DMCA takedown notice was issued, a question with no clear legal answer surfaced: **If the code is mainly generated by AI, who owns the copyright? **
Key Points
- Time of incident: March 31, 2026 -Affected objects: independent developers and enterprise teams using AI programming tools such as Claude Code, Cursor, Codex, etc.
- Core changes: The U.S. Copyright Office and the DC Circuit Court confirm that AI-generated content cannot be protected by copyright, but AI-assisted creation is in a gray area
- HN Popularity: 407 points, 381 comments, ranked 6th on the day
Incident: 510,000 lines of code leaked
On March 31, Anthropic released approximately 510,000 lines of Claude Code source code along with daily updates due to a missing configuration file. Before sunrise, the entire codebase was mirrored to multiple GitHub repositories. Before breakfast, a developer used AI tools to rewrite all the code in Python. The "claw-code" repository exceeded 100,000 GitHub stars in one day, becoming the fastest repository to reach this milestone in history.
What followed was a DMCA takedown notice - and then everyone started asking a question with no clear answer: **If Claude Code (according to Anthropic's chief engineer himself) was mainly written by Claude himself, does Anthropic really own the copyright to it? **
Three core legal rules
AI code copyright ownership depends on three factors, regardless of code quality:
| Dimensions | Rules | Impact on developers |
|---|---|---|
| Human creativity | Copyright only protects the results of human creation | Code independently generated by AI may not be protected by copyright |
| Employment contracts | Employers may automatically own AI-assisted output used by employees | Your employment contract may have transferred ownership of AI code |
| Training data contamination | Models may learn from GPL-licensed data | AI-generated code may unknowingly violate open source licenses |
Rule 1: Copyright only protects humans
The U.S. Copyright Office confirmed this position in January 2025, and the DC Circuit upheld the decision in Thaler . In March 2026, the Supreme Court refused to hear Thaler's appeal. Although rejection does not equate to formal recognition by the Supreme Court, the reality is: the DC Circuit Court’s ruling remains valid, the Copyright Office’s position has not been overturned, and no court has made a contrary decision to date.
Two important limitations:
- Extreme Facts of the Thaler Case: The case involved AI painting with zero human involvement. Thaler lists AI as the sole author and claims no human creative contribution at all. The ruling does not directly address the more difficult issue of "controversial levels of human involvement" in AI-assisted creation.
- Rejection of acceptance does not equal legal certification: The Supreme Court's refusal to accept the case may be due to procedural reasons, and the case is not final nationwide.
Rule Two: Your Employment Contract May Already Address the Problem
For developers working for technology companies, this issue may already be covered by invention transfer clauses in employment contracts. Three contract clauses to check:
- Whether the invention transfer clause includes "AI-assisted" creation
- Whether intellectual property ownership clearly covers AI-generated works
- Applicability of non-compete restrictions in the context of AI
Some big tech companies have updated their policies: Microsoft in September 2024 explicitly allowed employees to use Copilot, with the resulting code owned by the company. But many small and medium-sized enterprises and startups have yet to update relevant policies.
Rule 3: Open source license pollution is the most hidden risk
AI model training data may contain open source code with contagious terms such as GPL and AGPL. Even if the function names and variable names are changed, the implementation logic of the core algorithm may still be subject to the original license.
In 2025, a developer discovered that Claude Code output almost exactly the same function implementation logic as a GPL project. Although the surface code is different, the core algorithm is highly consistent with the GPL code. If you cannot prove that the code was independently authored, you may face license compliance risks.
Reactions from all parties
This has been discussed in depth in the HN community. User semiquaver pointed out that the original article's description of the Thaler case contained legal inaccuracies—the Supreme Court's rejection of the case does not mean the verdict is finalized at the national level. Another user, PaulDavisThe1st, noted that the original article had actually revised this statement.
The discussion also extended to a broader question: If AI-generated code cannot be copyrighted, is the output of an AI model trained using the GPL subject to the GPL? This is the core contradiction that the open source community and the AI industry must face in 2026.
Practical Advice: Self-Protection in the Age of AI Programming
- Carefully review the critical algorithm paths in the AI-generated code to confirm that there is no GPL contamination
- Check the intellectual property provisions in your employment contract before using AI programming tools
- Keep detailed usage records: which codes were written by you and which ones were modified by you after AI generated them
- For independent works, document your "creative modifications" - this is key to claiming copyright eligibility
- Open source projects should pay special attention to license consistency
Related extended information
Tool entry
The following terms naturally appear in the text, and the platform side will match the maintained tools library: Claude Code, Claude, ChatGPT, OpenAI, Cursor, Copilot, Gemini, LangGraph, Hermes Agent
Internal link guidance
- Want to build your own automated workflow? Watch: Claude Code automated writing practice: build an AI content production pipeline in 30 minutes
- Real case: Claude Code 48 hours to start a business: one person + US$29 monthly fee, monthly income in 3 months $9,000
- Want to learn more about AI-assisted programming tools? Watch: AI Agent Tools 2026 Complete Tutorial: 5 Tools to Build an Automated Pipeline in 30 Minutes
Topic hub
AI Coding Tools Hub (2026)
From Copilot pricing changes to Claude Code + DeepSeek cost-saving setups—one place to compare tools, read explainers, and follow tutorials.
Explore AI Coding Tools Hub (2026) →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services