---
title: "Is Claude Code safe for company code? | Bombos"
description: "Claude Code runs locally and sends prompts and code to Anthropic over TLS. Team, Enterprise and API data is not used for training and is kept 30 days."
image: "https://bombos.ai/assets/og-en-v2.png"
---

# Is Claude Code safe to use on company code?

Short answer

Claude Code runs on your machine and sends your prompts, the code it reads and its output to Anthropic over TLS. Under commercial terms (Team, Enterprise, API) Anthropic does not train on that data and keeps it 30 days by default. On Free, Pro, Max and Ultra, training depends on a privacy setting. Safety on the machine itself comes from permissions, deny rules, the sandbox and managed settings.

*Piet Baudoin · published November 17, 2026 · November 17, 2026*

## Two separate questions

“Is it safe” splits into two questions that a security review should keep apart:

1.  **What leaves the building?** Claude Code runs locally, but to talk to the model it sends data over the network: all prompts and model output, which includes every file and command result Claude reads. That traffic is encrypted with TLS 1.2 or higher.
2.  **What can the agent do on the machine?** Claude Code edits files and runs shell commands with your user account. That is a different risk from data leaving, and it has its own controls.

## What Anthropic does with the data, per plan

As of November 2026, the Claude Code data usage docs say:

| Account | Training on your code and prompts | Retention at Anthropic |
| --- | --- | --- |
| Free, Pro, Max, Ultra (consumer terms) | Yes, if the model-improvement setting is on | 5 years with the setting on, 30 days with it off |
| Team, Enterprise, API, cloud providers (commercial terms) | No, unless the organization opts in | 30 days standard |
| Enterprise with Zero Data Retention | No | No server-side persistence; enabled per organization by the account team after an eligibility check, not part of the standard plan |

A few things sit outside that table:

