Coding agents and AI tools

Is Claude Code HIPAA Compliant? Does Anthropic Sign a BAA for Claude Code?

Last reviewed: . Vendor facts checked against each vendor's own pages on the dates shown.

Short answer: Only in narrow setups. On Claude plans, Claude Code falls under Anthropic's BAA only on Enterprise with HIPAA turned on, plus either a separate HIPAA configuration (terminal use only) or zero data retention (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026). Free, Pro, Max, Ultra and Team plans cannot enable HIPAA. Build with synthetic patients, and keep real patient data in BAA-covered services.

Claude Code is Anthropic's coding agent. You describe what you want in plain English, and it reads your project, writes code and runs commands on your computer. You may have moved to it once your app outgrew a browser-based builder. Either way, the question is whether patient information can go into it.

Two terms first. PHI (protected health information) is health information that identifies a patient. A BAA (business associate agreement) is the contract HIPAA requires before an outside company handles PHI for your practice. Everything below about Claude Code comes from Anthropic's own pages, checked November 15, 2026.

What Anthropic says, in its own words (checked November 15, 2026)

Anthropic does sign a BAA, for some products. Its privacy center says:

“Anthropic provides a BAA covering our HIPAA-ready services, such as use of our first-party API, Claude in Microsoft Foundry, or Enterprise plans.”

Claude Code is not on that list by name, and it is not covered just because you pay for it. Team and individual plans cannot turn HIPAA on at all: “Team plans and individual plans (Free, Pro, Max, and Ultra) can't enable HIPAA.” (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026)

On Enterprise, turning on HIPAA is not enough for Claude Code. This is the sentence that matters most on this page:

“Important: Enabling HIPAA alone doesn't bring Claude Code or Cowork under your BAA. The Primary Owner must also apply the HIPAA configuration to Claude Code (local mode) and Cowork (local mode). This configuration is currently only available to organizations with an Anthropic account team.”

The other route Anthropic describes is zero data retention (ZDR), which Anthropic's docs describe as no server-side persistence of your data (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026). Enterprise organizations without the HIPAA configuration still need ZDR for Claude Code to be covered by the BAA (Anthropic, Zero data retention - Claude Code Docs, verified November 27, 2026). ZDR is not part of the standard Enterprise plan, cannot be switched on from admin settings, and has to be enabled by Anthropic for qualified accounts (Anthropic, Zero data retention - Claude Code Docs, verified November 27, 2026).

With the HIPAA configuration, only one way of running Claude Code is covered. Once the configuration is applied, Claude Code in the terminal is covered only when members sign in with their Claude Enterprise account and connect directly to Anthropic, not through a cloud provider or gateway (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026). Anthropic lists what stays outside the BAA:

Two Anthropic pages read differently on API keys. A Claude Console API key is a developer key from Anthropic's Claude Console, rather than a plan sign-in. The privacy center's coverage table says: “Claude Code with a Claude Console API key ✅ Eligible only with ZDR enabled” (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026) Anthropic's API documentation says: “Claude Code: Claude Code is not covered under HIPAA readiness.” (Anthropic, API and data retention - Claude Platform Docs, verified November 27, 2026) If you plan to run Claude Code on an API key with real patient data, get Anthropic's answer in writing first.

Who signs, and how. On Enterprise, the organization's Primary Owner must turn on HIPAA under Data and privacy and accept the BAA; standard Enterprise plans have no BAA coverage until then (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 27, 2026). Anthropic calls it a one-way decision that cannot be reversed from organization settings (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026). A Claude API BAA signed before December 2, 2025 covers API usage only and does not extend to the Enterprise plan (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026).

What happens to your prompts and code

Claude Code runs on your computer, but the AI model it talks to does not. Anthropic says it sends all user prompts and model outputs over the network, encrypted in transit (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026). What happens next depends on your plan:

Which Claude Code setup can touch patient data?

