KIKOMONO

AI TOOLS / BEFORE YOU SHIP

Check AI-generated code licence before you ship it

AI Toolbox

The code an AI assistant writes for you is yours to ship — OpenAI’s terms assign the output to you, and Cursor’s terms do the same. But “yours” does not mean “only yours”: the same suggestion can reach another developer, a small share of suggestions match public code, and the legal backstop against a copyright claim covers unmodified suggestions on paid plans only. Run the five-minute check below before the code goes into a product.

Check AI-generated code licence before you ship it: You own the output; Same code, two users; Under 1% match public code; Indemnity is narrow

The short answer

Three facts decide whether generated code is safe to ship, and they answer three different questions. Ownership says the code is yours to use: both OpenAI and Cursor assign the output to you in their terms. Uniqueness says it may not be only yours: both warn that another user can receive the same or similar output. Indemnity says who pays if someone claims the code copies theirs: only some paid plans offer it, and only for suggestions you ship unmodified. A licence check is not a verdict on any single tool — it is a five-minute routine you run on the tool and plan you actually use, on the day you ship. This guide is a checking method, not legal advice.

1. Who owns the generated code — checked 2026-11-16

OpenAI’s Terms of Use, effective 1 January 2026, state it directly: “you own the Output. We hereby assign to you all our right, title, and interest, if any, in and to Output.” That covers code you generate with ChatGPT or Codex on an individual plan. OpenAI Terms of Use.

Cursor’s Terms of Service say the same in different words: “You retain all of your right, title, and interest that you have in Inputs, and Anysphere hereby assigns to you all of our right, title, and interest if any in and to any Suggestions.” Cursor calls generated code “Suggestions”, and its forum summary of the same terms is blunter: you own all code generated through Cursor. Cursor Terms of Service.

For GitHub Copilot, first find which document governs your plan, because there are two. GitHub’s own terms page says Copilot Business and Enterprise users who buy direct from GitHub are governed by the GitHub Generative AI Services Terms, while all other Copilot users are governed by Section J (AI Features) of the GitHub Terms of Service. Do not quote the Business terms at a Free-plan problem, or the other way round. GitHub Terms for Additional Products and Features.

One more split to watch: the tool is not always the model. Cursor routes your request to a model from Anthropic, OpenAI, Google or another provider, and that provider’s terms also apply to the output. If you bring your own API key, you are in a direct relationship with the model provider as well. Check the terms of the tool you pay and the model that generates — the ownership sentence you need may live in either one.

2. The same suggestion can reach two people

Ownership is not exclusivity, and both sets of terms say so in plain language. OpenAI’s terms warn that “output may not be unique and other users may receive similar output”, and that its assignment to you “does not extend to other users’ output or any Third Party Output”. Cursor’s terms say Suggestions “may be similar to or the same as Suggestions provided to other customers, and no rights to any Suggestions generated, provided, or returned by the Service for or to other customers are granted to you”.

The practical consequence is simple: two developers can ship near-identical code and both “own” their copy. That does not stop you selling or shipping what you generated, but it does stop you treating generated code as exclusive intellectual property. If exclusivity matters — a patentable algorithm, a trade-secret implementation, a core differentiator — write that part yourself, or add substantial human authorship of your own on top of the suggestion. And never assume a suggestion is original just because it compiles and looks unfamiliar; the model’s idea of unfamiliar is not a licence check.

3. When a suggestion matches public code

GitHub is the only one of the three that publishes a number for this. Its Copilot FAQ says that in rare instances — less than 1% based on GitHub’s research — a suggestion may match an example of code used to train the model. Rare is not never, and the risk concentrates exactly where it hurts: a long, distinctive block that looks like a known library function, not a five-line loop.

GitHub’s mitigation is the duplication detection filter, also called “suggestions matching public code”. With it on, Copilot checks suggestions against public code on GitHub and blocks matches of about 65 lexemes — roughly 150 characters — or more, so the suggestion is never shown to you. On an organisation plan an administrator sets it; on an individual plan, check your own settings and confirm it is on before you rely on it. GitHub Copilot.

The filter is a screen, not a guarantee. Near-matches below the threshold pass through, and a suggestion can resemble a licensed project without matching it character for character. Before a distinctive block ships, search for it: paste a long string into a code search, check whether it resembles a project you know, and if it does, rewrite the logic in your own structure or check that project’s licence before keeping it. Ordinary boilerplate — standard loops, common API call patterns, framework setup — is the low-risk end; a distinctive algorithm reproduced verbatim is the case that matters.

4. Indemnity: the backstop, and its edges

Indemnity is the promise that the vendor defends you if a third party claims the generated code infringes their rights. GitHub’s Business and Enterprise Copilot plans include it; Free and Pro plans do not. That alone makes the plan you are on part of the licence answer, not just a billing detail.

