AI coding agents and HIPAA: which offer a BAA
Published
Summary
Which AI coding agents offer a HIPAA BAA and what each covers, where PHI can go when an agent works on your code, and what to ask a vendor.
A coding agent working on a health company's codebase reads more than code. It opens seed files, runs queries, tails logs, and reads the ticket it was given, then sends what it read to a model to decide what to do next. If any of that holds protected health information (PHI), every service in that path needs a HIPAA Business Associate Agreement (BAA), or has to be kept away from PHI.
Vendor terms change often, so every claim about a vendor below links to its own page. We checked them all on October 25, 2026.
This is an engineering guide, not legal advice. Check your plan with your own counsel.
Coding agents that offer a HIPAA BAA
In alphabetical order:
| Agent | BAA from | What it covers | What it doesn't cover |
|---|---|---|---|
| Claude Code | Anthropic, on a Claude Enterprise plan with the HIPAA configuration, or a Console API key from an organization with zero data retention | The terminal and Claude Desktop's Code section, connecting directly to Anthropic (Anthropic) | The VS Code and JetBrains extensions, cloud sessions, and sessions through Bedrock or an LLM gateway |
| Cursor | Cursor, on Enterprise, with Privacy Mode locked on | Desktop IDE, CLI, Cloud Agents, BugBot, Automations, and the iOS app (Cursor) | Third-party services, and models outside Cursor's eligible list |
| Factory | Factory, through sales | Not published. Factory offers BAAs to healthcare customers (Factory), and its terms allow PHI only under a separate BAA (Factory) | Not listed. Confirm the products and models in your contract |
| Gemini Code Assist | Google, under a Google Cloud BAA | Gemini Code Assist, and Antigravity in Gemini Enterprise (Google Cloud) | Google's Gemini certifications don't apply to Code Assist on GitHub (Google Cloud) |
| Kiro | AWS, under an AWS BAA | Kiro IDE and CLI (Kiro) | Kiro Web |
| OpenAI Codex | OpenAI, with ChatGPT for Healthcare, ChatGPT for Clinicians, or a Regulated Workspace, or the API with Modified Retention | CLI, IDE extension, and desktop app (OpenAI) | Codex cloud, per OpenAI's Codex HIPAA guide |
| Replicas | Replicas, on Enterprise | Cloud agents such as Claude Code and Codex, run in Replicas workspaces (Replicas) | Your model provider, which needs its own BAA |
We also checked these. Their own docs keep PHI out unless you have a separate agreement:
- GitHub Copilot. GitHub's Data Protection Agreement, which applies to Copilot, says customers shall not provide PHI "except with GitHub's prior, written, and specific consent."
- Devin, and Devin Desktop (formerly Windsurf). Cognition's Acceptable Use Policy lists PHI as prohibited data "unless you have entered into a separate written agreement with Cognition expressly permitting such use."
- Amazon Q Developer. It isn't on AWS's HIPAA-eligible services list. Kiro is.
If you run an open-source agent such as OpenCode or Cline on your own machines with your own model credentials, no agent vendor sees the data. The model provider still does.
Where PHI can go when an agent works on your code
Under HIPAA, a vendor that creates, receives, maintains, or transmits PHI for you is a business associate, and so is any vendor it passes that PHI to. Storing only encrypted PHI without the key doesn't change that (HHS). Source code alone is rarely PHI, but agents reach much more than source code: seed data and fixtures, staging copies of production data, logs, tickets, and screenshots in bug reports.
Once an agent has read something, it can send it to any of these:
| Where it goes | How PHI gets there | What you need |
|---|---|---|
| Model provider | Every turn sends the files the agent read, command output, and your messages | A BAA with the provider, for the exact product and setup you use |
| Agent host | The repo, terminal, and transcript live wherever the agent runs: a laptop, CI, or a vendor's cloud | Your own controls on your machines, or a BAA with the vendor that hosts it |
| Integrations and MCP servers | The agent can pass anything it has read to a tool it calls | A BAA with each one, or keep them off where PHI can appear |
| Logs, error tracking, and analytics | A vendor's telemetry can capture prompts, page titles, or command output | Ask what the vendor's telemetry collects, and whether those services are under its BAA |
| Code host | Commits, pull request text, and comments the agent writes | Your code host's terms, which may not allow PHI |
You can either keep PHI out of everything the agent can reach, with synthetic or de-identified data and no production credentials, or put every stop in that table under a BAA. The first holds only as long as your controls do, because an agent goes wherever its tools let it.
Model providers
When the agent and the model come from different companies, the agent vendor's BAA doesn't cover the model, so you need a BAA with whoever runs it. Claude Code and Codex fall under Anthropic's and OpenAI's own BAAs. Either way, every credential the agent can use, including personal logins and fallbacks, has to be covered.
Anthropic's BAA
Anthropic signs a BAA for its HIPAA-ready services, including its first-party API and Claude Enterprise (Anthropic). For Claude Code:
- On Claude Enterprise with the HIPAA configuration, the BAA covers Claude Code on members' own computers, when they sign in with the Enterprise account and connect directly to Anthropic (Anthropic).
- With a Console API key, the BAA covers Claude Code only if that organization has zero data retention. HIPAA readiness on the API alone doesn't extend to Claude Code (Anthropic).
- Through Amazon Bedrock or another cloud provider, that provider's BAA applies, not Anthropic's. AWS lists Bedrock as HIPAA-eligible.
Claude zero data retention
With zero data retention, Anthropic doesn't store prompts or responses after the response is returned, except where needed to comply with law or combat misuse. Your Anthropic account team turns it on per organization (Anthropic). Covered Models such as Claude Fable 5 need 30-day retention, so they aren't available under zero data retention unless Anthropic authorizes it (Anthropic).
OpenAI's BAA
OpenAI's HIPAA-eligible products are ChatGPT for Healthcare, ChatGPT for Enterprise with Regulated Workspace, ChatGPT FedRAMP, ChatGPT for Clinicians, and the API with Modified Retention (OpenAI). The API needs a signed BAA and an organization provisioned with Modified Retention. Codex is covered when it's signed in to a HIPAA-eligible ChatGPT workspace, or used with an API key under that BAA. OpenAI's Codex guide says the BAA doesn't cover Codex cloud, while its help center lists cloud Codex as covered, so get that answer in writing (OpenAI).
Without zero data retention or Modified Abuse Monitoring, OpenAI keeps API abuse-monitoring logs, which can include prompts and responses, for up to 30 days (OpenAI).
Questions to ask an agent vendor
Ask these of any vendor, us included:
- Will you sign a BAA, and on which plan?
- Which services handle workspace data (hosting, storage, logs, analytics, error tracking, email), and does each have a BAA with you?
- What gets turned off for a BAA account, and is it also hidden from the agent?
- Whose model account does the agent use, and can a personal login or a fallback route around it?
- What happens if the check for "is this a BAA account" fails?
- How long are transcripts kept, and can you turn that off?
Where Replicas fits
Replicas signs a HIPAA BAA on Enterprise plans, and is SOC 2 Type I, with Type II in progress. You can request the report on our Trust Center. No certification makes a product HIPAA compliant, and compliance is shared. Our BAA covers what Replicas does with PHI. You still need a BAA with your model provider, and you decide what the agent can reach. Some features aren't available under a BAA. Our Data Processing Agreement covers personal data more broadly.
If you're working through this for your team, see what Enterprise includes.
FAQ