Tech Update / Adventures with Claude Code #33
Where does my code go? Data privacy with Claude Code
After "What is Claude actually allowed to do?" (part 7), every company asks the second question: "And where does our code end up?"
The answer mostly depends on which account you work with.
🧾 What is transmitted
Claude Code runs locally. What goes to the model is your prompts and everything Claude reads for them: files, command output. Encrypted with TLS. So what is sent is what Claude touches, not the whole repository wholesale.
🎓 Is it used for training?
- Team, Enterprise and API: no, unless you explicitly opt in.
- Free, Pro and Max: you decide with a switch in the privacy settings.
🗓️ How long is it kept?
- Commercial plans: 30 days by default.
- Personal plans: 30 days without training consent, up to five years with it.
- Zero data retention is only available to qualified Enterprise customers, and Anthropic enables it per organisation. Cloud sessions, Remote Control and
/feedbackare switched off in that case.
💾 And locally?
Session transcripts sit in plain text under ~/.claude/projects/, for 30 days by default. You control the period with cleanupPeriodDays.
📡 Telemetry
Usage metrics contain neither code nor prompts. You can switch them off all the same:
DISABLE_TELEMETRY=1
DISABLE_ERROR_REPORTING=1
Or everything non-essential at once with CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC. If you'd rather stay within your own cloud contract, run Claude Code through Amazon Bedrock, Google Cloud or Microsoft Foundry.
A word of caution:
This post doesn't replace a data protection review. Data processing agreements, international transfers and the question of what may go into a prompt are things to settle with your data protection officer. Also: /feedback sends the conversation including code to Anthropic, where it is kept for five years. And MCP servers and plugins (parts 5 and 14) have data flows of their own.
My rule of thumb:
- Company code? A commercial plan, not your personal account.
- Don't make secrets readable in the first place: deny rules (part 7) and a mod (part 2).
/feedbackonly if the transcript is allowed to leave the building.
Deutsch
English