Is Claude Code safe for work?
15 min read
Is Claude Code safe for work? A dated table of what Anthropic stores by plan, API key, Bedrock and gateway, plus telemetry, permissions and a rollout checklist.
Yes, on a commercial account with managed settings in place. Claude Code's data terms follow the account or key it signs in with, so the same tool trains Anthropic's models on a personal Pro login and is barred from doing so on a Team seat. The short answer, as of 15 November 2026:
How Claude Code is billed | Safe for company code? | Why |
|---|---|---|
Pro, Max or Ultra subscription | No | Consumer terms. Code and prompts train Anthropic's models unless the developer opts out. While training is on they are kept for up to five years. No admin, no central policy. |
Team or Enterprise seat | Yes | Commercial terms, no training, 30-day retention, SSO, settings pushed from the admin console. Enterprise adds SCIM, a Compliance API and, for qualified accounts, zero data retention. |
API key from Claude Console | Yes, with device policy | Commercial terms, no training, 30-day retention, zero data retention on approval. Settings made in the claude.ai admin console do not reach these sessions. |
Amazon Bedrock or Google Cloud | Yes | The cloud provider processes the data in the region you choose. Telemetry to Anthropic is off by default. Policy comes from MDM or a file. |
A gateway to your own models | Depends on the gateway | Prompts go where the gateway sends them. Anthropic does not support non-Claude models through a gateway, and usage metrics still go to Anthropic until you turn them off. |
Everything below is drawn from Anthropic's documentation, read on 15 November 2026 and linked at the end. The plan terms for the Claude apps are in Is Claude safe for work?
What Anthropic stores and for how long, by deployment
Pro, Max, Ultra | Team, Enterprise | API key | Bedrock, Google Cloud | Gateway to your own models | |
|---|---|---|---|---|---|
Terms | Consumer Terms | Commercial Terms | Commercial Terms | Your agreement with AWS or Google | Whatever sits behind the gateway |
Trains on your code | Yes, when the model improvement setting is on | No | No | No | Prompts do not reach Anthropic's models |
Retention at Anthropic | 5 years with training on; 30 days with it off | 30 days | 30 days | Set by the cloud provider, which is the data processor | None for prompts |
Zero data retention | No | Enterprise only, for qualified accounts, enabled by Anthropic. Not on Team | On approval, per organisation | Subject to your cloud agreement | Not applicable |
Where inference runs | Anthropic. Regions are not stated for consumer plans | Anthropic: may route to the US, Europe, Asia and Australia. Enterprise can set US-only inference | Same as Team. | The region you choose, including UK and EU regions | Where your model runs |
Telemetry to Anthropic by default | Usage metrics on. Error reports on from v2.1.198 | Usage metrics on. Error reports off | Usage metrics on. Error reports off | Off | Usage metrics on for a custom |
Central policy | Device only: MDM or a file | Server-managed settings from the admin console, plus device policy | Device policy | Device policy, or a Claude apps gateway | Device policy. Server-managed settings are bypassed |
Audit trail | None | Analytics dashboard; OpenTelemetry export; Compliance API on Enterprise | Console analytics; OpenTelemetry export | CloudTrail or Cloud Audit Logs; OpenTelemetry export | Gateway logs; OpenTelemetry export |
Price | $20 a month, or $17 billed annually; $100; $200 | Team $25 per seat, or $20 annual; premium seat $125, or $100. Enterprise $20 per seat plus usage at API rates | Usage-based | Billed by AWS or Google | Your hardware or provider |
Prompts and model outputs travel over TLS 1.2 or higher. On Anthropic's API they sit on disks encrypted with AES-256. Zero data retention on Enterprise covers Claude Code inference only. It switches off cloud sessions, Remote Control and the /feedback command, and the Fable models need 30-day retention.
What stays on the developer's machine
Claude Code stores session transcripts in plaintext under ~/.claude/projects/ for 30 days by default. Change the period with cleanupPeriodDays. Credentials go into the macOS Keychain, or a file with mode 0600 on Linux.
Three features move a session onto Anthropic's servers. Cloud sessions clone the repository into an Anthropic-managed virtual machine and store the transcript. Remote Control stores the transcript while a session is connected. /feedback, /bug and /share send the conversation, code included, and Anthropic keeps it for 5 years. On Team and Enterprise an Owner switches cloud sessions and Remote Control on or off for the organisation.
Telemetry and how to turn it off
Claude Code sends Anthropic two kinds of operational telemetry.
Usage metrics: latency, reliability and usage patterns. Anthropic states they never include code, prompts or file paths.
DISABLE_TELEMETRY=1turns them off.Error reports: error messages and stack traces from Claude Code itself, with known secret patterns, file paths and email addresses redacted. On only for Pro, Max and Ultra sign-ins.
DISABLE_ERROR_REPORTING=1turns them off.
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 turns off both, plus auto-updates, the /feedback command, release notes and session surveys. To apply it to every developer, deliver the variable through managed settings. Anthropic's example:
{ "env": { "DISABLE_TELEMETRY": "1" }}
Three things to know first. Turning telemetry off also stops feature-flag fetching, which can make Remote Control unavailable, and it empties the analytics dashboard for those developers. The WebFetch tool still sends each hostname, never the full URL, to api.anthropic.com for a blocklist check on every provider; skipWebFetchPreflight: true in settings stops it. And on Bedrock and Google Cloud, metrics, error reports and /feedback uploads are already off.
Your own monitoring is separate. Claude Code can export metrics and events to an OpenTelemetry collector you run, which is the audit source for tool calls and permission decisions. It is opt-in and goes only to your endpoint. Prompt text, tool arguments and file contents are left out unless you set the OTEL_LOG_* variables.
Permissions and sandboxing
A permission mode sets what Claude Code may do without asking. In Manual mode it reads files and asks before it edits, runs a shell command or reaches the network. In auto mode a second model, a classifier, reviews actions in place of the developer. Since v2.1.283 auto mode is the starting mode for interactive terminal and VS Code sessions on every plan and provider, where a supported Claude model is in use. Anthropic's own warning is that auto mode "does not guarantee safety".
For company code:
Set
permissions.disableAutoModeto"disable"in managed settings if you want every action reviewed.Set
permissions.disableBypassPermissionsModeto"disable". Bypass mode runs every tool call without a check and is meant for isolated containers only.Add deny rules for secrets. Deny rules block in every mode.
Review broad allow rules and who can change them. A routing rule does not replace these controls: a model on an approved device can still propose a destructive command.
The Bash sandbox is a separate layer that the operating system enforces. It limits which files and network domains shell commands can reach. It is off by default, runs on macOS, Linux and WSL2, and does not run on native Windows. It covers shell commands only. The Read, Edit and WebFetch tools, MCP servers and hooks run outside it. To require it for everyone, Anthropic's managed example is:
{ "sandbox": { "enabled": true, "failIfUnavailable": true, "allowUnsandboxedCommands": false }}
Anthropic says the sandbox "is not a complete isolation boundary". Its proxy does not inspect TLS, so a broad allowed domain such as github.com can become a path out. For a boundary around the whole process, run Claude Code in a container or a virtual machine.
Managed settings
Managed settings sit above user and project settings, so a developer or a repository cannot override them. There are four ways to deliver them:
Mechanism | Where it lives |
|---|---|
Server-managed | claude.ai admin console (Team and Enterprise), fetched at startup and hourly |
MDM or OS policy | macOS |
File | macOS |
Windows user registry |
|
Anthropic's starter file blocks two file reads, turns off bypass mode and ignores permission rules from every other source:
{ "permissions": { "deny": [ "Read(./.env)", "Read(./secrets/**)" ], "disableBypassPermissionsMode": "disable" }, "allowManagedPermissionRulesOnly": true}
Keys worth adding: forceLoginMethod and forceLoginOrgUUID to stop sign-ins from personal accounts, allowedProviders to refuse any provider you have not approved (v2.1.285 or later), and allowManagedMcpServersOnly to limit MCP servers. Run /status to confirm that Setting sources shows Enterprise managed settings.
One limit matters for approval. Anthropic describes server-managed settings as "a client-side control, not a security boundary". They are skipped when a session uses Bedrock, Google Cloud or a non-default ANTHROPIC_BASE_URL. On devices you manage, the MDM or file route is stronger because the user cannot edit it.
The risks that stay, whatever the deployment
Repositories that carry configuration. On 25 February 2026 Check Point Research published three flaws in which a cloned repository ran commands or stole an API key through its .claude/settings.json and .mcp.json files. CVE-2025-59536 let MCP server commands run before the trust dialog. CVE-2026-21852 let a repository set ANTHROPIC_BASE_URL and receive the developer's API key. Anthropic fixed all three between August and December 2025. Keep Claude Code updated, and set requiredMinimumVersion to enforce it.
Sandbox bypasses. SecurityWeek reported on 20 May 2026 that a null byte in a hostname got past the sandbox's domain allowlist. Anthropic says the fix shipped in Claude Code 2.1.88 on 31 March 2026.
Prompt injection. A file, web page or tool result can carry instructions. Treat untrusted repositories and tool output as input.
MCP servers. Anthropic states that it does not security-audit or manage any MCP server. Each one has its own data flow.
Personal logins. A developer who signs in with a personal account moves the session onto consumer terms. The managed login keys above prevent it.
Deployment checklist
Separate three boundaries. Review each on its own.
What the agent can access. Give it a clean working copy without production credentials, customer exports or unrelated repositories. Count what build scripts, plugins and MCP servers can reach.
Where model requests are processed. Requests carry the prompt, selected source files, tool output and conversation context. Write the rule as an allowed destination list and a failure condition, such as "only this device may process the request; if it cannot, stop". Apply it to fallback routes too.
What the application and its tools send or store. Session history, diagnostic uploads, updates and sign-in are separate from inference.
Define an approval you can test. Agree these with the person responsible for the code:
Allowed data: a named repository or class of information, with excluded files and secrets identified.
Allowed processing: this device only, named internal machines, or named provider accounts, with any geographic limits.
Allowed actions: whether the agent may edit files, install dependencies, run shell commands or use external tools.
Failure behaviour: which alternative destinations are permitted, and when the request must fail.
Evidence: application and runtime versions, model identifier, effective policy, request destination and the approver.
Run this acceptance test before using confidential code. Use a small synthetic repository, with no real secrets or customer data.
Prove the intended path. Ask for an explanation of a harmless function. Run
/statusto confirm the provider and base URL. If you route through Aventail™, check the model, machine and routing outcome in Recent usage. A model name shown in the app is not sufficient evidence.Prove the stop condition. With only local execution permitted, stop serving the local model and send another harmless request. It should fail.
Check the wider network boundary. Review endpoint network records and account for connections that are not inference.
Check an action boundary. Make a harmless edit in a disposable working copy and confirm the reviewer sees what will happen before approving.
Check storage and reporting. Inspect where sessions and diagnostic records are kept, who can read them and how they are removed.
Keep a short evidence record: versions, the test, the effective rule, the observed destination and any failure. Repeat after any change to the app, model or policy.
Decide whether to widen the pilot. Expand only after the permitted task works and the failure tests behave as intended. Assign an owner for policy distribution, model updates and removing leavers and their devices. Our guide to deploying a private AI workspace covers a staged rollout.
Keep model requests on approved models
Some repositories cannot go to any external provider. For those, Claude Code can run on a model you host.
Aventail™ Connect configures Claude Code to send its model requests through Aventail™ Link, an inference engine and gateway that runs on each machine. Install Link, serve a compatible model and enable Claude Code in Connected Apps. Choose the model in Link, then open a fresh Claude Code session. There is no endpoint to set and no key to paste, and this path does not need an Anthropic account. The model needs at least 64K of context.
To keep processing on the device, permit only On device in the routing policy, and check inherited policies and fallback paths. If no destination is permitted or available, the request fails. It is not sent to a disallowed destination. Recent usage in Control shows where each request ran. Hosted Control receives management, device and routing events, and prompts and responses do not pass through it.
That gives a team two lanes: Claude Code on Team or Enterprise seats for general code, and Claude Code through Aventail™ for restricted repositories.
Three limits. Connect governs model requests only, so permissions, telemetry and storage still need the settings above. Signing in to Control does not protect a model's serving port, so start with loopback access. And Anthropic does not support non-Claude models through third-party gateways, so features depend on the model and the Claude Code version.
The free plan covers three connected devices. Routing policies are set in Control for Enterprise; personal Control has no routing-policy interface yet. Setup steps are in Claude Code with Aventail™ Connect, and rule design is in Route local models and cloud APIs.
Frequently asked questions
Does Anthropic train on Claude Code data?
On Free, Pro, Max and Ultra accounts, yes, when the model improvement setting is on. On Team, Enterprise, API keys, Bedrock and Google Cloud, no, unless the organisation opts in to a programme such as the Development Partner Program.
Does Claude Code send my code to Anthropic?
It runs on your machine and sends prompts, the files it reads and tool output to the model provider. That is Anthropic unless you use Bedrock, Google Cloud or a gateway.
Can I turn off Claude Code telemetry?
Yes. Set DISABLE_TELEMETRY=1, or CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 to stop every optional connection. Deliver it through managed settings.
Can I use a Pro or Max subscription for work code?
Not for company code. Those plans sit under the Consumer Terms, the training setting belongs to the developer, and you cannot push policy from an admin console.
Where does Claude Code keep conversation history?
In plaintext under ~/.claude/projects/ on the developer's machine, for 30 days by default. Anthropic holds prompts and outputs for 30 days on commercial accounts.
Can Claude Code use confidential source code without sending model requests to a public API?
Yes, for a supported application and model configuration that keeps processing on approved compute. Configure and test the routing policy, then review application storage, permissions and other network activity separately. Anthropic's Claude model weights do not run locally.
Does Aventail™ Connect control every connection Claude Code makes?
No. Connect brings supported model requests into Aventail Link. File access, shell actions, telemetry and other app or tool connections need their own controls.
Is a successful local response enough for security approval?
No. Check what happens when local serving is unavailable, inspect inherited and fallback rules, and review the other two boundaries.
Related guides
Is Cursor safe for work?
Is Codex safe for work?
Sources
All read on 15 November 2026.
Anthropic, Claude Code data usage: https://code.claude.com/docs/en/data-usage
Anthropic, Security (Claude Code docs): https://code.claude.com/docs/en/security
Anthropic, Zero data retention: https://code.claude.com/docs/en/zero-data-retention
Anthropic, Legal and compliance: https://code.claude.com/docs/en/legal-and-compliance
Anthropic, Set up Claude Code for your organization: https://code.claude.com/docs/en/admin-setup
Anthropic, Deploy managed settings: https://code.claude.com/docs/en/managed-settings
Anthropic, Server-managed settings: https://code.claude.com/docs/en/server-managed-settings
Anthropic, Settings: https://code.claude.com/docs/en/settings
Anthropic, Monitoring: https://code.claude.com/docs/en/monitoring-usage
Anthropic, Permissions and permission modes: https://code.claude.com/docs/en/permissions and https://code.claude.com/docs/en/permission-modes
Anthropic, Sandboxing: https://code.claude.com/docs/en/sandboxing
Anthropic, Enterprise deployment overview: https://code.claude.com/docs/en/third-party-integrations
Anthropic, Gateways and other LLM gateways: https://code.claude.com/docs/en/gateways and https://code.claude.com/docs/en/llm-gateway
Anthropic, Feature availability: https://code.claude.com/docs/en/feature-availability
Anthropic, Enterprise network configuration: https://code.claude.com/docs/en/network-config
Anthropic, Environment variables: https://code.claude.com/docs/en/env-vars
Anthropic, Authentication: https://code.claude.com/docs/en/authentication
Claude Platform docs, API and data retention: https://platform.claude.com/docs/en/manage-claude/api-and-data-retention
Claude Platform docs, Data residency: https://platform.claude.com/docs/en/manage-claude/data-residency
Privacy Center, How long do you store my organization's data?: https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data
Privacy Center, Where are your servers located?: https://privacy.claude.com/en/articles/7996890-where-are-your-servers-located-do-you-host-your-models-on-eu-servers
Claude Help, Enable US-only inference for your organization: https://support.claude.com/en/articles/15422948-enable-us-only-inference-for-your-organization
Claude docs, Claude Desktop on third-party platforms (regions on Bedrock and Google Cloud): https://claude.com/docs/third-party/claude-desktop/overview
Claude pricing: https://claude.com/pricing
Anthropic, Commercial Terms of Service and Consumer Terms of Service: https://www.anthropic.com/legal/commercial-terms and https://www.anthropic.com/legal/consumer-terms
Anthropic Trust Center: https://trust.anthropic.com/
Check Point Research, RCE and API token exfiltration through Claude Code project files (25 February 2026): https://research.checkpoint.com/2026/rce-and-api-token-exfiltration-through-claude-code-project-files-cve-2025-59536/
SecurityWeek, Anthropic silently patches Claude Code sandbox bypass (20 May 2026): https://www.securityweek.com/anthropic-silently-patches-claude-code-sandbox-bypass/
Aventail™, Connect overview: https://docs.aventail.co.uk/docs/connect/overview
Aventail™, Routing: https://docs.aventail.co.uk/docs/fleet/routing
Aventail™, Security and access: https://docs.aventail.co.uk/docs/guides/security
Aventail™, Architecture and data flow: https://docs.aventail.co.uk/docs/introduction/platform-architecture
Aventail™, Usage analytics and privacy: https://docs.aventail.co.uk/docs/privacy/usage-analytics
Aventail™, Trust: https://aventail.co.uk/trust
Aventail™, home page plans: https://aventail.co.uk/