-   **Feedback.** `/feedback`, `/bug` and `/share` send the conversation, including code, and those transcripts are kept for 5 years. An optional transcript upload after the session survey is kept up to 6 months and only happens if someone clicks Yes.
-   **Telemetry.** Usage metrics never include code, prompts or file paths; error reports redact known secret patterns. `DISABLE_TELEMETRY`, `DISABLE_ERROR_REPORTING` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` switch them off.
-   **Your own disk.** Session transcripts are stored in plain text under `~/.claude/projects/` for 30 days by default. Sessions started or most recently continued in Claude Desktop or Cowork are exempt from that limit by default.
-   **Cloud providers.** Through Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry, encryption at rest follows that provider (customer-managed keys are possible), and metrics, error reports and `/feedback` are off by default.
-   **Cloud sessions.** Claude Code on the web clones the repo into an isolated VM managed by Anthropic. GitHub credentials never enter that VM; a proxy adds them server side.

## What the agent can do on the machine

The controls, from soft to hard:

1.  **Permission mode.** Since recent versions, interactive terminal and VS Code sessions start in auto mode: a separate classifier model reviews actions and blocks the ones it judges unsafe, such as `curl | bash`, production deploys or force pushes. Manual mode starts read-only and asks before every edit or non-read-only command. `Shift+Tab` switches mode. The organization can turn auto mode off. More on how it decides in [Claude Code auto mode](https://bombos.ai/en/questions/claude-code/claude-code-auto-mode/).
2.  **Deny rules.** A rule like `"deny": ["Read(./.env)", "Read(./secrets/**)"]` holds in every mode, including auto and `bypassPermissions`. Rules match tool calls, not intent: a script that opens the file is not caught.
3.  **Sandbox.** `/sandbox` puts shell commands inside an OS-enforced boundary: writes only in the working directory and a few added paths, network only to domains you allow. It is off by default, and it does not exist on native Windows (use WSL2). By default it still lets commands read most of the machine, including `~/.ssh`, unless you restrict reads.
4.  **Managed settings.** IT can push a policy from the claude.ai admin console, through MDM or as a `managed-settings.json` file. Nothing in a developer’s own settings overrides a managed key, which is where a security team puts deny rules, a required sandbox and the list of allowed MCP servers.

## The misunderstanding: “it asks before it does anything”

That used to be the default. Today a new interactive session starts in auto mode, where a model, not you, approves routine actions. Anthropic’s best-practices page says it plainly: auto mode is a classifier making judgment calls and can be wrong, so “never” rules belong in deny rules or hooks. Even in Manual mode, the working directory boundary is a permission prompt: a Bash command you approve can write anywhere your account can.

## Prompt injection

Text Claude reads, in a web page, an issue or a dependency, can contain instructions. The built-in protections: network commands like `curl` are not auto-approved by default, most web pages reach Claude as a summary from a separate model call, an untrusted folder triggers a trust dialog, and project MCP servers need their own approval. Anthropic’s own advice for untrusted content: review commands before approving, don’t pipe untrusted content straight in, and use a VM for scripts that touch external services. The docs add that no system is immune.

## What this means for a team

Commit the shared rules in `.claude/settings.json` so every clone gets them, and put what nobody may bypass in managed settings. Check that every developer is on a commercial plan: a developer using a personal Pro or Max account on company code falls under consumer terms, where training depends on that person’s own privacy setting. The [pricing page](https://bombos.ai/en/questions/claude-code/claude-code-pricing/) lists which plans are which. For the hard rules, see [Claude Code hooks](https://bombos.ai/en/questions/claude-code/claude-code-hooks/); for a broader policy on who may see what, [how to give AI agents your company context](https://bombos.ai/en/knowledge-base/how-to-give-ai-agents-your-company-context/).

## Where Bombos fits

The security settings decide what Claude Code may touch; they do not decide what it knows. Bombos is a plugin that gives Claude Code and the team’s other AI tools one shared memory, and it can run in the cloud or standalone on your own server, which matters when a security review asks where team knowledge is kept. Every answer is traceable to its source. One developer can try it on their own agents first.

## Related questions

Does Anthropic train on our code if we use Claude Code?

Not under commercial terms: Team, Enterprise, the API and cloud providers, unless your organization opts in, for example through the Development Partner Program. On Free, Pro, Max and Ultra accounts, Anthropic trains on the data when the user leaves the model-improvement setting on.

Can I stop Claude Code from reading .env files?

Yes. Add deny rules such as Read(./.env) and Read(./.env.\*) under permissions in a settings file. Deny rules hold in every permission mode, and Claude Code also applies them to common file-reading commands like cat. A script that opens the file itself is not caught, which is what the sandbox is for.

Does the sandbox work on Windows?

Not natively. On native Windows Claude Code runs shell commands unsandboxed; to use the sandbox there, run Claude Code inside WSL2. On macOS it uses Seatbelt, on Linux and WSL2 bubblewrap.

Where are transcripts stored on my own machine?

In plain text under ~/.claude/projects/, for 30 days by default, so you can resume sessions. The cleanupPeriodDays setting changes that period. Sessions started or most recently continued in Claude Desktop or Cowork are exempt from that limit by default.

Does /feedback send our code to Anthropic?

Yes. /feedback, /bug and /share send a copy of the conversation, including code, and those transcripts are kept for 5 years. Set DISABLE\_FEEDBACK\_COMMAND=1 to turn the command off.

## Sources

1.  [Claude Code docs: Security](https://code.claude.com/docs/en/security)
2.  [Claude Code docs: Data usage](https://code.claude.com/docs/en/data-usage)
3.  [Claude Code docs: Sandboxing](https://code.claude.com/docs/en/sandboxing)
4.  [Claude Code docs: Settings files and precedence](https://code.claude.com/docs/en/settings)
5.  [Claude Code docs: Best practices](https://code.claude.com/docs/en/best-practices)

## What does your AI forget?

1.  01You tell us which AI you use and where it keeps starting over.
2.  02We show what a shared memory changes there, on your own examples.
3.  03You keep the plan, with or without Bombos.

![Piet Baudoin](https://bombos.ai/assets/team/piet-klein.jpg)

**Piet Baudoin**You talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe

## More questions about Claude Code

-   [What is auto mode in Claude Code, and is it safe to use?](https://bombos.ai/en/questions/claude-code/claude-code-auto-mode/)
-   [How do I use Claude Code in VS Code and JetBrains?](https://bombos.ai/en/questions/claude-code/claude-code-in-vs-code-and-jetbrains/)
-   [What is Claude Code Remote Control and how do I use it?](https://bombos.ai/en/questions/claude-code/claude-code-remote-control/)
-   [How do I use Claude Code with GitHub, and @claude in pull requests?](https://bombos.ai/en/questions/claude-code/claude-code-github-actions/)
-   [What is Claude Code Router and should a team use it?](https://bombos.ai/en/questions/claude-code/claude-code-router/)
-   [OpenCode vs Claude Code: which coding agent should I use?](https://bombos.ai/en/questions/claude-code/opencode-vs-claude-code/)
-   [What are agent teams in Claude Code and how do you turn them on?](https://bombos.ai/en/questions/claude-code/claude-code-agent-teams/)
-   [Claude Code desktop, CLI, web or mobile: what is the difference?](https://bombos.ai/en/questions/claude-code/claude-code-desktop-vs-cli-vs-web/)

[All questions about Claude Code →](https://bombos.ai/en/questions/claude-code/)


---

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","url":"https://bombos.ai/","logo":"https://bombos.ai/assets/bombos-bee.png","description":"Bombos is the memory layer under every AI your team uses. One shared memory for Claude, ChatGPT, Copilot, Cursor and your own agents, that learns how you work.","sameAs":["https://www.linkedin.com/company/bombos-ai","https://www.youtube.com/@truebombos","https://www.instagram.com/truebombos/","https://bsky.app/profile/bombostrue.bsky.social","https://www.threads.com/@truebombos","https://mastodon.social/@Bombos","https://www.tiktok.com/@truebombos","https://t.me/truebombos","https://www.pinterest.com/truebombos/","https://github.com/bombos-ai","https://linktr.ee/bombos.ai","https://bombosai.substack.com","https://hashnode.com/@bombosai","https://hackernoon.com/u/bombos","https://dev.to/bombos"],"email":"info@bombos.ai","areaServed":["NL","Europe"],"knowsLanguage":["nl","en"],"contactPoint":{"@type":"ContactPoint","email":"info@bombos.ai","contactType":"sales","url":"https://bombos.ai/en/contact/","availableLanguage":["nl","en"]}},{"@type":"WebSite","@id":"https://bombos.ai/#website","name":"Bombos","url":"https://bombos.ai/","inLanguage":["nl-NL","en"],"publisher":{"@id":"https://bombos.ai/#organization"}}]}

{"@context":"https://schema.org","@type":"Article","headline":"Is Claude Code safe to use on company code?","description":"Claude Code runs locally and sends prompts and code to Anthropic over TLS. Team, Enterprise and API data is not used for training and is kept 30 days.","abstract":"Claude Code runs on your machine and sends your prompts, the code it reads and its output to Anthropic over TLS. Under commercial terms (Team, Enterprise, API) Anthropic does not train on that data and keeps it 30 days by default. On Free, Pro, Max and Ultra, training depends on a privacy setting. Safety on the machine itself comes from permissions, deny rules, the sandbox and managed settings.","datePublished":"2026-11-17T00:00:00.000Z","dateModified":"2026-11-17T00:00:00.000Z","author":{"@type":"Person","name":"Piet Baudoin"},"publisher":{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","logo":{"@type":"ImageObject","url":"https://bombos.ai/assets/bombos-bee.png"}},"image":"https://bombos.ai/assets/og-en-v2.png","mainEntityOfPage":"https://bombos.ai/en/questions/claude-code/is-claude-code-safe-for-company-code/","inLanguage":"en-US","isPartOf":{"@type":"CollectionPage","name":"Claude Code","url":"https://bombos.ai/en/questions/claude-code/"},"citation":[{"@type":"CreativeWork","name":"Claude Code docs: Security","url":"https://code.claude.com/docs/en/security"},{"@type":"CreativeWork","name":"Claude Code docs: Data usage","url":"https://code.claude.com/docs/en/data-usage"},{"@type":"CreativeWork","name":"Claude Code docs: Sandboxing","url":"https://code.claude.com/docs/en/sandboxing"},{"@type":"CreativeWork","name":"Claude Code docs: Settings files and precedence","url":"https://code.claude.com/docs/en/settings"},{"@type":"CreativeWork","name":"Claude Code docs: Best practices","url":"https://code.claude.com/docs/en/best-practices"}]}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Bombos","item":"https://bombos.ai/en/"},{"@type":"ListItem","position":2,"name":"Questions","item":"https://bombos.ai/en/questions/"},{"@type":"ListItem","position":3,"name":"Claude Code","item":"https://bombos.ai/en/questions/claude-code/"},{"@type":"ListItem","position":4,"name":"Is Claude Code safe to use on company code?","item":"https://bombos.ai/en/questions/claude-code/is-claude-code-safe-for-company-code/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Does Anthropic train on our code if we use Claude Code?","acceptedAnswer":{"@type":"Answer","text":"Not under commercial terms: Team, Enterprise, the API and cloud providers, unless your organization opts in, for example through the Development Partner Program. On Free, Pro, Max and Ultra accounts, Anthropic trains on the data when the user leaves the model-improvement setting on."}},{"@type":"Question","name":"Can I stop Claude Code from reading .env files?","acceptedAnswer":{"@type":"Answer","text":"Yes. Add deny rules such as Read(./.env) and Read(./.env.*) under permissions in a settings file. Deny rules hold in every permission mode, and Claude Code also applies them to common file-reading commands like cat. A script that opens the file itself is not caught, which is what the sandbox is for."}},{"@type":"Question","name":"Does the sandbox work on Windows?","acceptedAnswer":{"@type":"Answer","text":"Not natively. On native Windows Claude Code runs shell commands unsandboxed; to use the sandbox there, run Claude Code inside WSL2. On macOS it uses Seatbelt, on Linux and WSL2 bubblewrap."}},{"@type":"Question","name":"Where are transcripts stored on my own machine?","acceptedAnswer":{"@type":"Answer","text":"In plain text under ~/.claude/projects/, for 30 days by default, so you can resume sessions. The cleanupPeriodDays setting changes that period. Sessions started or most recently continued in Claude Desktop or Cowork are exempt from that limit by default."}},{"@type":"Question","name":"Does /feedback send our code to Anthropic?","acceptedAnswer":{"@type":"Answer","text":"Yes. /feedback, /bug and /share send a copy of the conversation, including code, and those transcripts are kept for 5 years. Set DISABLE_FEEDBACK_COMMAND=1 to turn the command off."}}]}
```
