Does GitHub Copilot train on your code? What changed in 2026

The Morse teamPublished 7 min read

Yes. As of October 2026, GitHub Copilot trains on your code by default if you use a personal plan (Copilot Free, Pro, Pro+, or Max): since April 24, 2026, GitHub may use your prompts, the suggestions you accept, and the code snippets and context sent to Copilot to train AI models, unless you set "Allow GitHub to use my data for AI model training" to Disabled in your Copilot settings. GitHub does not train on Copilot Business or Copilot Enterprise data, and it excludes Copilot Student accounts, teachers on free Pro, and members of a paid organization.

We read GitHub's own announcement, changelog, terms of service, privacy statement, Copilot docs, plans page, and community FAQ on October 24, 2026. Every fact below links to the GitHub page it came from. Where GitHub's pages don't answer something, such as how long it keeps an individual's prompts, we say so instead of guessing.

GitHub Copilot training: the key facts

Read on October 24, 2026.

PlanTrains on your code by default?The settingPrompt and suggestion retentionSource
Copilot Free, Pro, Pro+Yes, since April 24, 2026"Allow GitHub to use my data for AI model training" in Copilot settingsNot published for these plansGitHub blog, GitHub Docs
Copilot Max ($100 a month)Yes, per GitHub's docsSame settingNot publishedGitHub Docs
Copilot Student, and teachers on free ProNo, "not affected"None neededNot publishedGitHub FAQ
Personal plan, member of a paid organizationNo, GitHub excludes this dataNone neededNot publishedGitHub FAQ
Copilot Business and EnterpriseNoNot shown on these plansNot kept for IDE chat and completions; 28 days elsewhereGitHub Copilot FAQ, GitHub Docs

Does GitHub Copilot train on your code by default?

On personal plans, yes. GitHub's March 25, 2026 post, Updates to GitHub Copilot interaction data usage policy, says the change applies to "Copilot Free, Pro, and Pro+ users" "from April 24 onward."

The same post lists the data covered:

  • "Outputs accepted or modified by you"
  • "Inputs sent to GitHub Copilot, including code snippets shown to the model"
  • "Code context surrounding your cursor position"
  • "Comments and documentation you write"
  • "File names, repository structure, and navigation patterns"
  • "Interactions with Copilot features (chat, inline suggestions, etc.)"
  • "Your feedback on suggestions (thumbs up/down ratings)"

GitHub's terms of service, in the version effective April 27, 2026, put this in a new Section J. Unless you opt out, you grant "GitHub and our affiliates" a license to collect and use your inputs and outputs. The blog post says the data "may be shared with GitHub affiliates," and names Microsoft as one. GitHub's community FAQ says "GitHub and Microsoft personnel working on AI model development may access interaction data collected for training."

Many guides still say the change covers Free, Pro, and Pro+ only. GitHub's individual settings page now names "Copilot Free, Copilot Pro, Copilot Pro+, or Copilot Max." Max is the $100-a-month plan GitHub announced on May 12, 2026 for June 1, after the training announcement. As of October 24, 2026, the data-use FAQ on GitHub's plans page still lists only "Individual (Free/Pro/Pro+) Subscribers," so Max users should check the setting rather than assume.

How do you opt out of GitHub Copilot training?

Turn the setting to Disabled. GitHub's docs give these steps:

  1. On GitHub, click your profile picture in the upper-right corner.
  2. Open Copilot settings (the page is at github.com/settings/copilot).
  3. Find "Allow GitHub to use my data for AI model training", open its dropdown, and choose Disabled.

If you opted out of the older "prompt and suggestion collection" setting before April 24, GitHub's FAQ says "your preference will carry over." Check anyway, because the setting has a new name.

If you can't find the setting, GitHub's docs say to "verify that you are not signed in with an account that has a Copilot Business or Copilot Enterprise license," because "the setting is not displayed for these plans."

Section J.3 of the terms says that if you opt out, GitHub "will not collect or use your Inputs and Outputs" for training. None of the GitHub pages we read says data collected before the opt-out is removed, so turn it off before you open the repository you care about.

Does GitHub Copilot use private repositories for training?

Not the stored files, but yes for the code Copilot sees while you work, unless you opt out. GitHub's blog post excludes "Content from your issues, discussions, or private repositories at rest." The same post says code Copilot processes during active use in a private repository "could be used for model training unless you opt out."

The terms say it in Section E: "If you provide your private repository content as Input to AI Features, we may use that Input to provide, develop, train, and improve the Service." The community FAQ adds, "we do not access or pull code from private repositories at rest."

In practice, a private repository protects the code no one asks Copilot about. The function under your cursor, the file names around it, and the stack trace you paste into chat are inputs, and inputs on a personal plan train by default.

Do Copilot Business and Enterprise train on your code?

No. GitHub's docs say "GitHub does not use Copilot Business or Copilot Enterprise customer data to train AI models." The blog post also excludes "enterprise-owned repositories."

