Skip to main content

Be among the first to experience Heidi’s next chapter. Join the waitlist.

Heidi AI
Log inGet Heidi free
alt
alt

Resources

  • Blogs

  • Explainers

  • FAQs

  • Progress Notes

  • Podcast

  • AI Tools

Why Heidi

  • Impact

  • Awards and Recognition

  • Evaluating Heidi

  • Patient Experience

Compliance

  • Trust Center

  • GDPR

  • HIPAA

  • AU/NZ

  • UK

  • Canada

Support

  • Help Centre

  • Heidi Guides

  • System Status

  • System Requirements

  • Contact Us

Legal

  • Privacy Policy

  • Terms of Service

  • Usage Policy

  • UKGDPR Policy

  • Accessibility

imxYAA

© 2026 Heidi. All rights reserved.

Heidi Desktop goes where the browser can’t.

Dictate anywhere on your screen, capture telehealth audio straight from the call,
and skip the second login.

Download for macOSDownload for Windows
  1. Home
  2. Engineering

Trust Is Engineered, Not Granted

Heidi Team

November 19, 202615 min read
Code is free; verification isn't

Table of Contents

The premise

Four principles

The machinery

The people

Where we are

What’s Still Hard

The thesis

Contributors: Vivek Katial, Belen Garcia Fava, Damian Chimes, Yu Pin Gan

%

PRs auto-approved

+

merges auto-approved

production incidents from auto-approved merges

Start practicing with a partner

Care is better with Heidi
Get Heidi free

~%

of Hubert's comments actioned as fixes

Last week, Hubert, our Code Surgeon, auto-approved 28% of all pull requests at Heidi. More than 6,500 auto-approved merges later, we have seen zero production incidents that trace back to a single change it approved. That result is clear evidence the bottleneck in AI-assisted engineering was never writing the code. It is trusting that the code you write doesn’t break things.

The idea of giving an AI agent the authority to approve code into production tends to produce one of two reactions. Engineers who spend long nights in incident channels, and are not especially AI-native, tend to hear recklessness. Engineers who spend their days blocked on review queues tend to hear something closer to excitement.

Coding agents are everywhere now. Ramp has Inspect, Stripe has Minions, and most scaling companies run something in between. What we have observed is that many of these implementations still keep the trust with humans: the agents do a great deal of the work, but a person still reviews and accepts it before shipping.

When Heidi decided to invest in its AI SDLC (software development lifecycle), we started with the data. Instead of building a background coding agent which would only have created more PRs stuck in our backlog, we observed the real constraint was review capacity: coding agents had already shifted velocity left with verification becoming the bottleneck. So that is where we chose to work - building a system that could carry some of the trust itself, and earn the right to do so.

This post covers the principles we used, the machinery that implements them, and an honest account of what is still hard.

Weekly commits to our frontend repository alone. Generation is no longer the constraint; every one of these changes still needed review.0100200300400500AugSepOctNovDecJanFebMarAprMayJunJulCommits / week

Fig. 01Weekly commits to our frontend repository alone. Generation is no longer the constraint; every one of these changes still needed review.
The premise

Three uncomfortable assumptions

We believe the right way to move forward is by accepting three assumptions:

  1. 01The volume of AI-generated code is growing exponentially, and that growth is effectively unbounded.
  2. 02It follows that human review will be incapable of scaling to AI output.
  3. 03Systematic, self-improving approaches to verification are the key to a viable defense.

This is the new economics of software: code generation is free; verification is expensive. As AI drives the cost of building towards zero, the burden shifts entirely to safety and maintenance. To move fast without breaking things, we had to stop asking whether agents can write code, and start asking engineers what conditions must be true for them to trust shipping agent-generated code.

The new economics of software

Code is free. Verification isn't.

Four principles

How an agent earns the right to ship

1. Trust starts with people's fears. Front-load them.

Nobody adopts an approval agent because it is fast. They reject it because they are scared of being paged at 2am for a change that was rubber stamped by an AI and no human reviewed. So before Hubert approved anything, we addressed those fears directly. That meant two things:

  1. An evaluation harness (“evals”) that could replay past PRs as though they were real PRs running in our SDLC to reliably show which of our past incidents Hubert would have caught
  2. Shadow mode: announcing up front that PRs would merge as normal while we watched Hubert's verdicts on the first 300 PRs merged into main across our two main repos.

These two decisions meant we could build trust with our engineers before anything was ever shipped, and along the way we identified bugs before they could cause any harm. Our engineers helped build a system they could trust.

2. Evals must mimic production. Ideally, they are production.

The distance between your eval environment and production is exactly the size of your blind spot. We drove ours to zero by design rather than by effort.

