Skip to content
codelicenses Earn $500+ per repo

Is my private code being used to train AI models?

There are three separate answers, depending on where the code sits. Your code host: major hosts state they do not train models on private repositories. Your AI coding assistant: it depends on the tool and the plan, and is usually a setting you can check. Code you deliberately license: yes, because you agreed to it and were paid.

Updated 18 October 2026 · Published 14 September 2026


This question gets answered badly in both directions. One camp says everything you have ever written is already in a model. The other says private means private, relax. Neither is a useful answer.

The three separate questions

They get run together constantly, and they have different answers.

Your code host

Major hosting providers state that they do not train models on the contents of private repositories. That is their stated policy rather than a law of nature, and policies are revised, so it is worth reading the current terms of whichever service you use rather than taking it from a website.

Practically, treating private repositories as not feeding frontier model training is the correct working assumption today.

Your AI coding assistant

This is where the real exposure sits, and almost nobody checks it.

An assistant reads your code. That is the product. The question is what happens to what it read: whether snippets are retained, whether they are used to improve the service, and whether that is on or off by default.

The answers vary by tool and by plan, and they change. The pattern across the market has been that business and enterprise tiers exclude your code from product improvement by default, while free and individual tiers often do not unless you turn it off.

If you care about the answer, the place to find it is the settings page and the current terms of the specific tool, not a general article. That includes this one.

┌─ WORTH CHECKING ─────────────────────────────────────────────────────┐
│                                                                      │
│  Private, finished, owned by you: $500+ each to AI labs.             │
│                                                                      │
│  [ See what my repos are worth ]                                     │
│                                                                      │
└──────────────────────────────────────────────────────────────────────┘

Code you deliberately license

The third case is the one this site is about, and it is different in every respect that matters.

It happens because you agreed to it, in a contract you read, covering repositories you chose. It is non-exclusive, so you keep ownership and keep using the code. Secrets and personal data are stripped from the reviewed copy before any buyer sees it. Nothing is published. And you are paid, repeatedly, each time a licence closes.

The contrast with the previous section is the whole point. The difference between those two situations is not technical. It is consent and payment.

What is actually worth doing

Read the settings on your AI tooling. Ten minutes, and it is the only one of the three where your current behaviour changes the outcome.

Stop treating public and private as the same category. Anything you published is collected and gone. That is done, it is not worth being upset about, and it was the deal you accepted when you chose a permissive licence. See why your MIT-licensed repo is worth nothing. Making a repository private now does not recall copies already taken; how to make a GitHub repository private covers what the setting does and does not change.

Do not delete old repositories out of anxiety. Deleting destroys an asset and undoes nothing that already happened. Archive them instead. If you were about to delete, read what deletion actually removes first.

If code is going to be used either way, be the one who agreed and got paid. That is not a slogan, it is the only lever you actually hold.

Common questions

Does my code host train models on my private repositories?
Major hosts state that they do not train models on private repository contents. The terms are theirs to change and are worth reading directly rather than taking from a third party, including this one.
What about AI coding assistants I have installed?
Different question, different answer. An assistant reads your code by design in order to work. Whether anything is retained or used to improve the product varies by tool and by plan, and is usually a setting. Business and enterprise tiers commonly exclude it by default while free tiers commonly do not.
Does licensing my code mean it gets published?
No. Licensing grants permission to train on a reviewed copy. Nothing is published and your repository is not modified.
How would I even know if my code had been used?
Generally you would not, which is precisely why the distinction between a licence you signed and a setting you did not read matters.
Should I just delete old repositories to be safe?
Deleting removes an asset and does not undo anything that already happened. Archiving keeps the history intact and costs nothing.
Does Claude use your data for training?
It depends on the product and the plan, and the answer has changed over time. Consumer, API and business terms differ, and business tiers commonly exclude training by default. Check the data usage section of the current terms for the product you use, and the setting in your own account, rather than a summary on a third-party page including this one.
Is GitHub Copilot private, and does it train on my code?
Copilot reads your code in order to work. Whether snippets are retained or used to improve the product depends on the plan and on a setting. Business and enterprise plans exclude it by default; individual plans expose a toggle. Check the setting rather than assuming either way.
Does Cursor train on your code?
Cursor offers a privacy mode which, when enabled, is stated to prevent your code being stored or used for training. Whether it is on depends on your settings and plan. Turn it on if you care, and re-check after updates.

WORTH CHECKING

Earn $500+ on every repo you never open.

Private, finished, owned by you: $500+ each to AI labs.

Non-exclusive, so you keep the code and are paid again on every re-license.

See what my repos are worth