Implementation Guide

    Using Amazon Bedrock Agents Return of Control to require human approval before an agent writes to an EHR

    Return of Control hands a proposed action back to the calling application instead of letting the agent execute it. That gives you a point to insert human review before an EHR write. The gate is only dependable if the approved parameters are the ones written, rejection and timeout both result in no write, and each decision is recorded as evidence. Because the gate lives in application code, you also need to decide which controls must be enforced in the execution path.

    The request, approve, reject and resume flow

    1. 1

      1. Receive the proposal

      The application receives the proposed action and its parameters from the agent. No EHR call has been made at this point.

    2. 2

      2. Store it as pending

      Persist the proposal with a unique identifier, the requesting user or session, a timestamp, and a hash of the canonical parameters.

    3. 3

      3. Present it to a reviewer

      Show the exact parameters the agent proposed, such as patient identifier, field and new value, not a model-written summary of them.

    4. 4

      4. Approve and execute

      On approval, verify the stored parameters still match the hash, then write using a write-scoped service identity. Execute exactly what was approved.

    5. 5

      5. Reject or expire

      On rejection, or when no decision arrives in the allowed window, make no write and mark the proposal closed. Never default to approval.

    6. 6

      6. Resume and record

      Return the outcome, including that an action was declined, to the agent so it can continue, and write the decision record.

    How Return of Control changes who executes the action

    In a standard agent configuration, the agent decides to call a tool and the tool runs. For an EHR, that means a model's output can become a record change with nothing between the two. Return of Control alters that sequence for the action groups you configure with it. The agent still decides which action to take and with what parameters, but the proposed action is returned to the calling application. Your code, not the agent, decides whether anything happens next.

    That shift matters for security engineers because it creates a natural interception point. The application receives a structured proposal before any side effect exists. It can hold the proposal, route it to a reviewer, and only then execute it against the EHR. When the application reports the outcome back, the agent can continue the session with knowledge of what happened.

    Treat this as a mechanism, not a control in itself. It makes approval possible. Whether approval is reliable depends on how you build the steps around it.

    Design decisions that make the gate dependable

    Bind approval to parameters, not to intent. The most common weakness in approval flows is a gap between what the reviewer saw and what the system executed. Hash the canonical parameters when the proposal arrives, store the hash with the pending record, and have the executor refuse any payload that does not match. The executor should read parameters from the approved record rather than accepting them again from the agent or the user interface.

    Treat modification as a new proposal. If a reviewer edits a value, the edited version is a different action. Either record it as a new proposal with its own approval or require the reviewer's edit itself to be the recorded approval of the changed parameters. Do not execute the agent's original parameters after a reviewer has changed them.

    Fail closed on rejection and timeout. A rejected or expired proposal must produce no write, and the agent should be told so in plain terms. Decide in advance whether the agent may re-propose, and cap the number of retries so a declined action is not resubmitted until someone approves out of fatigue.

    Separate read from write. Reads that support the agent's reasoning can run without a gate, while writes return control. Give the two paths different identities. The agent's tool-executing identity should hold the minimum EHR rights necessary, and whether it holds write rights at all is a decision to make deliberately. A stronger pattern keeps write credentials only with the executor that runs after approval.

    What HIPAA implies and what an approval record should contain

    As of November 2026, the technical safeguards in 45 CFR 164.312 require, in accordance with § 164.306, access controls so that systems maintaining ePHI are accessed only by persons or software programs that have been granted access rights. That wording matters here. Software, including an agent or its executing service, can be a subject of access control, so its rights should be defined explicitly.

    The audit controls standard requires hardware, software or procedural mechanisms that record and examine activity in systems that contain or use ePHI. An approval decision log is a reasonable way to support that for agent-initiated writes, though the rule does not prescribe its fields. The integrity specification is addressable and is worded around electronically transmitted ePHI, so it should not be read as a mandate for approval binding. Binding is a sound engineering practice, not a quoted requirement.

    A federal request for information on AI agent security, published in January 2026, lists approvals for consequential actions among human oversight controls. It is a request for information, not a requirement. The fields below are a recommendation for what an approval record should hold.

    • Who and what: Requesting user or session, agent identity, target patient record and action type.
    • Exact parameters: The proposed values and their hash, plus any reviewer edits.
    • Decision: Approve, reject, modify or expire, with the reviewer's identity and a timestamp.
    • Outcome: Whether the write ran, the executing identity, the result and the time it completed.

    Where Return of Control alone falls short

    The central limitation is that enforcement depends on application code. Return of Control returns the proposal, but nothing in the mechanism ensures the application actually gates the write. A code path that executes without waiting for approval, a second client that calls the EHR directly, or a later refactor that drops the check would each defeat the control without any visible failure. When approval logic is spread across several applications, it is also difficult to apply consistently or to demonstrate to an auditor.

    Three questions help decide what belongs in the execution path rather than in application code. First, can any route to the EHR write bypass the approval step? Second, is the approved payload verified against the written payload at the point of execution? Third, is the approval evidence produced by the enforcement point itself, or reconstructed from application logs afterward? If the answers depend on every developer getting the code right, the control is only as strong as the weakest service.

    Some controls therefore work better when they are enforced at runtime on the tool call, independent of any one application: which actions require approval, which identities may call them, and which fields may leave or enter the request. Application code still owns the reviewer experience, but the decision to allow, block or hold a write should not rest on it alone.

    Enforcing the approval point in the execution path

    Trussed enforces policy in the execution path across models, agents, tools and MCP servers. For individual interactions and tool calls, policy can allow, redact, block, rate limit or escalate for human approval. In this scenario, a rule can hold an EHR write tool call and escalate it for approval, so the requirement does not depend on each application implementing it the same way. Enforcement happens at runtime, not in a review after the fact.

    The same enforcement point generates audit-ready evidence, mapped to HIPAA among other frameworks. That evidence covers what policy applied, what decision was made and what was allowed through. Trussed addresses individual interactions and tool calls. It does not provide transaction-level governance or end-to-end tracing of agentic workflows, so the application-side design in this guide still applies.

    Whether or not you use Trussed, the principle holds. Use Return of Control to put a person in front of the write, bind the approval to the parameters, fail closed, and make sure the control and its evidence live where they cannot be skipped.

    Approval gate for an agent-proposed EHR write

    Propose

    The agent selects a write action and its parameters. Execution passes back to the application.

    Review

    A person sees the exact parameters and approves, rejects or changes them.

    Execute

    Only the approved parameters are written, by a narrowly scoped identity.

    Record

    The decision, the approver and the outcome are stored as evidence.

    Review where your approval gate is enforced

    Talk through how to enforce approval for agent tool calls in the execution path and what audit-ready evidence that produces.

    Talk to an Expert
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.