Before shipping the agent in May, we manually collated around twenty incidents that traced back to specific code changes and built a replay harness around them. Specifically, we built dev and production sandbox GitHub repositories. In the sandbox repository, we recreate the code change: we check out the base commit hash of the blame PR (the PR associated with the change that caused the incident) and re-apply its diff. Hubert then reviews the recreated PR in a Modal Sandbox, exactly as it would in production, and we look at what it caught and what it missed. The replay calls the same deployed Modal Functions that review our live PRs, so the eval environment is a realistic representation of our system state at a given time, isolated in a secure sandbox. Because the sandbox environment mirrors production, we're able to see whether a given incident would have been prevented.

In a future blog post, we'll discuss how we eval Hubert today, but tracking evals doesn't have to be difficult or require fancy infra. Yes, tracing solutions help, but understanding task completion was more important. Our initial v0 of evals was a simple Google Sheet, where we manually tracked task completion across these PRs. Today, every new incident becomes another replay case, so the suite hardens every time production teaches us something new. Each replayed PR fans out as its own Modal Sandbox from a pre-warmed repo cache (similar to Ramp's approach for their coding agent Inspect), so a sweep across hundreds of PRs and several model x harness combinations runs in minutes.

3. Track the measure you actually care about. For v0: recall over precision.

For an agent that is about to be given the authority to approve PRs into production, the error types are wildly asymmetric. Missing something that causes an incident results in trust being destroyed, maybe permanently. Emit a false positive and you have annoyed a developer; annoyances can be engineered away. Post-MVP, we deliberately seeded false positives into the golden eval dataset so we could grind the noise down without trading away recall for precision. The asymmetry is not static either: as Hubert matures and hardens, the objective we optimise for shifts with it. In a future post, we’ll discuss how we need to consider F-1 scores and establish validity of LLM judges to improve our Code Review and also how we incorporate feedback from our engineers in PR reviews. Supporting all of this, tracking and metrics were built in as first-class citizens across everything from day one. If it moves, we measure it, consistently.

Capability and reliability are also different measures. pass@k, whether the agent can succeed within k attempts, tells you what it can do; it is a metric for a coding agent. pass^k, whether it succeeds on all k consecutive attempts, tells you what you can trust. It degrades brutally: a 95% single-shot agent is down to 74% after six consecutive runs, and a coin flip by fourteen.

Correctness pass^k on Hubert evals, measured across harness · model configurations. Curves are illustrative from measured data. Distribution and shape is accurate.5066.6783.3310012345pass^k %k consecutive repeats, all judged correct

  • claude-code · Opus 5 (medium)
  • cursor · Grok 4.5 (high)
  • claude-code · Opus 5
  • opencode · Grok 4.6
Fig. 02Correctness pass^k on Hubert evals, measured across harness · model configurations. Curves are illustrative from measured data. Distribution and shape is accurate.

4. Agentic development velocity ∝ eval velocity.

You can only improve as fast as you can measure. Every prompt tweak, model switch, harness swap, and new guardrail comes down to one question: can we make this change without degrading the metrics we care about? Evals give us a systematic way to answer that question. The faster we can run trustworthy evals, and the more faithfully they reflect production, the faster we can build and improve our agents. In practice, agentic development velocity is tightly coupled with eval velocity. That’s why we’ve invested as much engineering effort into reducing time-to-eval and improving the experimentation experience as we have into the review agent itself.

The machinery

Replay the past, gate the present

The centrepiece of the system is the Hubert review replay harness: evals cut from production history rather than written for it.

HUBERT REVIEW REPLAY HARNESS incidents & issues blamed to N PRs recreate the change sandbox repo · base commit SHA Hubert reviews in a Modal sandbox caught ✓ missed ✗ ~20 hand-collated incidents to start · every new incident becomes another replay case
Fig. 03The barebones of the replay harness

The basic architecture of Hubert itself is quite simple: a set of static gates that run deterministically as code, followed by reasoning gates, which we decompose into adversarial agents rather than a single reviewer. Secondly, Hubert approves PRs, not releases. Clinical safety review remains part of our release process, so auto-approval at the code level means our engineers can be unblocked for small low-risk changes, and we can maintain our commitments to safety and security.

MVP HUBERT · THE GATE FLOW PR opened DETERMINISTIC GATES codeowners size secrets AI REVIEWS code review compliance risk merge to production route to human a failure at any gate routes the PR to a human
Fig. 05The gate flow, as it looked at MVP: deterministic gates, then AI reviews. A failure at any gate routes the PR to a human.

An interesting finding along the way is that Hubert's gates let us engineer some of our standards at scale. Our head of product opened a bloated, vibe-coded PR; Hubert rejected it, and it came back as a three-line change. He then celebrated this with the product and design team. Leadership celebrating that open-mindedness demonstrated the system working, and everyone, humans and agents alike, moved toward better engineering practices: smaller, more atomic changes.

THE RAMP TO AUTONOMY SHADOW MODE 300 PRs · 0% approved gates go live each step follows a hardened gate 28% of all PRs t₀ today
Fig. 06Share of PRs auto-approved by Hubert over time.
The people

Trust has receipts

Everything above is an implementation detail. Machinery only earns trust if people decide to accept it, so we ran the social rollout as deliberately as the technical one.

We front-loaded the fears in practice: naming the DevX problems people already felt, like review wait times; showing that we had backtested the incident-causing PRs; and announcing that we would run in shadow mode before anything went live, which gave everyone a channel for feedback:

Slack announcement about Code Surgeon launch

Fig. 07 — The launch note. Backtests first, shadow mode announced, feedback channel open. 19 replies.

Then the channel did something we couldn't have engineered:

Scott praises Hubert in chat
Belen posts HUBERT with goat emoji
Chat message thanking Hubert's minders

And then the strongest trust signal there is: Engineers started asking Hubert to shift left in their workflow:

Team chat about running code locally

When people stop asking whether the reviewer can be trusted and start asking for more of it, the trust model has moved.

Where we are

Hubert, the accordion

Today, Hubert runs as multiple distinct gates, and we are investing more deeply in the evaluation flow.

The goal is an accordion architecture:

  • we can optimise unit cost per task;
  • so that when a new model comes out, we can adopt it quickly;
  • and understanding our failure taxonomies stays a separate, first-class concern.

Focusing on verification first has also paid off in an unexpected way: now that we are building out the background coding agent, we can trust it far more from day one. Multi-harness, multi-gate model experimentation is one strand; using the same infrastructure to build background coding agents and AI SRE agents is another. The result is a growing family of Huberts, sequenced along the software development lifecycle, all standing on the same verification substrate:

THE HUBERT FAMILY WRITE Hubert, background coder writes the change RELEASE Hubert, release checker checks the release OPERATE Hubert, SRE watches production REVIEW Hubert, code surgeon reviews the change one verification substrate: gates · evals · replay harness · metrics
What’s Still Hard

Agents inherit your organisational tension.

Design wants something internationalisation is against. A human engineer resolves that in a slack thread or an in-person conversation. An agent either receives contradictory instructions from conflicting docs or none at all. Our answer has been to invest in ownership models: every domain gets an explicit owner and a written decision hierarchy, machine-readable, living next to the code. This meant a large refactor toward a domain-driven architecture, and it paid for itself three ways. Humans now sit through fewer cross-pod reviews. Agents can read who decides what instead of guessing. And finally, once a domain has an owner and written rules, an agent PR that stays inside that domain can merge without a human reviewer.

Review has to scale with velocity — and it has to be adversarial.

As coding velocity climbs, review can't remain a fixed-size human function, and it can't be confirmatory. AI systems have consistently been shown to drift sycophantic. That's exactly why Hubert is broken into gates: each one is a narrow adversary with a single job, not a general assistant looking for reasons to say yes.

Codebase entropy.

This is the one we are still genuinely unsure about. At 500+ PRs into prod a week across 100+ engineers, with every team's agents updating their own docs, configs, and rules, a codebase fragments into divergent, locally-optimised agent behaviours, and that can quietly degrade the whole codebase. DORA-style delivery metrics catch it, but too far downstream. What we're building instead is adherence metrics: hook-reject rates, guideline-violation findings, and sampled transcript audits, harvested continuously over OpenTelemetry and rolled into an adherence score per repo and per team. An early-warning gauge for entropy, not a post-mortem.

The thesis

None of our hard problems are AI problems

Building is largely free now; the problem is knowing that what you built works and does what you expect. In software, that means knowing your code will not break production. And the hard problems there are not AI problems. Ownership. Trust. Compliance. Security. Atomic changes and sandboxed environments. These are traditional engineering problems. The agents did not create them; they materialised them at scale. Funnily enough, agent generated PR slop actually gives us an audit trail of our code-smells and architectural shortcuts.

There was an early dream that AI would make rigorous engineering less necessary, that the model would simply do it right or fix it automatically. The opposite happened. Good, boring engineering is now the highest-leverage investment a company can make, because it is the multiplier on every agent you deploy. Ask anyone who has tried to run agents without decent local dev environments; we did. Platform debt is the debt that hurts most, because the agent cannot cheaply verify its own work, and every failure shifts right into your most expensive stages.

Let people experiment safely. Freedom to experiment is only possible when the guardrails are robust and tightly constrained.

Code is free now. Verification is not. The companies that win the agent era will not be the ones that generate the most code; they will be the ones that industrialise trust.

Share this post