← ~/pillars / quality-cd / agents-in-the-delivery-pipeline
Agents in the delivery pipeline
Verification-before-completion gates that stop agents declaring success without evidence, progressive delivery and rollback as the outer control loop, and prompt regression suites for Bedrock-calling services.
updated 2026-06-12 ~5 min read pattern 03/05 Quality, Delivery & Evals
on this page
Context. Agents now produce changes faster than humans can verify them, and some of those changes flow toward production. The pipeline has to decide, repeatedly and without a human watching, whether an agent’s “done” is true.
Forces. Agents claim success falsely: not occasionally, but as a documented behavioural tendency. Anthropic’s effective harnesses post describes “Claude’s tendency to mark features as complete without proper testing”, passing unit tests while “failing to recognize that features didn’t work end-to-end”. The SAVeR paper (arXiv 2604.08401, April 2026) shows why outcome-checking alone is insufficient: “correct outcomes can arise from chance, redundancy, or downstream correction, masking the underlying reasoning failure”. And Building effective agents names the compounding risk: autonomy means “higher costs, and the potential for compounding errors”. Meanwhile human verification capacity is fixed, so every gate you add in series erodes the throughput the agents bought you.
Resolution. Make completion structural, not verbal: state files the agent cannot talk its way past, deterministic Stop gates, and evidence requirements. Then treat deployment itself as the outermost verification loop (progressive rollout with automated rollback) and instrument the metric that catches what slips through: deployment rework rate.
The gate hierarchy
The Claude Code best-practices docs describe an escalating set of verification gates:
| Gate strength | Mechanism | When to use |
|---|---|---|
| Prompt-level | ”run the tests and iterate” in the same message | Any task, no setup |
| Session-level | /goal condition: an evaluator re-checks after every turn | Multi-step tasks |
| Deterministic | Stop hook: a script blocks the turn from ending until the check passes (overridden after 8 consecutive blocks) | Unattended runs |
| Second opinion | Verification subagent in a fresh context tries to refute the result | High-stakes or long-running work |
The principle that binds them, from the same docs: “Have Claude show evidence rather than asserting success: the test output, the command it ran and what it returned, or a screenshot of the result.” A claim without evidence is treated as false. The Stop hook is the deterministic form (wiring details in hooks as hard gates), and the second-opinion form is the fresh-context reviewer from verification topologies.
Failing-first feature lists
For long-running or multi-feature work, the harnesses post describes a
mechanism worth copying exactly: an initialiser agent creates a JSON file
listing every feature with "failing": true, and a feature may only be
flipped to passing after the coding agent demonstrates the check passes.
{ "features": [ { "id": "F01", "description": "Orders over credit limit are rejected with 422", "failing": true, "verify": "mvn -pl :orders test -Dtest=OrderServiceCreditLimitTest" }, { "id": "F02", "description": "Rejection emits OrderRejected event with reason code", "failing": true, "verify": "mvn -pl :orders test -Dtest=OrderEventsTest" } ]}The point is that state lives outside the conversation. A verbal “all
features complete” changes nothing; only demonstrated check output flips a
flag. Pair it with the harnesses post’s test-integrity rule (“it is
unacceptable to remove or edit tests”, see
TDD with agents) so the agent cannot
satisfy verify commands by hollowing them out, and protect the JSON itself
with a hook on unattended runs.
Watch deployment rework rate
As of the 2025 report, DORA measures five metrics, not four: throughput keeps lead time, deployment frequency, and failed deployment recovery time, while stability is change failure rate plus the new fifth metric, deployment rework rate (getdx podcast): deployments that ship but need follow-up work. That is the precise signature of unverified agent throughput: the change merges, the demo works, the rework arrives next sprint, and change failure rate never moves. If you instrument one new thing this quarter, instrument this: tag deploys that are fixes or follow-ups to a recent deploy, and trend the ratio. It is the earliest honest signal of whether your completion gates are working.
Progressive delivery as the outer gate
Every gate above runs before merge. Deployment is where you verify against the only environment that counts, and the pattern is to treat each release as a controlled experiment (azati’s progressive delivery analysis): staged rollout percentages driven by risk signals rather than fixed schedules, and automated rollback that “continuously evaluates hundreds of metrics simultaneously and can initiate rollbacks within seconds of detecting anomalies”. The same analysis, citing the 2025 DORA findings, notes that commit frequency and rollback capability amplify AI’s impact on team performance. Rollback is not an emergency procedure, it is the mechanism that makes high agent throughput safe to ship.
Be clear about maturity: the fully autonomous AI-decided rollout is emerging practice, not an established AWS or Anthropic reference architecture. What a Java-on-AWS team can adopt today is the deterministic core: AWS AppConfig deployment strategies (or LaunchDarkly) for staged flag rollout, CloudWatch alarms wired as rollback triggers, and centralised metrics so the rollback decision has data. Rollback criteria belong in the PR: if an agent ships a change behind a flag, the alarm thresholds that revert it are part of the change, reviewed like code.
Prompt regression suites for Bedrock-calling services
A Java service that calls Claude through Bedrock has a regression surface no JUnit suite covers: behaviour changes when a prompt file or model version changes, with zero Java diff. Anthropic’s eval methodology (Demystifying evals, January 2026) gives the structure: capability evals (low pass rates, improvement signal) and regression evals (held at ~100% pass, protecting against degradation), with capability tasks graduating into the regression suite as they saturate. Grade with deterministic code-based assertions first, LLM-as-judge second, humans for calibration. And “do not take eval scores at face value”: read transcripts to confirm graders measure performance, not loopholes.
In CI this becomes two tiers: tier 1, deterministic assertions (valid JSON, required fields, length bounds) on every PR at near-zero cost; tier 2, LLM-as-judge rubrics (faithfulness, accuracy) on a schedule or when prompt files change. Build the golden dataset from 20–50 real production inputs, version-control the prompt files, and gate the prompt-change PR, not the application-code PR, on eval results. The Java quality gate artifact carries both tiers as separate jobs.
Worked example
An orders service team wires the full chain. In-session: tasks run with a
Stop hook that blocks completion until mvn verify exits zero, and
multi-feature work uses a failing-first features.json. At the repo
boundary: the Java quality gate
runs build, test, coverage, lint, and tier-1 prompt regressions as named
required checks: identical for agent and human PRs, enforced by the ruleset
from the
required checks artifact.
At deploy: the change ships behind an AppConfig flag at 5%, with two
CloudWatch alarms (error rate, p99 latency) named in the PR as rollback
triggers; either alarm reverts the flag without a human.
// sources
- https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
- https://code.claude.com/docs/en/best-practices
- https://arxiv.org/html/2604.08401
- https://www.anthropic.com/research/building-effective-agents
- https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents
- https://getdx.com/podcast/doras-2025-research-on-the-impact-of-ai/
- https://azati.com/blog/ai-powered-progressive-delivery-feature-flags-2026/