Guide · AI coding
Which AI coding agents train on your code by default, and the switch that stops each one
Copilot, Codex, Antigravity and Devin can train on personal-plan sessions unless you opt out. Claude Code asks; Cursor has Privacy Mode. The exact switch for each.
The short version
- GitHub Copilot Free, Pro and Pro+ have used interaction data, including code snippets, for training since 24 April 2026 unless you opt out.
- OpenAI applies your ChatGPT training setting to Codex, and a thumbs up or down can send the whole conversation to training even after you opt out.
- Claude Code keeps consumer data 5 years with training on and 30 days with it off; Cursor trains only with Privacy Mode off.
- A training switch doesn't control everything that leaves your machine: telemetry, feedback reports and uploads have their own settings.
In this article · 8 sections
- 01The default for each agent, on individual plans
- 02GitHub Copilot: on since April
- 03OpenAI Codex: one switch, plus the feedback buttons
- 04Claude Code: you choose, and it decides retention
- 05Cursor: Privacy Mode, free on every plan
- 06Google: Gemini CLI is now Antigravity, and the terms are broad
- 07Devin and Windsurf: opt-out listed only for paid plans
- 08A training switch doesn't control uploads
On a personal plan, four of the six coding agents below can use your sessions to train models unless you switch it off: GitHub Copilot, OpenAI Codex, Google Antigravity, and Cognition's Devin and Windsurf. Claude Code trains only if its model-improvement setting is on, and Cursor only when Privacy Mode is off. Business and enterprise plans are excluded almost everywhere. Every agent still sends the code it reads to a remote model. The switches below only decide what happens to that code afterwards.
We read each vendor's own policy pages on 30 November 2026. Everything below is what the vendors say. We didn't test their traffic ourselves.
The default for each agent, on individual plans
| Agent | Trains on your sessions by default? | Where to switch it off | Business plans |
|---|---|---|---|
| GitHub Copilot Free, Pro, Pro+ | Yes, since 24 April 2026 | github.com/settings/copilot, under Privacy | Business and Enterprise excluded |
| OpenAI Codex (ChatGPT Free, Plus, Pro) | Yes | ChatGPT Settings > Data controls > Improve the model for everyone off | Business, Enterprise, Edu, API: not used by default |
| Claude Code (Free, Pro, Max, Ultra) | Only if the setting is on | claude.ai/settings/data-privacy-controls | Team, Enterprise, API: not trained on |
| Cursor | Only with Privacy Mode off | Settings (Ctrl/Cmd+Shift+J) > General > Privacy Mode on | On by default for teams |
| Google Antigravity (consumer) | Yes | Antigravity settings (the terms don't name the toggle) | Workspace and Enterprise have separate terms |
| Devin and Windsurf (Cognition) | Yes | Paid plans: Settings > General > Data controls & privacy > Disable training | Teams: admin only; Enterprise: written consent |
GitHub Copilot: on since April
GitHub's policy update covers Copilot Free, Pro and Pro+. From 24 April 2026, "inputs, outputs, code snippets, and associated context" are used for training unless you opt out. GitHub's list includes the code around your cursor, your comments, file names, repository structure and how you move around the code.
Private repositories "at rest" are excluded. Code that Copilot processes while you work in a private repo can still be used. The data may go to GitHub affiliates, including Microsoft. If you opted out before the change, GitHub says your choice was kept. To check, open github.com/settings/copilot and look under Privacy.
This matters most if you use Copilot for free. Copilot Free is an individual plan, so the training default applies to it.
OpenAI Codex: one switch, plus the feedback buttons
OpenAI's help page says that on personal plans "we may use your content to train our models". It also says "your ChatGPT model-training preference applies to your Codex conversations." You can turn off Improve the model for everyone in ChatGPT or choose "Do not train on my content" in OpenAI's Privacy Portal. Either one covers both ChatGPT and Codex.
There is one exception. If you press thumbs up or thumbs down, OpenAI "may use the entire conversation associated with that feedback" for training, even after you opt out. On Business, Enterprise and Edu, feedback doesn't trigger training.
The Codex CLI also has local settings for its own analytics and for /feedback uploads. Per the config reference, feedback.enabled is true by default. To turn both off, add this to ~/.codex/config.toml:
[analytics]
enabled = false
[feedback]
enabled = false
Claude Code: you choose, and it decides retention
Anthropic's Claude Code data page says it trains on Free, Pro, Max and Ultra accounts "when this setting is on", and that includes Claude Code. The same setting decides how long your data is kept: 5 years with training on, 30 days with it off. Team, Enterprise and API use is not trained on.
Three other channels send data, and each has its own switch:
- Metrics (latency, usage) are on by default when you use Anthropic's API. Anthropic says they never include code, prompts or file paths.
DISABLE_TELEMETRY=1turns them off. - Error reports are on for Pro, Max and Ultra sign-ins on v2.1.198 and later, with secrets and paths redacted.
DISABLE_ERROR_REPORTING=1turns them off. /feedback,/bugand/sharesend your conversation, code included, and Anthropic keeps it for 5 years.DISABLE_FEEDBACK_COMMAND=1blocks them. The session survey uploads a transcript only if you answer Yes to its follow-up question.
To switch off all non-essential traffic at once, put this in ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}
Anthropic notes that this also turns off feature flags, which can make Remote Control unavailable. It doesn't stop the WebFetch safety check, which sends only the hostname you're fetching. On your own machine, Claude Code keeps transcripts in plain text under ~/.claude/projects/ for 30 days. For what each plan costs, see our Claude pricing guide.
Cursor: Privacy Mode, free on every plan
Cursor's data-use page says that with Privacy Mode off it "may use and store codebase data, prompts, editor actions, and code snippets" to train its models. With Privacy Mode on, Cursor doesn't train on your data, and its model providers have agreed to keep none of it. Prompts that trip a provider's abuse filter can still be stored for investigation.
Cursor's security page says Privacy Mode is available to anyone, free or Pro. Its help page says it is on by default for teams but doesn't say what the default is for individual accounts, so check the toggle yourself. The no-storage agreements don't cover you when you use your own API key. In that case your model provider's policy applies.
Google: Gemini CLI is now Antigravity, and the terms are broad
On 18 June 2026, Gemini CLI was replaced by Antigravity CLI for unpaid and Google One users, and Gemini CLI stopped serving their requests. The Antigravity terms say Google uses your "Interactions" (your user data, interaction data, metadata and feedback) "to evaluate, develop, and improve Google and Alphabet research, products, services and machine learning technologies". They add that "Google employees and contractors may access, view, review and use" them.
To opt out, the terms tell you to "navigate to settings to change your preference", without naming the setting. They also say Google still uses your data to run the service and handle feedback "even when your Telemetry is toggled off". To delete stored Interactions, email antigravity-support@google.com.
If you still run Gemini CLI with a free Gemini API key, the API terms say Google uses what you send to improve its products, and human reviewers may read it. This doesn't apply in the EEA, Switzerland and the UK, where the paid terms cover everything.
Devin and Windsurf: opt-out listed only for paid plans
Cognition's security page says: "By default, we may use your data for model training purposes to improve and enhance the Services." The windsurf.com/security address now redirects to that Devin security page, which doesn't mention Windsurf by name, so the Windsurf part rests on the redirect. Paid users can switch on Disable training under Data controls & privacy, which also stops Cognition's model providers from keeping your data. The page offers this only on paid plans. On Teams, only an admin can switch it on. Enterprise data isn't trained on without written consent.
A training switch doesn't control uploads
Agreeing to training and sending data off your machine are two separate things. Arize reports that in July 2026 a researcher captured the traffic from xAI's Grok Build CLI (v0.2.93). The task needed about 192 KB of traffic, but the CLI also uploaded 5.1 GB to a storage bucket, including the repository's full git history. Turning off "Improve the model" didn't stop the upload. A later change on xAI's servers did. This is one researcher's capture as reported by Arize, and xAI hasn't published a security advisory about it.
If you need to know what actually leaves your machine, watch the traffic yourself. Our guide to checking what local AI tools send shows how. Running a model locally is the only setup where your code never goes to a vendor.