It is HIPAA compliant to put PHI into AI coding assistants only when the assistant's vendor has signed a business associate agreement (BAA) and the use meets HIPAA's minimum necessary standard. In most builds, test data that contains no PHI does the job, so real patient data doesn't need to go into the assistant at all.

In practice, real patient data goes into the build often. In a July 2026 Paubox survey of 151 healthcare leaders, 93% said staff enter real patient information or PHI into AI coding assistants at least some of the time while building, testing, or debugging applications. Only 7% said it never happens.

The findings come from The CISO's guide to healthcare AI governance, Paubox's report on how healthcare organizations govern the software staff build with AI coding assistants.

Each pasted record goes to the assistant's vendor

A staff member debugging a form pastes a patient record into a prompt to see why a date field breaks. That record now sits with an outside company, the assistant's vendor, under whatever terms cover that account. It happens before the tool is finished, and often before anyone has reviewed it.

An AI coding assistant that receives PHI needs a BAA

HHS guidance on cloud services sets the rule. "When a covered entity engages the services of a CSP to create, receive, maintain, or transmit ePHI (such as to process and/or store ePHI), on its behalf, the CSP is a business associate under HIPAA," according to HHS. The same guidance says using such a service is allowed "provided the covered entity or business associate enters into" a BAA with it.

An AI coding assistant that receives PHI in a prompt fits that description. Without a business associate agreement, sharing PHI with the vendor isn't a permitted disclosure under HIPAA.

Coverage is uneven. Only 41% of healthcare leaders say all applicable AI coding assistant vendors have BAAs. Another 42% say most do, and 12% say only some do.

A BAA with one vendor also doesn't cover the others. Staff who switch to a different assistant for a single task can take PHI outside the agreement without anyone noticing.

Minimum necessary still applies once a BAA is signed

A BAA alone doesn't make every use acceptable. HIPAA's minimum necessary standard rests on the principle that "protected health information should not be used or disclosed when it is not necessary to satisfy a particular purpose or carry out a function," according to HHS.

Debugging a form, testing an API call, or checking how a report formats a date rarely needs a real patient's record. Made-up records with the same structure do the same job. When real PHI goes into the assistant for a task that test data could handle, the use is hard to defend as necessary.

Read also: How to de-identify protected health information for privacy

How to keep PHI out of AI coding assistants

Give developers realistic test data

Build a set of synthetic or de-identified records that match the structure of real data: names, dates, record numbers, and the edge cases that break forms. If the test data is easy to reach, staff have less reason to pull real records.

Sign a BAA before any assistant sees PHI

List every AI coding assistant staff use, including the ones adopted informally, and confirm a BAA covers each one before PHI goes near it. Treat an assistant without a BAA as off limits for any task involving patient data.

Enforce the rule where the work happens

The report recommends setting one rule on synthetic test data and enforcing it in the tools themselves, because training alone hasn't kept real PHI out of coding assistants. A rule that lives only in a slide deck depends on every staff member remembering it under deadline pressure.

In practice, that means keeping production patient data out of development and test environments, so the records aren't there to paste. Pair it with a pre-deployment review that checks whether real PHI was used during the build.

Put the finished tools on an inventory

Most healthcare leaders (85%) say their organization's AI-built tools have handled, stored, or transmitted PHI. How to govern AI-built tools in healthcare, starting with an inventory covers how to list and govern them.

A tool built on test data can still send real PHI safely

A tool built and tested on synthetic records will handle real PHI once it goes live. If it emails patients or partners, those messages need encryption and a BAA from day one. The Paubox Email API handles that sending step: it delivers HIPAA compliant email with TLS 1.2 or higher by default, and every plan, including the free tier, comes with a BAA.

Go deeper: The CISO's guide to healthcare AI governance

FAQs

Does HIPAA apply to tools built with AI coding assistants?

Yes. If an AI-built tool creates, receives, maintains, or transmits PHI, HIPAA applies to it like any other system that handles patient data. The AI Build Benchmark covers how widely healthcare organizations build with AI coding assistants.

Can de-identified data go into an AI coding assistant?

Data that has been properly de-identified under HIPAA is no longer PHI, so it can be used for testing without the same restrictions. Paubox covers the rules in Can de-identified data be used to train AI under HIPAA?

Is a BAA enough to make entering PHI into a coding assistant compliant?

No. The BAA makes the vendor a business associate, but the minimum necessary standard still applies to each use. If test data can do the job, real PHI shouldn't go into the assistant. Paubox explains what a business associate agreement covers.