The line between personal and business follows the account, not the plan you pay for. GitHub's FAQ says that for members or outside collaborators of a paid organization, "we exclude their interaction data from model training," even on a personal Free, Pro, or Pro+ license. The same personal account on a side project with no paid organization trains by default. As of October 2026, Business costs $19 per seat a month and Enterprise $39, per GitHub's plans docs.

How long does GitHub keep your Copilot prompts?

GitHub publishes periods for Business and Enterprise only. Its Copilot FAQ gives these defaults, read October 24, 2026:

Surface (Business and Enterprise)Prompts and suggestionsUser engagement data
IDE chat and code completionsNot retained2 years
Everything else, including github.com, mobile, and CLI28 days2 years

The FAQ says the 28 days exist because chat on github.com, mobile, and the CLI relies on thread history. It doesn't name the cloud agent separately. GitHub's agents documentation says the agent's working environment "is destroyed after the session ends."

For Free, Pro, Pro+, and Max, we found no published period. GitHub's privacy statement says only that it keeps personal data "as long as your account is active and as needed to fulfill contractual obligations."

Does the public code filter stop Copilot from training on your code?

No. The filter only changes which suggestions Copilot shows you. With "Suggestions matching public code" set to Block, GitHub's docs say Copilot checks each suggestion and about 150 characters of surrounding code against public code on GitHub, and hides a match or near match.

GitHub's code referencing page says "Code from private repositories and code hosted outside GitHub are not included in the search," and that matches occur "in less than one percent of Copilot suggestions." The agents documentation adds that the cloud agent and Copilot CLI "may generate code that is a match or near match of publicly available code," even with Block on.

What changed in 2026?

Our timeline, from GitHub's own pages:

DateWhat happenedSource
Mar 2, 2026GitHub posts an FAQ on using Free, Pro, and Pro+ data for trainingGitHub
Mar 25, 2026GitHub announces the change and updates its privacy statement and termsGitHub blog, changelog
Apr 24, 2026Training on personal-plan interaction data starts, unless you opt outGitHub blog
Apr 27, 2026Effective date on the current terms and privacy statementTerms, privacy statement
May 12, 2026GitHub announces the Max plan, for June 1GitHub blog
Oct 24, 2026GitHub's settings docs list Max among the plans that train by defaultGitHub Docs

The changelog also says the privacy statement now lets affiliates use shared data "for additional purposes," including developing AI. GitHub gets credit for two things: it gave 30 days' notice, and it carried over earlier opt-outs. For how other AI companies handle the same switch, see which AI companies train on your data.

How Morse keeps your code out of training

Every rule above comes from one arrangement: the code you show an assistant lands on the company's servers, under an account it can identify, and a license in the terms decides what happens next. A setting can narrow that license. It can't change where your code went.

Every plan, Free included, comes with coding, file, and other chat tools. Morse doesn't train AI on your content, sell your data, or show ads, so there's no dropdown to set to Disabled. Your chat history is stored in your browser, encrypted, not on our servers. Attached files are sent with the message and never stored by Morse.

Pick a mode per chat, by how sensitive the code is:

  • Private, the default, for code you'd rather no host keep. Open-weight models like DeepSeek, Kimi, and GLM, plus Grok, run with your account, email, and IP address stripped. Morse has zero data retention agreements with its inference, search, and other providers, so they keep nothing. Here's what zero data retention means.
  • E2EE, for code no one else should read. Your browser checks the enclave's hardware proof before anything leaves, then encrypts the message so only that enclave can read it. Our servers relay ciphertext they can't read. This rests on the enclave hardware and attestation working as designed. Read how end-to-end encrypted AI chat works.
  • Anonymous, to ask GPT, Claude, or Gemini without the provider knowing it's you. The provider still sees the code and may keep it for a limited time to check for abuse, under its own policy, so take out keys and internal hostnames first.

In every mode, Morse's servers don't keep messages or log what you write, so we usually have very little to give authorities. Clearing your browser deletes your chats for good, and we can't recover them, so keep a copy of anything you need. The privacy policy has the details.

You can start free with no card. E2EE chats come with Pro, at $19 a month.

Common questions

Does opting out of Copilot training turn off any Copilot features?

No. GitHub's plans page says "Opting out does not affect your access to Copilot features."

Does GitHub give my Copilot prompts to OpenAI or Anthropic for training?

GitHub's terms say the training license does not let GitHub or its affiliates share your inputs or outputs with third-party AI model providers for their own training. GitHub's FAQ says the same: third-party model providers "do not receive this data for their own model training."

Can I use Copilot CLI without my code going through GitHub?

Yes, if you bring your own model provider. GitHub's agents documentation says your prompts, code context, and replies are then "sent directly to the provider you configure" and are "not routed through GitHub," though usage telemetry without your prompts or code still goes to GitHub.

Was Copilot itself trained on public GitHub code?

Yes. GitHub's Copilot FAQ says "The Large Language Model (LLM) powering GitHub Copilot was trained on public code." GitHub's terms also say opting out of training does not affect content stored in public repositories.

Ask what you actually want to ask.

Over 30 models, characters, and images, with every chat encrypted and kept on your device. Free to start.

Start a private chat

Read next