Here is the same information as a lookup. Find the row that matches how you actually run Claude Code today.

How you run Claude CodeCan it cover PHI under Anthropic's BAA?
Signed in with Free, Pro, Max or UltraNo. These plans cannot enable HIPAA (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026).
Signed in with a Team seatNo (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026).
Enterprise seat, HIPAA turned on, nothing elseNo. Claude Code also needs the HIPAA configuration (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026) or ZDR (Anthropic, Zero data retention - Claude Code Docs, verified November 27, 2026).
Enterprise seat with the HIPAA configuration, in the terminal, connecting directly to AnthropicYes, this is the covered path (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026).
The VS Code or JetBrains extension, or a beta featureNo, even with the configuration (Anthropic, Use Claude Code (local mode) and Claude Cowork (local mode) on a HIPAA-ready Enterprise plan, verified November 15, 2026).
Claude Code on the web or another cloud sessionNo (Anthropic, Use Claude Code (local mode) and Claude Cowork (local mode) on a HIPAA-ready Enterprise plan, verified November 15, 2026).
Through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft FoundryNot under Anthropic's BAA (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026). Any coverage would have to come from that cloud platform's own terms.
A Claude Console API keyUnclear. Eligible only with ZDR per the privacy center (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026), not covered per the API docs (Anthropic, API and data retention - Claude Platform Docs, verified November 27, 2026). Confirm in writing.

If you signed up for Claude Code on your own, on Pro, Max or Ultra, the answer is simple: keep PHI out of Claude Code entirely.

Why a coding tool is not where patient data belongs

Your app lives in two places. One is the workshop, where code gets written: Claude Code, the AI model behind it, your laptop and your code repository. The other is the runtime, where the finished app runs for staff and patients: hosting, the database, sign-in, email and texting. PHI belongs only in the runtime, and only on services that sign a BAA, because that is where patient records are stored and moved every day.

The workshop does not need real patients. A refill form behaves the same whether the test patient is a real person or an invented one called Test Patient 07 with a made-up date of birth. Synthetic data means invented records that look realistic but describe no one. You can ask Claude Code to generate them, including the awkward cases that break real apps: missing phone numbers, two patients with the same name, a medication list with forty entries. If Claude Code only ever sees synthetic data, it never receives PHI, and the narrow coverage rules above stop deciding what you can build.

HIPAA draws the line by what a company does with PHI. A business associate is a company that creates, receives, maintains or transmits PHI on behalf of a covered entity (HHS (eCFR), 45 CFR 160.103 -- Definitions., verified November 15, 2026). Claude Code sends your prompts and what it reads to Anthropic's model over the network (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026), so if Claude Code reads a patient export, Anthropic has received it. HIPAA also expects reasonable efforts to limit PHI to the minimum necessary for the purpose (HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules., verified November 15, 2026). Writing a screen or fixing a bug can almost always be done with invented patients instead.

One distinction trips people up. Using Claude Code to write your app is a different question from your finished app calling Claude to, say, summarize a visit note. That second use is runtime. It usually runs through the Claude API, which has its own HIPAA readiness rules. See Does the Anthropic API sign a BAA? For the Claude chat app, see Can you use Claude with patient data?

What this means for your app

