← Back to blog

AI Wrote 200 Lines — But Who Legally Owns Them?

AI-generated code: copyright chaos? Learn who legally owns it, liability implications, and what boards need to know now.

AI Wrote 200 Lines — But Who Legally Owns Them?

Imagine your AI assistant just produced 200 lines of working code. It compiles, it passes tests, and it shipped to production last night. Here is the uncomfortable question most teams never ask: do you actually own those 200 lines? With the best tools for vibe coding now writing a large share of the code in modern projects, "who owns this?" and "who is liable when it breaks?" have moved from legal footnotes to board-level questions.

The short answer is messier than most founders expect. Ownership, copyright, and liability are three separate problems, and AI-generated code lands differently on each. Let's untangle them the way we would explain it to a CEO over coffee — plainly, with the actual rules, and with the trade-offs that matter for your budget and timeline.

Start with the foundation everything else sits on: in the United States, copyright protects works of human authorship. That is not our opinion — it is the position of the U.S. Copyright Office, reaffirmed in its 2023 guidance and its 2025 report on copyrightability of AI output. Material generated purely by a machine, without meaningful human creative control, is not eligible for copyright protection.

Read that again, because it is counterintuitive. If an AI tool writes a function from a one-line prompt and you paste it in unchanged, that specific block of code may fall into a gray zone where no one holds a copyright on it. You didn't create it in the legal sense, and the machine can't hold rights. The U.S. Copyright Office guidance on works containing AI-generated material is the primary document to bookmark here.

Put simply: "you can't be sued for copying it" and "you own it and can stop others from copying it" are two very different guarantees. AI-generated code often gives you the first without the second.

Why does this matter for business? Three concrete stakes:

  • Defensibility. If a competitor lifts your product's uncopyrightable AI-generated modules, your ability to send a cease-and-desist weakens.
  • Due diligence. Acquirers and investors increasingly ask what percentage of your codebase is AI-generated and whether you can warrant clean ownership. A vague answer lowers your valuation or stalls a deal.
  • Open-source contamination. Some AI models were trained on code under restrictive licenses. If a tool reproduces a chunk of GPL-licensed code verbatim, you may unknowingly inherit copyleft obligations.

Human Authorship Is a Spectrum, Not a Switch

The good news: pure machine output is rare in practice. Real development looks more like a conversation — you prompt, review, reject, refactor, combine, and rewrite. The more meaningful human judgment you apply, the stronger your claim to authorship over the final work.

Think of it like editing a rough draft written by an intern. If you rewrite half the sentences, restructure the argument, and make the creative calls, the finished piece reflects your authorship even though the intern typed the first version. Courts and the Copyright Office look at the same thing: who made the creative decisions?

This is exactly why the best AI for vibe coding still fails at design — the human still supplies the architecture, the taste, and the hard trade-offs. That gap is annoying when you want speed, but legally it is what keeps your authorship claim alive.

Here is what we recommend for keeping ownership defensible:

  1. Never ship raw, unreviewed AI output as-is. Review, edit, and integrate. This is good engineering hygiene anyway, and it strengthens your authorship.
  2. Keep the human in the architecture. System design, data models, and business logic decisions should be human-made and documented.
  3. Log your process. Commit history, PR reviews, and design docs are evidence of human creative control if ownership is ever challenged.

Who Owns It Between the Vendor and You?

Copyright law is only half the picture. The other half is contract law — specifically, your AI vendor's terms of service. This part is more favorable than the copyright question, and it is where the real numbers live.

Major coding-assistant vendors have deliberately structured their terms so that you own the output, not them. As a snapshot of the current market:

  • GitHub Copilot and OpenAI both state in their terms that the customer owns the output generated for them.
  • Anthropic's commercial terms similarly assign output rights to the customer.
  • Several vendors now offer IP indemnification for paid business tiers — a contractual promise to defend you if a third party claims the generated code infringes their copyright.

Real numbers: the difference between a free consumer tier and a paid business tier is often the difference between "no indemnity, data may be used for training" and "IP indemnity included, your code excluded from training." That single line item in a subscription is not a nicety — it is risk transfer, and it is cheap relative to the legal exposure it covers.

Honest take: the vendor terms give you a contractual claim to the output, but a contract between you and the vendor cannot manufacture a copyright that human-authorship law says doesn't exist. The vendor can promise "we won't claim it and we'll defend you" — they cannot promise "this is a fully copyrightable original work." Both layers matter, and they solve different problems.

