Who owns the code Claude Code wrote?

Who owns the code Claude Code wrote?

Claude Code 编写的代码归谁所有?

Agentic coding tools like Claude Code, Cursor, and Codex generate code that may be uncopyrightable, owned by your employer, or contaminated by open source licenses you cannot see. Some of this is settled law, some is actively contested, and this piece is clear about which is which. If you are shipping AI-assisted code and have not thought about any of this, this piece is for you.

像 Claude Code、Cursor 和 Codex 这样的智能体编程工具所生成的代码,可能无法获得版权保护、归属于你的雇主,或者被你无法察觉的开源许可证所“污染”。其中一些属于已定论的法律,另一些则处于激烈的争议中,本文将明确区分这两者。如果你正在发布 AI 辅助编写的代码,却从未考虑过这些问题,那么这篇文章正是为你准备的。

Legal Layer Angle: In this piece I will talk about what a developer using AI coding tools needs to document to own what they build, what their employment contract probably says about AI-assisted work product, and what the practical implication is for open source contributions written with AI assistance.

法律层面视角:在本文中,我将探讨使用 AI 编程工具的开发者需要记录哪些内容才能拥有其构建成果的所有权,你的雇佣合同中关于 AI 辅助工作成果的条款通常是如何规定的,以及 AI 辅助编写的开源贡献在实际操作中意味着什么。

If you shipped code this week, some of it was probably written by an AI. The question of who legally owns that code is less settled than most developers assume, and the answer depends on three things that have nothing to do with how good the code is: whether a human made enough creative decisions to establish copyright, whether your employment contract already assigned it to your employer, and whether the model pulled from GPL-licensed training data and quietly contaminated your codebase.

如果你本周发布了代码,其中一部分很可能是由 AI 编写的。关于这些代码在法律上归谁所有的问题,其定论远比大多数开发者想象的要模糊。答案取决于三件事,而这三件事与代码质量毫无关系:人类是否做出了足够的创造性决策以确立版权;你的雇佣合同是否已将其归属权分配给雇主;以及模型是否从 GPL 许可的训练数据中提取内容,并悄悄地污染了你的代码库。

On March 31, 2026, Anthropic accidentally published 512,000 lines of Claude Code’s source code in a routine software update through a missing configuration file. Before sunrise, the codebase was mirrored across GitHub. Before breakfast, a developer had used an AI tool to rewrite the entire thing in Python, and the “claw-code” repository hit 100,000 GitHub stars in a single day, the fastest in history. Then came the DMCA takedowns, and then came the question nobody had a clean answer to: If Claude Code was, by Anthropic’s own lead engineer’s admission, predominantly written by Claude itself, does Anthropic even own it? Can you issue a DMCA takedown for code that copyright law may not protect?

2026 年 3 月 31 日,Anthropic 在一次常规软件更新中,因缺少配置文件而意外泄露了 512,000 行 Claude Code 的源代码。天亮之前,该代码库已被镜像到 GitHub 各处。早餐前,一名开发者利用 AI 工具将整个代码库用 Python 重写,名为“claw-code”的仓库在一天内获得了 10 万个 GitHub Star,创下了历史最快纪录。随后,DMCA(数字千年版权法)下架通知接踵而至,紧接着出现了一个无人能给出明确答案的问题:如果正如 Anthropic 首席工程师所承认的那样,Claude Code 主要由 Claude 本身编写,那么 Anthropic 真的拥有它吗?对于版权法可能不予保护的代码,你还能发出 DMCA 下架通知吗?

That incident compressed every open question about AI-generated code ownership into a single news cycle. The same questions apply to your codebase.

这一事件将所有关于 AI 生成代码所有权的悬而未决的问题压缩到了一个新闻周期内。同样的问题也适用于你的代码库。

The copyright rule nobody told you: Here is the legal baseline, in plain terms: copyright only protects work created by a human. The US Copyright Office has confirmed this consistently, and the DC Circuit upheld it in the Thaler case. When the Supreme Court declined to hear the Thaler appeal in March 2026, it did not endorse the lower court’s reasoning or settle the question nationally. Cert denial means the Court chose not to hear the case, nothing more. What it does mean is that the DC Circuit’s ruling stands, the Copyright Office’s position is intact, and no court has yet gone the other way. Works predominantly generated by AI without meaningful human authorship are not eligible for copyright protection under current doctrine, and that position is stable even if it is not finally settled.

没人告诉你的版权规则:简单来说,法律底线是:版权仅保护由人类创作的作品。美国版权局一贯坚持这一立场,哥伦比亚特区巡回法院在 Thaler 案中也予以了支持。当最高法院在 2026 年 3 月拒绝审理 Thaler 上诉案时,它并未背书下级法院的推理,也没有在全国范围内解决这一问题。拒绝调卷令仅意味着法院选择不审理此案,仅此而已。但它确实意味着哥伦比亚特区巡回法院的裁决依然有效,版权局的立场保持不变,且目前还没有法院做出相反的判决。根据现行学说,主要由 AI 生成且缺乏实质性人类创作的作品,不符合版权保护的资格,即使这一问题尚未最终定论,该立场目前也是稳固的。