Claude Code is not a chat window. It works inside your project folder, reads files, and runs commands on your computer. That is what makes it useful, and it is how PHI slips in without anyone pasting a chart. Anthropic's setup guide notes that commands Claude Code runs keep working with a developer's own GitHub and cloud access (Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs, verified November 15, 2026). Places to check:

  • Files in the project folder. An EHR export saved as test input, a spreadsheet of referrals, a scanned intake form. If Claude Code can open it, treat it as sent.
  • The live database password. If your app keeps it in a settings file inside the project, Claude Code can read that file, query real records, and pull the results into the conversation.
  • Error messages and logs you paste. An error from the live app often names the record it failed on.
  • Screenshots. A screenshot of a bug on the live app shows whichever patient was on screen.
  • Seed and test files. Seed data is the starter content an app loads for testing. Check that nobody swapped in real rows to make a demo look right.
  • Your own laptop. Session transcripts sit in plaintext on your computer (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026). Anything Claude Code read is now in a file most people never think to check.
  • Bug reports. One feedback or bug command sends the conversation, including code, to Anthropic (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026).
  • Cloud sessions. In Anthropic-hosted cloud sessions, your repository is cloned into a virtual machine and Anthropic stores the session transcript (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026). Anything committed to the repository goes with it.
  • GitHub and other services. A commit Claude Code pushes is data sent to GitHub, and Anthropic's BAA does not cover what goes there (Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs, verified November 15, 2026).
  • Connectors. MCP servers and connectors are add-ons that link Claude to other services. On Claude Enterprise, sending data to third parties through them is not covered by Anthropic's BAA (Business Associate Agreements (BAA) for Commercial Customers | Anthropic Privacy Center, verified November 27, 2026).

Removing the name column does not make a file safe. HIPAA's safe harbor de-identification method lists identifiers that must come out, including email addresses, Social Security numbers and medical record numbers (HHS (eCFR), 45 CFR 164.514 -- Other requirements relating to uses and disclosures of protected health information., verified November 15, 2026). Inventing records from scratch is simpler than scrubbing real ones.

How this goes wrong: real patients in a test file, a git push and a bug report

Hypothetical. Imagine a physician who runs a GLP-1 weight-loss clinic. On a Claude Max plan, she uses Claude Code to build a refill tracker that flags patients due for a dose step-up and drafts reminder texts. The app already runs for her front desk, with its database password in a settings file in the project.

The step-up logic misfires for some patients. She types: the test data is too clean, use a few real patients so the test matches production. Claude Code reads the settings file, runs a query against the live database, and gets back twenty rows: names, birth dates, phone numbers, current semaglutide doses and weights. It writes them into a test file, the tests pass, and it commits and pushes the change to her GitHub repository. Nothing about this is exotic. Claude Code can run commands with her own access, and Anthropic's BAA would not cover data pushed to GitHub even on a covered Enterprise setup (Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs, verified November 15, 2026).

Later a different error appears, and she runs the bug command to report it. That sends the conversation, including the code and the query results, to Anthropic (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026), where bug-report transcripts are kept for 5 years (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026). Her model-improvement setting is on, which on a Max account means the session can be used to train new models (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026) and is kept for 5 years (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026). And a plaintext transcript of the whole session sits on her laptop (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026).

The PHI is now in at least four places: Anthropic's systems under consumer terms, a 5-year bug-report store, a GitHub repository with every past commit, and a local transcript. Max cannot enable HIPAA at all (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026). None of it was needed. Twenty synthetic patients with the same columns and a few odd dosing histories would have exposed the bug just as well. Under HIPAA, an impermissible disclosure is presumed to be a breach unless a risk assessment shows a low probability that the PHI was compromised (HHS (eCFR), 45 CFR 164.402 -- Definitions., verified November 15, 2026). That assessment, and any notification decision, belongs to her privacy officer and counsel.

If patient information already went into Claude Code

Do not start by wiping things. Local transcripts are both a copy of PHI and the best record of what happened, and your privacy officer may want them preserved before anything is deleted. In order:

  1. Stop the flow. End the session. Remove the export or real-data file from the project. Rotate (change) the live database password if Claude Code could read it.
  2. Write down what went in: which data, when, which plan and sign-in, whether it was the terminal, an editor extension or a cloud session, and whether anything was pushed to GitHub or sent with a bug or feedback command.
  3. Find every copy. Check the local transcripts (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026), the repository's commit history, and any cloud session. Logging out or removing a seat deletes nothing on the computer (Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs, verified November 15, 2026), and the local cleanup only runs when someone starts Claude Code (Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs, verified November 15, 2026). When deletion is approved, note that Anthropic's purge command leaves some paths, such as pasted text (Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs, verified November 15, 2026).
  4. Tell your privacy officer. The risk assessment looks at, among other factors, who received the PHI, whether it was actually acquired or viewed, and how far it was mitigated (HHS (eCFR), 45 CFR 164.402 -- Definitions., verified November 15, 2026).