For anyone evaluating tooling on cost, we've written before about why the best LLM for coding is cheaper than it should be — but when you compare tiers, weigh the indemnification and training-data clauses, not just the per-seat price. The cheapest tier can be the most expensive mistake.

Liability: The Question That Actually Keeps CFOs Awake

Ownership asks "who holds the rights?" Liability asks "who pays when the code causes harm?" These are not the same, and the answer to the second one is blunt: you do.

If AI-generated code introduces a security vulnerability, leaks customer data, or ships a bug that costs a client money, the responsibility sits with the business that shipped the product — not the AI vendor. Vendor terms almost universally disclaim liability for how you use the output. The AI is a tool, and using a tool doesn't transfer accountability, any more than a word processor is liable for a defamatory letter.

This has a direct, measurable engineering cost. Research from the security community has repeatedly shown that a meaningful percentage of AI-generated code contains vulnerabilities when accepted without review. Stanford researchers found that developers with access to an AI assistant tended to write less secure code while feeling more confident it was secure — a dangerous combination. The Stanford study on AI assistants and insecure code is worth reading in full before you set your review policy.

What this means for your project: the productivity gain from AI is real, but it moves cost, it doesn't erase it. Time saved writing is partly repaid in time spent reviewing. Teams that skip the review step aren't faster — they're borrowing against a future incident.

Here is what we recommend to keep liability manageable:

  • Treat AI output like a junior developer's pull request: it gets reviewed by a human before merge, every time.
  • Run automated security scanning (SAST tools, dependency checks, license scanners) on AI-generated code specifically. License scanners catch the open-source-contamination risk from earlier.
  • Set an internal policy on what AI may and may not touch. Authentication, payment flows, and PII handling deserve stricter human oversight than a marketing landing page.

The Same Questions Now Apply Beyond Code

Code is the sharpest example, but the ownership-and-liability puzzle is spreading everywhere AI generates work product. The rise of Meta AI agents for advertising automation in 2026 — and comparable agentic tools from other platforms — raises identical questions about who owns AI-generated ad copy, targeting logic, and campaign creative, and who is liable when an automated agent makes a costly bid or a non-compliant claim.

The pattern repeats: a machine produces the artifact, a human deploys it, and the accountability flows to the human's organization. We explored the marketing side of this shift in AI agents for marketing: what's next in 2026, and the operational reality that AI agents are becoming your new blog readers. Whether the output is a function or a Facebook campaign, the governance principles are the same — review, document, and keep a human accountable for the decision.

A Practical Ownership Checklist

For teams shipping AI-assisted work today, here is the honest, no-lawyer-required starting point. This is general guidance, not legal advice — a real contract or acquisition warrants a real attorney.

  • Use paid business tiers of coding tools that grant you output ownership and, ideally, IP indemnification.
  • Confirm training opt-out. Make sure your proprietary code isn't feeding the vendor's next model.
  • Keep humans in the creative loop so your authorship claim survives scrutiny — this is the single biggest lever on copyrightability.
  • Review everything before merge. It protects you on liability and strengthens your ownership at the same time.
  • Track AI usage at a level that lets you answer an acquirer's due-diligence question honestly.
  • Scan for licenses and vulnerabilities as a standing part of your pipeline, not a one-time audit.

Key Takeaways for Business

Key takeaway for business: AI code ownership is three questions wearing one coat. Copyright (can you stop others from copying it?) depends on human authorship. Contractual ownership (does the vendor claim it?) depends on your tier and terms. Liability (who pays when it breaks?) is almost always you. Solving one does not solve the others.

Put simply: the AI is a power tool, and you are still the one holding it. The speed is real, the savings are real, but so is the accountability — and it does not transfer to the vendor no matter how good the tool is.

Here is what we recommend as the one-line policy: pay for the business tier, keep a human in every creative and review decision, and treat every line of generated code as your responsibility from the moment it enters your repository. Do that, and AI becomes a genuine accelerator instead of a liability you didn't know you signed up for.

This article is based on publicly available sources and may contain inaccuracies.

Related articles

✦SqueezeAI
  1. Under U.S. copyright law, purely AI-generated code with no meaningful human creative input may belong to no one — neither the user nor the AI vendor — leaving it unprotectable against copying by competitors.
  2. "You can use it freely" and "you own it exclusively" are legally distinct: AI-generated code often grants the first without the second, which matters for M&A due diligence and competitive defense.
  3. The degree of human authorship is a continuum: the more a developer reviews, restructures, and makes substantive creative decisions over AI output, the stronger the copyright claim on the resulting work.

Powered by B1KEY