Answers · code licenses
Who owns code written by an AI coding agent?
Short answer: Usually you do, as far as the AI vendor is concerned, but the copyright you hold may be thinner than for code you wrote yourself. Vendor contracts decide the vendor's side: Anthropic's commercial terms, for example, say the customer owns its Outputs and Anthropic assigns to the customer whatever rights it has in them. Copyright law decides what there is to own: in the US, works need a human author. The D.C. Circuit held in Thaler v. Perlmutter (March 18, 2025) that a copyrightable work must be authored in the first instance by a human, and the Supreme Court declined to hear the case on March 2, 2026. The Copyright Office's January 2025 report says prompts alone don't give enough control to make you the author, while using AI as an assistive tool, or putting AI output into a larger human-authored work, doesn't stop the human parts from being protected. So the parts you designed, wrote, selected, arranged or meaningfully edited are yours; long stretches the agent produced from a prompt may not be protected by anyone's copyright. Separately, agent-written code can carry other people's licenses, through copied snippets or the packages the agent adds.
Checklist
- Read your AI tool's terms for the plan you actually use (consumer, team, enterprise or API terms differ) and note who owns outputs, whether the vendor assigns its rights to you, and whether it offers an IP indemnity and on what conditions.
- Keep the human work visible: commit in reviewable steps, write design notes, and edit, restructure and test what the agent produces. Human selection, arrangement and modification is what copyright can attach to.
- Don't rely on prompts as proof of authorship. The Copyright Office's 2025 report says prompts alone don't provide sufficient control.
- If you register copyright in software that includes substantial AI-generated material, disclose it and claim only the human-authored parts, as the Copyright Office's registration guidance requires.
- Treat what the agent adds as third-party code until checked: run a license scan on new dependencies, and review long verbatim-looking blocks (license headers, distinctive comments) for copied open-source code.
- If you ship to clients, check your contract: many development agreements promise the client ownership of, or a warranty over, all deliverables. Say how AI tools are used and what you can actually assign.
- Employees and contractors: work-for-hire and IP assignment clauses still cover the human contributions; make sure they also mention AI-assisted work and approved tools.
What 'owns' means here
- Two different questions get mixed up. Contract: does the AI vendor claim any rights in the output? Most commercial terms say no and assign their interest, if any, to you. Copyright: is there a protected work at all, and who is its author? Only humans qualify in the US, so purely machine-generated material may be in no one's copyright.
- Code without copyright protection can still be kept confidential as a trade secret, and still be licensed to others by contract; you just can't stop someone who independently gets the same code from using it.
Other countries
- Rules differ. The UK's Copyright, Designs and Patents Act has a section on computer-generated works with no human author, and other countries treat AI output differently. If you sell abroad, check the law where enforcement would happen.
License checks (computed)
Yes means the license grants the use, on the duties listed. Duties such as source_disclosure, share_alike and network_source_offer are the ones that conflict with keeping a product closed-source.
| Use | Answer | Why |
|---|---|---|
| Shipping MIT code an agent copied into a closed-source app (MIT) | Yes | Every use you described is granted by MIT, and nothing you described is prohibited. Duties: attribution, license_notice. |
| Shipping GPL-3.0 code an agent copied into a closed-source app (GPL-3.0-only) | Yes | Every use you described is granted by GPL 3.0, and nothing you described is prohibited. Duties: attribution, license_notice, state_changes, share_alike, source_disclosure. |
Ask Rightshold (free, no key)
Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Our coding agent added packages and pasted some snippets. Can we ship this closed-source?”
{
"tool": "check_rights_batch",
"arguments": {
"intended_use": {
"commercial_use": true,
"modification": true,
"redistribution": true
},
"items": [
{
"ref": "snippet from an MIT repo",
"license": "MIT"
},
{
"ref": "snippet from a GPL-3.0 repo",
"license": "GPL-3.0-only"
}
]
}
}- Free. check_rights_batch checks up to 100 packages, snippets and assets in one call and lists the duties for each.
- license_compatibility checks whether two licenses can be combined in one work.
- Rightshold doesn't decide authorship or ownership of AI output; that depends on your contracts and local law.
Rightshold checks the license you name against the use you describe. It doesn't detect AI-written or copied code or decide who owns it. Not legal advice.
Sources
- Anthropic Commercial Terms of Service (Outputs)
- U.S. Copyright Office: Copyright and Artificial Intelligence, Part 2: Copyrightability (January 2025)
- Supreme Court docket 25-449, Thaler v. Perlmutter (cert. denied March 2, 2026)
- U.S. Copyright Office: AI registration guidance
Related
- Can I use MIT, GPL or AGPL code in a closed-source SaaS?
- How to check licenses of all npm dependencies before shipping
- What happens to software licenses in an acquisition
Not legal advice. Updated 2026-10-29. JSON · Markdown · All answers
Get a free API key in one call
No card and no email needed. 100 free credits; the license and policy checks stay free without a key.
curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_... # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
-H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'