The step-by-step versions for other coding tools carry over closely: I pasted patient information into Cursor. What now? and I pasted patient information into ChatGPT. What now? See also AI tool sent PHI to a model without a BAA.

A safe way to use Claude Code on a practice app

  1. Decide that Claude Code never sees PHI. This works on any plan, including Pro and Max, and it is the simplest place to start.
  2. Build on synthetic data. Ask Claude Code to generate invented patients that match your real columns, messy cases included. Keep a separate development database that only ever holds synthetic rows.
  3. Keep the project folder clean. No EHR exports, scanned forms or screenshots of the live app. Keep the production database password out of any file in the project.
  4. Block files you never want read. Claude Code supports Read deny rules for a file or folder path (Anthropic, Configure permissions - Claude Code Docs, verified November 15, 2026). Treat them as a seatbelt, not a wall: Anthropic calls applying them to other file-reading tools a best-effort attempt (Anthropic, Configure permissions - Claude Code Docs, verified November 15, 2026), and says shell-command rules are not a security boundary (Anthropic, Configure permissions - Claude Code Docs, verified November 15, 2026).
  5. Turn off model-improvement use if you are on an individual plan, so sessions are kept 30 days rather than 5 years (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026). It is not a BAA, and it does not make PHI acceptable.
  6. Skip bug reports from any project that ever held real data, because they send the conversation to Anthropic (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026).
  7. Run the live app on BAA-covered services. Hosting, database, sign-in, email and texting each need their own answer. The BAA Matrix and Stack Checker list them.
  8. If staff truly need PHI inside Claude Code, for example to debug live records, that means Claude Enterprise with the BAA accepted. The Primary Owner must also apply the HIPAA configuration, which Anthropic currently offers only to organizations with an account team (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026). Members then work only in the terminal, signed in with Enterprise accounts and connected directly to Anthropic (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026). Your IT person also owns securing and deleting the transcripts on each computer (Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs, verified November 15, 2026).

The split between workshop and runtime is how Fabrica is set up: physicians and staff build with AI coding tools on synthetic patient data, PHI stays in a cloud account the practice owns under BAAs, and an expert reviews every release that touches PHI. Other coding agents raise the same questions with different answers; compare Cursor, Windsurf and GitHub Copilot. Specialty context for the scenario above is on vibe-coded apps for GLP-1 and weight-loss clinics.

Keep, refactor, or rebuild?

Verdict: Keep or Refactor

Claude Code writes ordinary code you own, so the app itself is usually worth keeping. The work is around it: real patient data out of the project and repository, and the live app on hosting, database and sign-in that sign a BAA. Refactor the data layer if Claude Code chose services without checking for a BAA.

Code that Claude Code wrote is ordinary code in your own repository. Unless your app calls Claude while it runs, it does not depend on Anthropic, so it can usually stay. What changes is where the app runs and what the workshop can see.

Keep

The live app already runs on hosting, a database and sign-in you chose under BAAs, and Claude Code only ever saw synthetic data. Keep building and add the setup steps above.

Refactor

Claude Code picked the database, sign-in or hosting without a BAA check, or real patient data is mixed into the development project. Keep the screens and workflow; move the parts that touch PHI to BAA-covered services and clean real data out of the repository and its history.

For the general decision, see Keep, refactor or rebuild.

Frequently asked questions

Does my Claude Max or Pro subscription cover Claude Code for patient data?