Two important limits on what Thaler actually decided. The case involved a painting created with zero human involvement at all. Thaler listed the AI system as sole author and made no claim of any human creative contribution. The ruling does not directly address the harder question of AI-assisted work where a human was involved but the degree of that involvement is disputed.

关于 Thaler 案实际裁决的两个重要限制:该案涉及一幅完全没有人类参与创作的画作。Thaler 将 AI 系统列为唯一作者,并未声称有任何人类的创造性贡献。该裁决并未直接解决更棘手的问题,即在有人类参与但参与程度存在争议的 AI 辅助作品中,版权该如何界定。

Thaler involved visual art. No court has yet applied the human authorship doctrine specifically to code output from an AI coding tool. The logic applies, but the direct precedent does not exist yet.

Thaler 案涉及的是视觉艺术。目前还没有法院将“人类创作学说”专门应用于 AI 编程工具生成的代码输出。逻辑上是适用的,但直接的先例尚不存在。

What it means for you: Code that Claude Code or Cursor generated and you accepted without meaningful modification may not be copyrightable by anyone. If a competitor copies it, you may have no legal recourse, because the code sits in the public domain in everything but name.

这对你意味着什么:由 Claude Code 或 Cursor 生成且你未经实质性修改就直接采纳的代码,可能不受任何人的版权保护。如果竞争对手复制了它,你可能无法采取法律手段,因为这些代码在实质上已经处于公共领域。

The phrase that determines whether your code is protected is “meaningful human authorship,” and the Copyright Office has deliberately refused to quantify it with a percentage or a number of edits, because what courts look for is evidence that a human made genuine creative decisions: choosing the architecture, deciding what to reject, restructuring the output to fit a specific design. Specifying an objective to the model is not enough. Directing how the work is constructed is what counts.

决定你的代码是否受保护的关键短语是“实质性人类创作”(meaningful human authorship)。版权局特意拒绝用百分比或修改次数来量化这一概念,因为法院寻找的是人类做出真正创造性决策的证据:选择架构、决定拒绝什么、为适应特定设计而重构输出。仅向模型指定目标是不够的,指导作品如何构建才是关键。

In an agentic workflow, this distinction is harder to establish than it sounds. Consider a typical Claude Code session: You write a one-line prompt: “build a rate limiting module for the API”. Claude Code plans the approach, generates five files, and iterates through three versions. You review the output, run the tests, and merge. Your contribution in that sequence is your architectural intent and your final approval. Whether that constitutes meaningful human authorship in a courtroom is an unresolved question with no definitive court ruling yet. The honest answer is: probably yes for modules you substantially redirected, probably no for code you accepted verbatim, and unclear for everything in between.

在智能体工作流中,这种区分比听起来更难确立。考虑一个典型的 Claude Code 会话:你写了一个单行提示词:“为 API 构建一个限流模块”。Claude Code 规划方案、生成五个文件,并迭代了三个版本。你审查输出、运行测试并合并。在这一过程中,你的贡献在于你的架构意图和最终审批。这在法庭上是否构成“实质性人类创作”是一个悬而未决的问题,目前尚无定论。诚实的回答是:对于你进行了实质性重定向的模块,答案可能是肯定的;对于你原封不动采纳的代码,答案可能是否定的;而对于介于两者之间的一切,目前尚不明确。

The middle ground is actively being litigated right now. In Allen v. Perlmutter, artist Jason Allen is challenging the Copyright Office’s denial of registration for a work he created using more than 600 detailed prompts and subsequent editing in Photoshop. The Copyright Office acknowledged the Photoshop edits as human-authored but still denied registration for the AI-generated underlying elements. That case has not been decided yet, and whatever it decides will be the closest thing to a ruling on how much human involvement is enough.

中间地带目前正处于激烈的诉讼中。在 Allen v. Perlmutter 一案中,艺术家 Jason Allen 正在挑战版权局拒绝为其作品注册版权的决定,该作品是他通过 600 多个详细提示词并结合 Photoshop 后期编辑创作的。版权局承认 Photoshop 的编辑部分属于人类创作,但仍拒绝为 AI 生成的基础元素注册版权。该案尚未判决,无论结果如何,它都将成为关于“人类参与度达到多少才足够”这一问题最接近定论的裁决。

The closest existing precedent on partial protection is Zarya of the Dawn, a graphic novel where the Copyright Office granted registration for the human-authored text but denied it for the Midjourney-generated images. That decision establishes a practical principle developers can use right now: the human-authored elements of an AI-assisted codebase may be separately protectable even if the generated code itself is not. Your architecture documents, your design decisions…

关于部分保护最接近的现有先例是《黎明的扎里亚》(Zarya of the Dawn),这是一部图形小说,版权局批准了人类创作文本的注册,但拒绝了 Midjourney 生成图像的注册。该决定确立了一个开发者现在就可以使用的实用原则:即使 AI 辅助代码库中生成的代码本身不受保护,其中人类创作的元素也可能被单独保护。你的架构文档、你的设计决策……