The task you give an agent goes to the provider that runs the model, along with the contents of the files the agent reads. The account the agent logged in with decides which rules it's processed under there. What the agent can read, and what it can send out, comes down to the settings your company puts in place. There's a checklist at the end of the page to tick these off.
The examples come from Claude Code, Anthropic's coding agent. Most of the sources are Anthropic's and the cloud providers' own docs, and the rules change with the plan and the version.
The provider's data rules
On Team, Enterprise and API accounts and on the cloud platforms, Anthropic's commercial terms say the code and prompts sent to Claude Code aren't used for model training, unless the customer chooses to share data (data usage). Personal plans like Free, Pro and Max work differently. If the model training setting is on, Claude Code sessions go into training too and are kept for 5 years. With the setting off it's 30 days.
The standard retention for data sent to Claude Code from company accounts is also 30 days. Content flagged as violating the usage policy can be kept for up to 2 years (retention periods). Conversation history sent with the /feedback command is kept for 5 years, code included.
ZDR (Zero Data Retention) is the arrangement where prompts and responses are processed without being stored, except where the law requires it or in cases of misuse. It isn't part of the standard Enterprise plan, and there's no switch for it in the admin settings. Anthropic's account team turns it on separately for the organizations it approves. External tools connected to the agent stay outside it. That includes MCP servers, which connect the agent to outside tools (ZDR).
On Anthropic's own API the only region options are the US and global (data residency). Amazon Bedrock starts Claude Code in us-east-1 if no region is set. You can set the eu. prefix for the EU, but even then the docs describe it as a preference (Bedrock). On Microsoft Foundry, if you host the model in Azure, prompts and responses stay inside Azure. Anthropic only gets usage data and content its safety systems flag (Foundry). None of the docs this page relies on mention a region in Türkiye.
Logins are tied to the company account
If a developer logs in to Claude Code with their own Pro account, the company account's rules don't apply to that session. It's processed under the personal plan's rules and falls outside ZDR as well. Say you try things out on a personal account and move to the company one later. The company data you sent during the trial was already processed under those personal rules.
An admin can put forceLoginMethod and forceLoginOrgUUID into the managed settings they roll out. Then Claude Code shows an error and exits when someone opens it with another organization's account (authentication). These two settings reach company computers through device management, the system that pushes settings to machines remotely. If you use Console, Anthropic's developer dashboard, someone with the Claude Code role can only create API keys for Claude Code. Someone with the Developer role can create any kind of key. Give the person setting up the agent the Claude Code role.
Keys are kept short-lived
An API key is the secret the agent uses to connect to a system. The OWASP (Open Worldwide Application Security Project) secrets management cheat sheet lists keys sitting in plain text inside source code as a problem seen in many organizations. It recommends replacing keys with new ones on a regular basis and, where possible, creating them so they stop working after a set time.
To write down what the agent can touch with least privilege, so it gets only as much access as its job needs, follow the permission list guide.
Secret files and outbound network traffic
This section and the last paragraph of the prompt injection section are about Claude Code settings. If you won't be the one setting them up, leave both to whoever will and skip ahead to session transcripts.
From v2.1.283 on, Claude Code opens in a permission mode called auto. In this mode a separate model reviews any action the rules don't settle, before it runs (permission modes). That model's default allowances include reading the .env file where keys live and sending a key to the API it belongs to. What it blocks by default is writing a live key into a file or into the session transcript (the written record of the session), and sending secrets to the repo. The thing that closes .env to Claude Code's file read tool is a Read deny rule in the permission list, and its limit is written there too.
The sandbox is a boundary the operating system draws around the commands Claude Code runs in the terminal. It starts off. You turn it on with the /sandbox command or the sandbox.enabled: true setting (sandbox). Even with it on, those commands can read most of the machine by default, credential files like ~/.ssh and ~/.aws/credentials included. File paths you list under sandbox.credentials with "mode": "deny" are closed to reading, and the environment variables you list there are removed before a command runs. This setting doesn't take effect from the project or local settings file. It has to go into the managed or user settings. Claude Code's tools for reading files, fetching web pages and MCP sit outside the sandbox, and permission rules are what limit them.
With the sandbox on, there's no direct way out to the network. Every connection goes through a proxy on the machine, a layer in between that checks the address against a list of allowed domains. That list starts empty.
Session transcripts left on the machine
Claude Code keeps the transcript of every session in plain text under ~/.claude/projects/, on whichever machine the session ran, for 30 days by default. The cleanupPeriodDays setting decides how long (data usage). Customer data or a key that came up in a session sits in that transcript as well.
If an outside consultant or developer is setting up the agent at your company, my suggestion is to have them do the setup and the trial sessions on a company machine with the company account. If they have to work on their own machine, put it in the contract that they delete that project's transcripts once the job is done.
The agent's actions go into a log
The guide Anthropic wrote for security leaders recommends that an agent's actions can be told apart from a person's. The cloud provider's records keep the model calls. How to keep what the agent did in a separate log is in the agent log guide.
Questions for your lawyer on Turkish data protection law (KVKK)
This section isn't legal advice. Art. 3 (in Turkish) of Law No. 6698 on the Protection of Personal Data (KVKK) counts any operation performed on personal data as processing, transfer included. If the agent reads a file with personal data in it, that data goes to the model too. Art. 12 requires the data controller to take every technical and administrative measure needed. The data controller is the company that decides why and how the data is processed. If someone processes the data on its behalf, the two are jointly responsible for those measures. Under Art. 10 the data subject, the person whose data is processed, is also told who the data may be transferred to.
For transfers abroad, Art. 9 asks for one of the appropriate safeguards when there's no adequacy decision. That's a decision by the Personal Data Protection Board that a country has adequate protection. A standard contract announced by the Board is one of those safeguards, and it's reported to the Personal Data Protection Authority within five business days of signing. The Authority's undated page on transfers abroad (in Turkish) says the Board hasn't named any such country yet. Anthropic's DPA (Data Processing Addendum) is based on the EU's standard contractual clauses, and KVKK doesn't appear in its text (DPA). My reading is that the Art. 9 question stays open on every route, because the docs this page relies on don't mention a route that processes data inside Türkiye.
- Which appropriate safeguard does the transfer to the agent's provider rely on?
- If a standard contract is needed, who is it signed with, and who reports it to the Authority?
- Does the data protection notice name the model provider as a recipient of transfers?
- How long will personal data stay in the log and in session transcripts?
Prompt injection and data leaking out
Anthropic defines prompt injection as malicious instructions hidden in the content an agent processes. In the example from its post on trustworthy agents, an agent searching an inbox runs into an email telling it to forward the last ten messages to an attacker. The same post says the defenses aren't a guarantee.
By default, Claude Code's auto mode tries to block actions that look steered by hostile content it read, and tries to block sending sensitive data to outside addresses. A model is doing this, so it doesn't count as a hard boundary. When it refuses, the notice shows a rule name like [Data Exfiltration] (auto mode settings). For an action that must never run under any condition, the docs recommend permissions.deny in the managed settings.
My suggestion is to never treat an email or a web page the agent reads as a source that can hand it work, and to accept that the agent may still follow an instruction from there one day. In practice that means every outgoing communication passes an approval gate, the point where work waits for a person before it goes out. That covers emails, messages, pushing code to the remote repo and automatic notifications to another system. Claude Code doesn't set this up on its own. A permissions.ask rule for git push and gh pr create in the settings file asks for approval on those commands. The variants the rule doesn't catch are in the permission list guide.
Checklist
| Topic | What to check | Where |
|---|---|---|
| Account and role | Agents run on the company account, members sign in with SSO (single sign-on), the person setting up the agent has a narrow role | Plan, member list, Console roles |
| Login | Claude Code opens only with the company's organization | Managed settings rolled out through device management, forceLoginOrgUUID |
| Region | The region where data is processed is chosen | inference_geo on the API, the cloud provider's region setting |
| Keys | No keys in the code, and every key that can have an expiry date has one | The company's secrets vault |
| Permissions | What each agent can touch is written down | Permission list |
| Database | The agent has its own read-only user on the production database (my suggestion) | Database user settings, OWASP agentic list |
| Sandbox | The sandbox is on | /sandbox, sandbox.enabled |
| Secret files | .env and credential files are closed to the agent | Read deny, sandbox.credentials |
| Outgoing work | The agent connects only to the addresses it needs, and anything it sends waits for approval | Sandbox domain list, approval gate |
| Feedback | /feedback is off in the company setup | DISABLE_FEEDBACK_COMMAND=1 |
| Log | The agent's actions are in a separate record, the model calls in the provider's record | Agent log, CloudTrail or Azure Monitor on the cloud route |
| Local records | Transcripts have a set lifetime, and an outside contractor's get deleted | cleanupPeriodDays, contract |
| Contract | The DPA is read, the need for ZDR and the KVKK questions are raised | Anthropic account team, your lawyer |
Where to go from here
Write which agent can touch what into the table in the permission list guide. The approval gate guide covers whose approval outgoing work waits for.
If you want to set this up together in your company, the AI-native company page explains how it goes.