Anthropic asked a federal court Monday to rule that training its AI on copyrighted songs was lawful — invoking the legal doctrine of fair use, which allows limited reuse of someone else's creative work without permission if the result is sufficiently different from the original. Three weeks earlier, the same company had filed copyright takedowns to stop developers from using code its own AI helped write.
That is the contradiction at the center of two lawsuits Anthropic is now fighting simultaneously. On Monday, Anthropic asked a California federal court to rule that ingesting song lyrics to train its chatbot Claude constituted fair use, Reuters reported. The day before that brief landed, a clean-room rewrite of its accidentally leaked Claude Code tool — rebuilt in a different programming language by developers who never touched the original — crossed 30,000 GitHub stars, making it the fastest-growing repository in the platform's history, Yahoo Tech and Decrypt reported.
That rebuild — what copyright law calls a clean-room rewrite, meaning a recreation of a program's functionality in a different programming language — is the part Anthropic cannot touch. Anthropic's takedown notices, which swept up roughly 8,100 GitHub repositories containing leaked Claude Code source code, could not reach it. "This is either brilliant or scary," wrote Gergely Orosz, founder of The Pragmatic Engineer newsletter. "Anthropic accidentally leaked the TS source code of Claude Code. Repos sharing the source are taken down with DMCA. BUT this repo rewrote the code using Python, and so it violates no copyright and cannot be taken down."
The original leak was accidental: Claude Code version 2.1.88 shipped with a 59.8MB JavaScript source map exposing 512,000 lines of code across 1,900 files, according to Yahoo Tech and Decrypt. Anthropic filed DMCA takedowns against the entire network of 8,100 repositories three weeks before the fair use brief, according to the filing archived on GitHub's DMCA repository. The notices caught forks and mirrors that had simply referenced the code — including legitimate repositories that had nothing to do with the leak. An Anthropic spokesperson later said the overzealous takedowns were the result of a communication mistake, Ars Technica reported.
The music publishers suing Anthropic are not persuaded by the clean-room workaround. Concord, UMG, and ABKCO are seeking $3 billion in damages over roughly 20,000 songs, calling Anthropic's training a "flagrant" use of their work. They have another argument too: Anthropic's AI competes with and dilutes the market for their songs — the opposite of transformative. That counterargument is in the record; it has not gotten the same coverage as Anthropic's fair use filing.
Anthropic has already paid $1.5 billion to settle a separate copyright case with a group of authors — the largest copyright settlement in U.S. history, Reuters noted. The publishers' case remains unresolved. The question neither court has answered is what, exactly, Anthropic owns — and whether the answer changes if significant portions of Claude Code were written by Claude itself, as CEO Dario Amodei has implied. The DC Circuit upheld denial of copyright for AI-generated work in March 2025.
What is not in dispute is the asymmetry. Pharma negotiates drug data upfront. Finance licenses the datasets it trades on. AI shipped first and sorted out the legal questions later — or in Anthropic's case, after courts forced the question. The clean-room rewrite is still gaining stars on GitHub.