Who owns the code Claude wrote?

TL; DR

Agentic coding tools such as Claude Code enable humans to direct agents in multi-step planning and execution on complex coding tasks. Copyright generally does not protect purely AI-generated material. Copyright can protect original human-created expression within a work even if the work also includes some AI-generated material. The key is documenting creative human contributions throughout the software development lifecycle.

If you are using Claude Code, Codex, Cursor, etc. and you do not know whether the code you are shipping is copyrightable, whether you own it, or whether your employer owns it, this one is for you.
 
Thanks, good stuff. "who owns code" has always been fun; you develop specific IP that can be patented for a work problem but you did it outside of work on your own resources. Who gets the patent, you or the company?

Toss in AI that you may collaborate with outside of work on a work problem.
 
Who gets the patent, you or the company?
It depends. At least in the Netherlands. If you were tasked with writing the code, then it doesn't matter if you wrote that code in your spare time or not, it's still owned by the company.
 
  • Like
Reactions: mer
It depends. At least in the Netherlands. If you were tasked with writing the code, then it doesn't matter if you wrote that code in your spare time or not, it's still owned by the company.
That's generally the normal thing for permie/contract work in the UK too, although some contracts allow you to escape the 'they own what you dreamed up in the shower' thing; if for example you're on a retainer with royalties contract (not very common nowadays) as opposed to a normal paid-hourly contract.
 
It depends. At least in the Netherlands. If you were tasked with writing the code, then it doesn't matter if you wrote that code in your spare time or not, it's still owned by the company.
Same in Germany.
While you are employed any creation (invention, anything can be patented, copyrighted or otherwise protected) you make, the employer owns it and has the privilege: she decides if she uses it for herself, sell it, allow you to use it, and also can prohibit its usage at all, neither by you, herself or anybody.
Doesn't matter if the creative process for the idea was made while work or in your spare time.
 
Same in Germany.
While you are employed any creation (invention, anything can be patented, copyrighted or otherwise protected) you make, the employer owns it and has the privilege: she decides if she uses it for herself, sell it, allow you to use it, and also can prohibit its usage at all, neither by you, herself or anybody.
Doesn't matter if the creative process for the idea was made while work or in your spare time.
I wonder how that might apply to how I write notes (like FreeBSD 15.0 Xfce); I CC0 public domain it, but likely wouldn't vet every minor change to an employer/3rd-party (sounds like me hosting that might be conflict of interest to potential employers, but I wonder if that's more likely a Fortune 500/big-company thing?)
 
It is very common (at least here in Norway) for software developers that contribute to open source projects in their spare time to have an agreement about that - any work done outside of work and unrelated to work (in other words: not a competing project) is not included in the "employer owns code" part.
 
Another aspect of the original post that's very relevant for the *BSDs is that an LLM trained on GPL and other copyleft code can end up reproducing that code - even if not verbatim, close enough to be legally problematic.

OpenBSD's justification of not accepting AI code is, as far as I understand it (but IANAL), somewhat inaccurate from a legal PoV. For those who haven't seen it, read https://marc.info/?l=openbsd-tech&m=177425035627562

A lot of amateur commentary complains about code being "stolen" by AIs and Theo quite correctly says that's a misconception from the legal perspective. But when he says "Noone can put a Copyright onto that output, because under the current laws that requires a human to have created the output" (which is the reason he bans AI-generated code in OpenBSD) I think he makes a mistake himself. Human creative input can make the difference here, just like it can with other tools. Which is why good practice in AI use includes keeping a transcript of prompts. For comparison: you don't have to produce a portrait by painting it with your own hand to obtain copyright. Taking a portrait photo is also copyrightable even though it's a machine (the camera) which "creates" the image. Yet using a camera or image scanner to make a faithful copy of some 2D public domain artwork is not eligible for copyright protection, despite the technical skill and effort involved in doing so. The point is not the involvement of the machine, but the lack of originality and creative input.

Funnily enough, the thing Theo says is "not the real problem" is the regurgitation. But if the regurgitated code has a contaminated licence then that is a real problem, particularly for *BSDs. Part of the review process for the suitability of new code for inclusion is going to have to be checking whether it has substantial similarities to any impermissibly licensed code that could have been used as training data. (And I think it would be wise to treat all code contributions as potentially AI-assisted even if contributors are willing to sign off claiming otherwise - the tooling is becoming so widespread that I think blanket anti-AI rules are simply going to be ignored by at least some contributors, and projects shouldn't rely on self-declarations to the contrary.)
 
Back
Top