AI Coding Tool Privacy Checklist: Code Retention, Training, and Access
Introduction
AI coding assistants can read source files, inspect project structures, process prompts and suggest changes. Some can also execute terminal commands, search repositories and connect to external development services.
These features create a privacy question that every developer and business should answer:
What happens to your source code after an AI coding tool receives it?
Your repository may contain proprietary code, API credentials, database connection details, customer information and internal infrastructure configurations. Sending this information to an AI service without understanding its data policies can create avoidable security risks.
A privacy checklist helps you examine three important areas:
- Code retention: What information does the provider store, and for how long?
- Model training: Can submitted code, prompts or generated responses be used to improve AI models?
- Data access: Which providers, employees, integrations and administrators can access the information?
This guide provides a practical checklist for evaluating AI coding tools. It also explains privacy controls documented by popular providers and shows how organisations can establish safer development workflows.
Why AI Coding Tool Privacy Matters
A coding assistant may need more than the specific function you ask it to write.
Depending on the product and enabled features, it may receive:
- The current source file
- Relevant sections from nearby files
- Repository search results
- Open editor tabs
- Previous conversation messages
- Error messages and stack traces
- Terminal output
- Project instructions
- Configuration details
- Information returned by external tools
For example, you might ask an assistant to debug a database connection problem.
The relevant context could include a configuration file, database error, connection code and environment settings.
If these contain passwords or production credentials, sensitive information may leave the developer’s machine.
The risk is not limited to malicious activity. A normal debugging prompt can accidentally expose information that should remain private.
Privacy reviews are therefore important for individual developers, startups and large engineering teams.
How AI Coding Tools Process Your Code
Understanding the data flow is the first step toward controlling it.
A typical cloud-based coding assistant follows a process like this:
- The developer enters a prompt or requests a code suggestion.
- The editor collects relevant context.
- The application prepares a request.
- The request reaches the coding tool’s backend.
- An AI model provider processes the request.
- The generated response returns to the application.
- The application displays the response or applies an approved change.
The exact workflow depends on the product.
Some features make requests when a developer sends a message. Others may send requests during code completion or background indexing.
Cursor, for example, documents that AI requests may include recently viewed files, conversation history and relevant code. It explains that these requests pass through Cursor’s infrastructure before reaching the relevant model provider.
This means the data flow may involve more than one company. Read the product’s official data handling and subprocessor documentation rather than assuming that only the model provider processes your code.
Source: Cursor Data Use and Privacy Overview.
The Three Privacy Questions Every Developer Should Ask
1. Does the Tool Retain Submitted Code?
Retention means storing information after it has been received.
An AI coding provider may retain different types of information:
- User prompts
- Source code snippets
- Generated responses
- Conversation history
- Repository context
- Error reports
- Usage information
- Feedback
- Security-related records
These categories may have different retention periods.
For example, a provider may avoid keeping ordinary IDE prompts but retain usage telemetry for product operations.
Another provider may save conversation history so users can continue previous sessions.
Do not assume that a short-lived prompt automatically means that all associated information is deleted.
Check the provider’s rules for each type of data.
2. Can Your Code Be Used for Model Training?
Model training and service operation are separate purposes.
A provider may process your source code to generate a response without using it to train a general-purpose AI model.
However, some products allow or default to data sharing for model improvement.
Check whether the policy covers:
- Source code sent in prompts
- Code snippets collected as context
- Generated suggestions
- Chat history
- Developer feedback
- Error reports
- Data collected through agent workflows
Also check whether the rule changes between Free, Pro, Business and Enterprise plans.
A statement such as “your data is protected” does not automatically answer the training question.
Look for a clear explanation of what data is excluded from training and which exceptions apply.
3. Who Can Access Your Data?
Privacy also depends on access permissions.
Potential access points include:
- The coding tool provider
- The underlying model provider
- Cloud infrastructure providers
- Approved subprocessors
- Support and security teams
- Organisation administrators
- Third-party extensions
- MCP servers and external integrations
The provider should explain how access is controlled.
For business use, examine whether the product supports role-based permissions, administrative settings, audit information and appropriate contractual safeguards.
The number of companies involved is not the only concern. What matters is what each party can access, why it needs access and how that access is controlled.
AI Coding Tool Privacy Checklist
Use this checklist before connecting a private repository or company project to an AI coding assistant.
A. Source Code Collection
| Check | Question to Ask | Importance |
|---|---|---|
| Code context | Does the tool send complete files or selected code sections? | High |
| Repository indexing | Does it upload or index repository content? | High |
| Open files | Are open editor files included in requests? | High |
| Background requests | Does it send code context automatically? | High |
| Terminal output | Can commands send logs or environment information? | High |
| Error messages | Are stack traces and diagnostic details transmitted? | Medium |
| Project instructions | Are instruction files included in AI requests? | Medium |
Practical action: Review what the tool can read before enabling repository-wide access.
Do not assume that a chat prompt contains only the words you typed. The application may attach additional context.
B. Data Retention
Check whether the provider explains:
- How long prompts are stored
- How long generated responses are stored
- Whether conversation history is saved
- How telemetry is retained
- Whether security records have different retention periods
- Whether administrators can configure retention
- What happens after account deletion
- Whether backups follow a separate deletion schedule
Also ask whether the retention policy changes when you use a different model or feature.
A provider may have one policy for normal requests and another for file storage, agent sessions or abuse investigations.
C. Model Training
Confirm these points:
- Is model training enabled by default?
- Is data sharing optional?
- Can users disable it?
- Can administrators enforce the setting?
- Does the setting cover code and generated suggestions?
- Are third-party model providers covered?
- Are feedback submissions handled separately?
- Are there safety-related exceptions?
For organisations, a user-level preference is not always enough.
The company should verify whether administrators can enforce the required setting for every team member.
D. Third-Party Access
Identify all external parties involved.
Check:
- Main service provider
- AI model providers
- Cloud infrastructure provider
- Logging and analytics services
- Error monitoring services
- Support providers
- External integrations
- Subprocessors
Look for an up-to-date subprocessor list.
Understand whether data is encrypted during transmission and storage.
Also identify the provider responsible for responding to privacy requests or security incidents.
E. Account and Administrative Controls
Review available controls.
| Control | Why It Matters |
|---|---|
| SSO | Connects access to company identity management |
| MFA | Adds another authentication layer |
| RBAC | Limits permissions by role |
| SCIM | Helps automate user provisioning and removal |
| Admin policies | Enforces organisation-wide settings |
| Audit logs | Helps investigate account and activity events |
| Repository restrictions | Limits access to approved codebases |
| Data retention settings | Supports organisation data policies |
| Session management | Helps control active account access |
Not every product offers every feature on every plan.
Confirm the available controls in the exact subscription and product configuration being evaluated.
F. External Tools and Integrations
AI coding assistants may connect to external tools through extensions, plugins and Model Context Protocol servers.
These integrations can provide access to:
- Git repositories
- Issue trackers
- Internal documentation
- Databases
- Cloud platforms
- Deployment tools
- Local files
- Shell commands
Each integration creates a separate access consideration.
Ask:
- What information does it receive?
- Can it read files?
- Can it modify data?
- Can it execute commands?
- Does it have write permissions?
- Is its provider listed as a subprocessor?
- Can the integration be disabled centrally?
Only connect integrations that are needed for the development task.
Privacy Policy Examples: How Popular AI Coding Tools Handle Data
The following examples use official provider documentation reviewed on 4 December 2026.
They illustrate why privacy cannot be evaluated using one sentence or one subscription label. Product surfaces, account types, settings and retention exceptions matter.
These are policy snapshots, not independent product security audits or a ranking of the tools.
1. GitHub Copilot
GitHub processes different types of Copilot information, including prompts, suggestions, feedback and user engagement data.
Its published privacy information distinguishes between individual subscribers and Business or Enterprise customers.
For individual Free, Pro and Pro+ subscribers, GitHub states that Copilot interaction data, including prompts, suggestions and code snippets generated during sessions, may be used for AI model training. Individual subscribers can opt out through their Copilot settings.
GitHub states that Business and Enterprise data is not used to train its models. It may still process data for service operation, troubleshooting, security and other documented purposes.
Retention also varies by product surface. GitHub’s published retention information distinguishes IDE chat and completion usage from other Copilot access methods. For example, it lists different retention handling for prompts and suggestions depending on the access method.
What to check:
- Confirm whether the account is Individual, Business or Enterprise.
- Review the model-training setting for individual subscriptions.
- Ask administrators to review enterprise policies.
- Check the exact IDE, CLI, web or agent workflow.
- Review content-exclusion support and its limitations.
Official sources:
2. Cursor
Cursor documents a setting called Privacy Mode.
According to its current documentation, when Privacy Mode is enabled, customer data is not used for model training by Cursor. Cursor also maintains zero-data-retention agreements with its inference providers.
However, Cursor documents an important exception: providers may use risk classifiers to investigate suspected violations of usage policies. Certain prompts or conversations may therefore be retained for investigation under the relevant policies.
When Privacy Mode is disabled, Cursor may use codebase data, prompts, editor actions and code snippets to improve AI features and train its models.
Cursor also explains that requests, including requests made with a bring-your-own-key configuration, still pass through its backend for prompt preparation.
Its documentation describes temporary encrypted file caching while requests are processed.
What to check:
- Enable Privacy Mode before using private repositories.
- Confirm that the setting is active.
- Check which models support the applicable retention protection.
- Review the current subprocessor list.
- Understand the abuse-investigation exception.
- Do not assume that BYOK means direct communication with the model provider.
Official sources:
3. Claude Code
Claude Code privacy depends on the account and service being used.
Anthropic’s consumer privacy information covers Claude Free, Pro and Max accounts, including when those accounts use Claude Code.
For these consumer products, Anthropic states that chats and coding sessions may be used to improve its models when users allow it, when conversations are flagged for safety review or when users otherwise explicitly opt in.
Anthropic also documents an Incognito chat option that is not used for model improvement.
Its consumer retention documentation says deleted conversations are removed from chat history immediately and deleted from backend storage systems within 30 days. Where users allow model improvement, de-identified data may be retained in training pipelines for up to five years.
Commercial products follow separate terms. Anthropic says API inputs and outputs are normally deleted from its backend within 30 days, subject to exceptions such as feature-specific retention, legal requirements, usage-policy enforcement and agreed Zero Data Retention arrangements.
What to check:
- Distinguish consumer Claude Code from commercial access.
- Review the model-improvement preference.
- Understand Incognito behaviour.
- Check conversation and local session transcript retention.
- Review any Zero Data Retention agreement.
- Confirm model-specific safety exceptions.
Official sources:
- Anthropic: Is My Data Used for Model Training?
- Anthropic: Consumer Data Retention
- Anthropic: API and Data Retention
4. OpenAI Codex
Codex data controls depend on the ChatGPT account or workspace being used.
For personal ChatGPT accounts, users can change their model-training preference through:
Settings → Data controls → Improve the model for everyone.
OpenAI states that data sharing is enabled by default on personal Free, Plus and Pro workspaces, but users can turn it off.
OpenAI says it does not use data from ChatGPT Business, Enterprise or Edu workspaces to train models by default.
The OpenAI API also has separate business data commitments. API inputs and outputs are not used for model training by default, and qualifying organisations can configure additional data-retention controls, including Zero Data Retention.
What to check:
- Identify whether Codex is being used through a personal or managed account.
- Review the account’s model-training setting.
- Confirm organisation workspace policies.
- Check data retention separately from model training.
- For API-based deployments, review the applicable data controls and eligibility for Zero Data Retention.
Official sources:
5. Gemini Code Assist
Google’s published security and privacy documentation for Gemini Code Assist Standard and Enterprise describes how prompt data, response data and additional IDE context are handled.
Google states that these Standard and Enterprise services are stateless and do not store prompts and responses in Google Cloud by default.
Organisations can configure Cloud Logging if they need to store user inputs and responses.
Google also states that it does not use customer data to train its models without permission.
Telemetry is separate from prompt content. It can include events such as requests, response receipt and whether a user accepted or rejected a suggestion.
What to check:
- Confirm whether the service is Standard or Enterprise.
- Review the Cloud Logging configuration.
- Check organisation permissions and access controls.
- Distinguish usage telemetry from code content.
- Review data location and processing requirements.
Official source:
Google Cloud: Gemini Code Assist Security, Privacy and Compliance
6. Amazon Q Developer
Amazon Q Developer provides an example of why Free and Pro plans should not be assumed to have identical data policies.
AWS states that certain content from Amazon Q Developer Free Tier, including questions and generated code, may be used for service improvement and model training.
AWS also states that it does not use Amazon Q Developer Pro or Amazon Q Business content for service improvement.
For the Free Tier, AWS documents opt-out controls that depend on the environment. It separately explains how client-side telemetry can be disabled.
What to check:
- Confirm the subscription tier.
- Review content-sharing settings.
- Review IDE and CLI opt-out instructions.
- Check AWS organisation-level AI services policies.
- Distinguish client-side telemetry from code and prompt content.
Official sources:
Comparing Privacy Policies Without Confusing the Results
Different products use different language and provide different levels of detail.
Use this simplified table as an initial comparison.
| Tool | Training policy snapshot | Retention or access consideration |
|---|---|---|
| GitHub Copilot Individual | Individual interaction data may be used for training; opt-out available | Retention differs by access surface |
| GitHub Copilot Business / Enterprise | Not used for model training | Operational processing and usage-specific retention still apply |
| Cursor with Privacy Mode | Customer data not used for training under documented mode | ZDR provider agreements; safety investigation exceptions |
| Cursor without Privacy Mode | Code and interaction data may be used to improve or train models | Review the provider’s broader retention rules |
| Claude Code consumer plans | Training depends on settings, explicit opt-in and safety review | Consumer conversation and training retention rules apply |
| Claude commercial/API | Not used for training without permission | API and product retention rules differ; ZDR may be available |
| OpenAI Codex personal account | Training preference controlled through ChatGPT Data Controls | Account settings and product retention apply |
| OpenAI Business / Enterprise | Not used for training by default | Workspace retention controls apply |
| Gemini Code Assist Standard / Enterprise | Not used for training without permission | Stateless prompts and responses by default; optional Cloud Logging |
| Amazon Q Developer Free | Content may be used for service improvement and training | Free Tier opt-out settings are available |
| Amazon Q Developer Pro / Business | Not used for service improvement | Other operational and contractual data rules still apply |
This table is not a privacy certification. It summarises selected public policy statements. It does not establish that one product is safer than another.
The exact product version, subscription, model, settings and deployment arrangement must be checked before use.
What Does Zero Data Retention Actually Mean?
Zero Data Retention, commonly shortened to ZDR, means that a provider has agreed not to retain certain request content after processing, subject to the scope and exceptions in the agreement.
It does not automatically mean:
- No information is ever transmitted.
- No system processes the content.
- No security metadata exists.
- No operational logs are generated.
- No abuse investigation can occur.
- No account or billing information is retained.
- Every model and feature follows identical rules.
For example, a provider may offer ZDR for a particular API or model provider while retaining account information or security-related records separately.
The agreement may also apply only to specific products, endpoints, models or customers.
Ask the provider to confirm the precise scope in writing.
How to Protect Source Code Before Using an AI Coding Assistant
Privacy settings are important, but they should be part of a wider security process.
1. Remove Secrets From Your Repository
Never include real credentials in prompts or example files.
Avoid sending:
- Cloud access keys
- SSH private keys
- Database passwords
- API tokens
- Production environment files
- Customer authentication data
- Private certificates
Use secret-management tools and environment variables instead of hardcoding credentials.
2. Use a Dedicated AI Ignore File Where Supported
Some coding tools support ignore rules for sensitive files or directories.
Use the product’s documented exclusion mechanism.
For example, GitHub Copilot Business and Enterprise support content exclusion for eligible clients and features.
However, GitHub explicitly states that content exclusion is not a filesystem security boundary and is not guaranteed to be respected by third-party MCP servers or clients.
Treat these exclusions as an additional guardrail, not a substitute for access controls.
3. Limit Repository Permissions
Give the assistant access only to the repository or working directory required for its task.
Avoid granting unrestricted access to:
- Home directories
- Production configuration
- Cloud credentials
- SSH configuration
- Private customer files
- Unrelated repositories
Use restricted development environments when possible.
4. Review Terminal Permissions
Agentic coding tools may execute commands.
Be careful with commands that:
- Read environment variables
- Delete files
- Modify Git history
- Access production infrastructure
- Upload files
- Install untrusted dependencies
- Change deployment settings
Use approval controls and inspect commands before execution.
5. Review MCP Servers and Extensions
Third-party integrations can extend an assistant’s access.
Install only trusted integrations.
Review the permissions and external services involved.
A private AI coding mode does not automatically make every connected MCP server or extension safe.
6. Use Test Data Where Possible
Use synthetic or anonymised data for development tasks.
Avoid submitting real customer records, payment information and private business documents unless the service and organisation have explicitly approved the data flow.
7. Keep Git History and Change Review
Create a Git commit before major AI-assisted modifications.
Review the diff before accepting or merging generated changes.
Code privacy and code quality are different concerns. A tool can process information under an acceptable privacy policy and still generate incorrect or insecure code.
A Practical AI Coding Tool Privacy Review Checklist
Use this before approving a new tool.
Code and Prompt Handling
- The data sent from the editor is documented.
- Repository indexing behaviour is understood.
- Open-file context is understood.
- Terminal output and error logs are considered.
- Background requests are documented.
- Sensitive files are excluded where supported.
Retention and Training
- Prompt retention is documented.
- Code retention is documented.
- Conversation retention is documented.
- Model-training policy is verified.
- User opt-out controls are checked.
- Admin enforcement is checked.
- Retention exceptions are documented.
- Deletion procedures are understood.
Access and Security
- The provider’s subprocessor list is reviewed.
- Model providers are identified.
- Encryption controls are documented.
- SSO and MFA are available where required.
- User permissions follow least privilege.
- Administrative policies are reviewed.
- Audit capabilities are understood.
- MCP and extension permissions are restricted.
- Security and incident response arrangements are reviewed.
Business Approval
- The security team has reviewed the tool.
- The legal or privacy team has reviewed applicable terms.
- Data-processing requirements have been checked.
- The approved subscription tier is documented.
- Developers have received usage guidance.
- The tool’s settings have been verified.
- A process exists for reviewing policy changes.
Create a Privacy Approval Record
A short approval record makes later reviews easier.
| Field | Example |
|---|---|
| Tool name | [Product name] |
| Product plan | [Individual / Business / Enterprise] |
| Model | [Selected model] |
| Deployment type | [Cloud / Local / Self-hosted] |
| Privacy setting | [Enabled / Disabled / Not available] |
| Training policy | [No / Opt-in / Opt-out / Unknown] |
| Prompt retention | [Documented period / Unknown] |
| Code retention | [Documented period / Unknown] |
| Subprocessors reviewed | [Yes / No] |
| SSO and access controls | [Available / Not available] |
| Sensitive repository access | [Approved / Restricted / Not approved] |
| Review date | [Date] |
| Approver | [Authorised reviewer] |
Do not write “No data retention” in this record unless the exact scope has been confirmed.
Record unknown values as unknown. A missing privacy disclosure should trigger a follow-up rather than an assumption that the setting is safe.
Common Privacy Mistakes to Avoid
Assuming Paid Plans Always Protect Your Code
Subscription price does not define data protection.
Some paid individual plans have different privacy defaults from managed business plans.
Read the actual plan terms.
Assuming Turning Off Training Means Nothing Is Stored
Training and retention are separate.
A provider may avoid model training while retaining a conversation or security record for another purpose.
Assuming BYOK Means the Provider Cannot See Your Requests
A bring-your-own-key setup does not always mean direct communication with the model provider.
Cursor documents that requests still pass through its backend for final prompt preparation, even when developers use their own API key.
Treating Ignore Files as Complete Security Controls
An AI ignore file or content exclusion can reduce access through supported product features.
It is not a replacement for filesystem permissions, network restrictions and approved integrations.
Ignoring Extensions and MCP Servers
A coding assistant may pass information to external integrations.
Review those connections separately.
Forgetting to Recheck Policies
AI tool policies change.
A vendor may introduce new models, features, retention rules or service providers.
Schedule privacy reviews and record the policy version or review date.
How BestAIToolix Can Help With AI Coding Tool Privacy Research
BestAIToolix maintains an AI Code Assistants category featuring Claude Code, Cursor and GitHub Copilot.
Its category structure includes privacy-related attributes such as code privacy and IP controls, and whether customer data is used for AI training.
The category’s ranking methodology is currently shown as in development, with no effective version published. Therefore, its current product listings should be treated as discovery information rather than completed privacy certifications or independently verified security rankings.
Before a privacy score or comparison is published, each product should have:
- A documented product and plan scope.
- Official privacy and retention sources.
- Verified training settings.
- Relevant subprocessor information.
- Evidence of available access controls.
- A review date and policy version.
- A separate confidence assessment.
Readers can explore the AI Code Assistants category and the BestAIToolix methodology.
A privacy checklist is most useful when it leads to a documented decision, not just a collection of vendor claims.
Frequently Asked Questions
Do AI coding assistants store my source code?
It depends on the product, settings, feature and subscription. Some services process code context temporarily. Others retain conversation data, usage records or selected content for operational purposes. Read the provider’s retention policy.
Do AI coding tools use private code for model training?
Not all tools follow the same policy. Some individual plans allow data sharing unless users opt out. Some business plans exclude customer data from model training by default. Always check the exact product and plan.
Is a privacy mode enough to protect a private repository?
Privacy Mode can reduce certain data-use and retention risks. It does not remove the need for permission controls, secret management, integration reviews and security policies.
What is Zero Data Retention in AI coding tools?
Zero Data Retention is an agreement that limits the retention of specific request content. Its scope may depend on the provider, model, service and exceptions. It does not automatically mean that no information is processed or logged.
Can an AI coding assistant see my entire repository?
Some tools can access a broad project context through indexing, file search or agent workflows. The exact scope depends on permissions and product design. Check which files can be read and whether exclusions are supported.
Does using my own API key make an AI coding tool private?
Not necessarily. Some applications still send requests through their own backend, where they prepare prompts or context before using your key. Check the product’s data-flow documentation.
Can AI coding tools access .env files?
Access depends on the application, IDE, agent permissions and ignore settings. Never assume that .env files are automatically protected. Keep production credentials outside AI-accessible project directories wherever possible.
Are business and enterprise plans safer than individual plans?
They often offer stronger administration, contractual controls and organisation-wide settings. However, the actual protections vary. Review the exact terms and available controls instead of relying on the plan name.
What should companies check before allowing developers to use AI coding tools?
Review data collection, retention, training, subprocessors, access controls, integrations, contract terms and developer permissions. Obtain approval from relevant security, privacy and legal teams.
How often should AI tool privacy policies be reviewed?
Review them before initial adoption, when the vendor changes important features or terms, and periodically according to your organisation’s security requirements.
Final Thoughts
AI coding assistants can improve development workflows, but they also introduce new data-handling questions.
Before connecting a private repository, understand what information leaves the developer’s machine, how long the provider retains it, whether it can be used for model training and which third parties can access it.
Do not rely on vague promises such as “secure by design” or “enterprise ready.”
Check the specific product, plan, model and privacy setting. Restrict file access, protect credentials and review external integrations.
A responsible AI coding workflow makes privacy part of the development process, not an afterthought.