The coverage is narrower than the word “indemnity” sounds. The product terms cover unmodified suggestions: the suggestion as generated, not as edited. Editing a suggestion is the normal workflow — you refactor it, combine it with your code, rewrite the variable names — and each edit moves the shipped code further from the exact output the indemnity covers. Keep a record of what was generated and what you changed, so you can show which parts were the suggestion and which parts are yours.

One more thing to check, because the guides are out of date on it: older write-ups say the indemnity only applies when the duplicate-detection filter is switched on. Microsoft’s Customer Copyright Commitment page removed the duplicate-detection filter as a required mitigation for GitHub offerings on 3 April 2026. So a guide written before that date states a condition that no longer applies — read the current product terms for your plan instead of trusting a 2025 checklist. The unmodified-output condition is the one that still bites.

5. The five-minute check before you ship

  1. Find the terms that govern your plan. Open your account page and write down the plan name and the date. Copilot: Section J of the GitHub Terms of Service, or the Generative AI Services Terms for Business and Enterprise. Cursor: the Terms of Service. ChatGPT or Codex: OpenAI’s Terms of Use. If you bring your own model key, add that provider’s terms too.
  2. Confirm the ownership sentence. Search the terms for “own” and read the full sentence. You are looking for an assignment of the output to you. If the terms do not say it, do not assume it.
  3. Check the filter and the indemnity together. Turn the public-code filter on where your plan offers it, and check whether your plan includes IP indemnity at all. Free and individual plans generally do not — on those, you bear the risk yourself, and the filter is your only screen.
  4. Scan the diff for long verbatim-looking blocks. Before merge, look for the distinctive parts: an unusual algorithm, a long helper function, a block that reads like library code. Search any suspicious block and rewrite it in your own structure if it matches something.
  5. Record the evidence. Keep the plan name, the terms link, the date, and the filter setting next to the repository, so a later terms change does not leave you guessing what you relied on. If any step comes back unclear, the cheap move is to keep the generated code out of the shipped product until it is clear — regenerate it under a plan with an explicit grant, or write the contested part yourself.

Licence is one of three checks before generated code ships. The other two are in this series: check generated code for secrets before running it, and check whether your plan lets you sell the output at all. Our Cursor versus GitHub Copilot free plans comparison covers which free tier gives you the filter and the terms discussed here.

Where the facts in this guide come from

Every ownership and matching claim above was read on the provider’s own page on 2026-11-16: OpenAI’s Terms of Use, effective 1 January 2026 (you own the Output; output may not be unique; assignment does not extend to other users’ output), Cursor’s Terms of Service (Anysphere assigns its right, title and interest in Suggestions to you; Suggestions may be similar to or the same as those provided to other customers), GitHub’s Terms for Additional Products and Features (Copilot Business and Enterprise use the Generative AI Services Terms; other users use Section J of the Terms of Service), and GitHub’s Copilot FAQ (less than 1% of suggestions match training examples; the duplication detection filter blocks matches of about 150 characters against public code). The indemnity conditions — Business and Enterprise plans only, unmodified suggestions, and the 3 April 2026 removal of the duplicate-detection filter as a required mitigation — are from GitHub and Microsoft’s product terms as read in November 2026 plan comparisons; if your plan’s terms differ, the terms on your account govern. Terms change, and the linked page is the only authority that counts. This guide has no affiliate links — if a link ever earns anything, we will say so in the sentence that carries it. This is a practical checking routine, not legal advice; for a high-value codebase, get advice on your specific facts. For the companion guides, see Can I use free AI output commercially?, Check AI code for secrets before running it and Cursor vs GitHub Copilot free plans.

Frequently asked questions

Do I own code generated by ChatGPT or Cursor?

Yes, on the terms as written. OpenAI's Terms of Use say you own the Output and assign all of OpenAI's right, title and interest in it to you. Cursor's Terms of Service say Anysphere assigns to you all of its right, title and interest in any Suggestions. But the output may not be unique — another user can receive the same or similar code, and that other copy is not yours.

Can AI-generated code infringe copyright?

It can resemble public code. GitHub says that in rare instances — less than 1% based on its research — a suggestion may match an example of code used to train the model. Its duplication detection filter blocks suggestions that match public code on GitHub of about 150 characters or more. Check long, distinctive blocks before shipping; ordinary boilerplate is the low-risk end.

Does GitHub Copilot's IP indemnity cover my code?

Only on Business and Enterprise plans, and the product terms cover unmodified suggestions. Free and Pro plans have no indemnity. Microsoft's copyright-commitment page removed the duplicate-detection filter as a required mitigation on 3 April 2026, so guides that still say filter on means covered and filter off means not covered are out of date — check the current terms for your plan.

Is checking the licence the same as checking the code is safe?

No. The licence check covers ownership and copyright; the code itself still needs the usual review for correctness, security and secrets. Our secrets check covers hardcoded credentials before you run generated code, and our commercial-use check covers what your plan lets you sell.