No. Anthropic says Team and individual plans (Free, Pro, Max and Ultra) cannot enable HIPAA (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026). On those plans, Claude Code should only ever see synthetic data.

We have Claude Enterprise with HIPAA turned on. Is Claude Code covered now?

Not by that step alone. Anthropic says the Primary Owner must also apply the HIPAA configuration to Claude Code, currently available only to organizations with an Anthropic account team (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026). Without it, Claude Code needs zero data retention for BAA coverage (Anthropic, Zero data retention - Claude Code Docs, verified November 27, 2026).

Is the Claude Code extension in VS Code covered by the BAA?

No. Anthropic says the Claude Code extensions for VS Code and JetBrains are not covered by the BAA, even with the HIPAA configuration applied (Anthropic, Use Claude Code (local mode) and Claude Cowork (local mode) on a HIPAA-ready Enterprise plan, verified November 15, 2026). The covered path is the terminal, signed in with a Claude Enterprise account and connected directly to Anthropic (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026).

Does turning off the training setting make Claude Code safe for PHI?

No. On an individual plan it changes retention from 5 years to 30 days (Anthropic, Data usage - Claude Code Docs, verified November 15, 2026), but those plans still cannot enable HIPAA or get a BAA (Anthropic, HIPAA-ready Enterprise plans, verified November 27, 2026). A privacy setting is not a BAA.

Can I use Claude Code on the web or through Amazon Bedrock instead?

Not under Anthropic's BAA. Anthropic says cloud sessions, including Claude Code on the web, are not covered (Anthropic, Use Claude Code (local mode) and Claude Cowork (local mode) on a HIPAA-ready Enterprise plan, verified November 15, 2026), and neither is Claude Code through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 15, 2026).

If my app calls Claude to summarize visit notes, is that the same question?

No. That is your app's runtime using the Claude API, which has its own HIPAA readiness rules and BAA path (Anthropic, API and data retention - Claude Platform Docs, verified November 27, 2026). See the Anthropic API page. Claude Code, the tool that writes the app, is a separate decision.

Palo Alto Health Labs Fabrica

Keep building. We make it safe.

Building with Claude Code and ready for real patients, without real patients in your prompts? This is the conversation to have.

Fabrica moves the patient data in your vibe-coded app into an environment your practice owns, built for HIPAA compliance, with a BAA. You keep building in the tool you already use. Start with a 30-minute call about what you have built and where patient data goes today.

See how Fabrica works and book a 30-minute call

Please do not send patient information when you get in touch. The call is a conversation, not an audit or legal advice.

Sources

Every vendor statement on this page comes from the vendor's own terms, documentation or trust pages, or from the regulator, opened and read on the date shown. Vendor terms change; confirm the current version and your own signed agreement before relying on it. This page is general information, not legal advice.

  1. Anthropic, HIPAA-ready Enterprise plans. Checked November 27, 2026.
  2. Anthropic, Business Associate Agreements (BAA) for Commercial Customers. Checked November 27, 2026.
  3. Anthropic, Data usage - Claude Code Docs. Checked November 15, 2026.
  4. Anthropic, Zero data retention - Claude Code Docs. Checked November 27, 2026.
  5. Anthropic, Use Claude Code (local mode) and Claude Cowork (local mode) on a HIPAA-ready Enterprise plan. Checked November 15, 2026.
  6. Anthropic, API and data retention - Claude Platform Docs. Checked November 27, 2026.
  7. Anthropic, Set up Claude Code (local mode) for a HIPAA-ready organization - Claude Code Docs. Checked November 15, 2026.
  8. HHS (eCFR), 45 CFR 160.103 -- Definitions.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
  9. HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
  10. HHS (eCFR), 45 CFR 164.514 -- Other requirements relating to uses and disclosures of protected health information.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
  11. HHS (eCFR), 45 CFR 164.402 -- Definitions.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
  12. Anthropic, Configure permissions - Claude Code Docs. Checked November 15, 2026.