← All posts
Engineering15 min read

Explaining The Closed Remediation Loop: Detect, Diagnose, Act, Verify

Every incident tool claims detect, diagnose, act. What matters is what each stage reads and whether verification exists at all. A walk through the closed loop, with one OOMKill traced through all four stages.

DataAgentDataAgentCompany
Detect, Diagnose, Act, Verify: Inside the Closed Loop. One orders-api fault traced through detect, diagnose, act and verify.

TL;DR

  • Almost every incident tool implements some version of detect → diagnose → act. The differences that matter are what each stage reads and whether a fourth stage, verify, exists at all.
  • Detection comes in two kinds. Metric-driven detection asks whether a number is outside its expected range. State-driven detection asks whether the declared shape of the system changed. Most platforms do the first well and the second barely, which is why they surface symptoms and struggle with causes.
  • Diagnosis over a topology graph produces a causal chain, a specific, timed, attributable change, rather than a correlation set. You cannot autonomously remediate a correlation.
  • The order of operations is inverted on purpose: a deterministic circuit breaker stabilizes in seconds while deep root-cause analysis runs in parallel. Speed and judgement stop being a trade-off once they are separate decisions.
  • Verify is the stage that makes autonomy possible. Without it, an action is an unlogged change to the incident timeline. With it, the outcome becomes evidence, and evidence is how a fault class earns the right to be handled automatically next time.

Why "detect, diagnose, act" is not a differentiator

The loop is not a new idea. Any on-call engineer runs it by hand several times a month, and every vendor in the category now claims some automated version.

So the useful discussion is not whether a product has the loop. It is four more specific questions:

  1. Detect: what classes of fault can it see at all, and how much data does seeing them cost?
  2. Diagnose: what does it read before it reasons: symptoms only, or symptoms plus declared state plus change records?
  3. Act: what can it execute directly rather than recommend, and who set the bounds?
  4. Verify: how does it know the fix worked, and what does it do when the fix did not work?

Question 4 is the one most implementations skip, and skipping it caps autonomy permanently. An agent that cannot verify can never accumulate the evidence that would justify trusting it with more.

What follows walks the four stages as mechanism, mapped onto the four-layer stack DataAgent runs, Layer 0 through Layer 3, with what each layer actually reads.

The four layers underneath the loop

The four layers of the DataAgent stack and what each one reads.
LayerNameWhat it isWhat it reads
Layer 0TIDE: Living System ModelVersioned graph of entities, config, relationships and drift historyControl planes directly: Kubernetes owner references, IAM roles, VPC bindings
Layer 1PULSE: Thin Edge DetectionLow-data, in-cluster detection emitting a labelled streamGolden signals plus declared-state deltas, at low volume
Layer 2Read-in-Place SourcesRaw telemetry left where it is produced, fetched on demand at full fidelityProvider and cluster sources, scoped to the blast-radius window only
Layer 3Reasoning and LearningRCA over topology (SURGE / RIPPLE), gating (STEER), learning (WAKE)Layer 0's graph plus Layer 2's on-demand fetch

Two things about this arrangement are load-bearing.

Layer 0 is the primary asset, not the telemetry. The graph is what makes a question like "which change inside this blast radius altered something live code depends on" answerable in one query rather than by search. Accurate context, not queryable gigabytes, is the product.

Layer 2 is a fetch, not an ingest. Full-fidelity data is retrieved when a fault is unfolding, for the blast-radius window, and is not warehoused. That keeps detection cheap without making diagnosis shallow.

Stage 1. Detect: two kinds, and most tools do one

Detection sets the cost of the whole system, because it is the only stage that runs continuously.

Metric-driven detection

The familiar kind. Golden signals (latency, traffic, errors, saturation) plus anomaly detection over time series. It answers: is a number outside its expected range?

It is good at what it does, and it has two structural limits:

  • It sees symptoms, by construction. A metric measures an effect. Elevated latency, a rising error rate and restart counts are all downstream of whatever went wrong.
  • Its cost scales with cardinality. Every dimension you might want to slice by multiplies the series count. This is why comprehensive metric-driven detection gets expensive faster than teams expect.

State-driven detection

The kind most platforms barely implement. It answers a different question: did the declared shape of the system change?

Not "is a number weird" but: a security-group rule was revoked; a memory limit was lowered; a UNIQUE constraint was dropped; a service account lost an annotation; an HPA floor moved; a PodDisruptionBudget appeared; an admission webhook started failing closed.

Four properties make it worth building:

  1. It is causal, not symptomatic. A state change is a candidate cause. A metric excursion is an effect.
  2. It is cheap. Declared state is small and structured. Watching a Kubernetes object's generation change costs almost nothing next to a high-cardinality histogram.
  3. It is exact. No thresholds, no seasonality, no false-positive tuning. A field either changed or it did not.
  4. It fires earlier, sometimes before any symptom exists. The memory limit lowered at 09:41 is detectable at 09:41. The OOMKill it causes happens at 09:53, when the batch job creates the activating load. That is twelve minutes of warning, for free, that no metric can provide, because nothing is wrong yet.

That fourth property is the one to internalize. State-driven detection is the only detection class that can fire before a fault, because it observes the change rather than the consequence.

Neither kind is enough alone. Metric-driven detection catches faults with no corresponding change: hardware degradation, an upstream provider issue, organic growth crossing a limit. State-driven detection catches the large class where something in your own system changed. PULSE runs both at low volume in-cluster, emitting a labelled stream rather than shipping raw data.

Stage 2. Diagnose: a chain, not a correlation set

Given a detected fault, diagnosis has to answer why. There are two ways to try, and the difference decides whether the next stage can be automated.

Correlation finds signals that moved together in the same window. The output is a ranked list of things that also looked unusual. That is useful for a human and insufficient for a machine, because "these three metrics deviated together" does not identify an action. It is also fragile: in a busy production system, plenty of things move together every few minutes for unrelated reasons.

Topology-aware causal analysis asks a structurally different question, in three steps.

Step 1. Scope the blast radius from declared state. Not statistical proximity, structural proximity. Starting from the failing entity, traverse Layer 0's graph: the workload → its service account → the IAM role that account assumes → the node group it runs on → the attached security groups → the data stores those groups reference → the services that share those stores. This typically reduces a forty-thousand-object estate to a dozen relevant objects.

This is where topology built from control-plane state rather than from request traces earns its keep. Traces produce an application-shaped map. They cannot contain an IAM role, a VPC endpoint, an owner reference or a disruption budget, and those are where a large share of incidents start.

Step 2. Find what changed inside that radius, and when. Query change evidence over the window, restricted to those twelve objects. In most incidents this returns very few candidates, often one. That is not luck. It is the result of narrowing the space structurally before searching it.

Step 3. Fetch full fidelity, only where needed. With a small candidate set, Layer 2 retrieves high-resolution data for those objects and that window: the terminated container's final log lines, the cgroup memory series at full resolution, the exact exception. This is the read-in-place fetch, and it is affordable because steps 1 and 2 made it narrow.

The output is a chain: this change, at this time, by this principal, on this object, propagated along this path, produced this symptom. Each link is a fact rather than a coefficient.

That distinction is what makes the next stage possible. You cannot autonomously remediate a correlation, because no defined action reverses a correlation. You can autonomously remediate a specific change to a specific object.

Stage 3. Act: two phases, because they are two decisions

Here is the design choice that separates this architecture from most. "Restore service" and "explain the incident" have been wrongly bundled into one decision.

Most tools alert, then wait for a human to establish root cause, then fix. That order guarantees the outage lasts at least as long as the investigation.

DataAgent's remediation-first design splits it into two phases that run in parallel.

Phase 1: deterministic stabilization, in seconds

A circuit breaker fires immediately, using safe, guardrail-controlled actions defined in advance. No root-cause analysis required.

This is deliberately not AI-driven. It is deterministic: for this fault signature, in this environment, take this bounded action. Restart, roll back, scale, shed load, restore a known-good configuration.

Three properties make it safe:

  • Bounded actions. Only from a pre-approved set, per environment. Production and development have different sets.
  • Reversible by construction. Every Phase 1 action can be undone, and the pre-action state is captured first.
  • No causal claim required. This is the important one. Rolling back to a known-good revision does not require knowing why the current revision fails. That is why it can run before diagnosis completes.

The guardrails are yours to set: environment (prod vs. dev), scope of change and confidence threshold.

Phase 2: reasoned remediation, gated

Meanwhile, Layer 3 runs the full analysis and produces an evidence chain plus a resolution plan. The plan then passes through STEER, which applies the Trust Ladder: has this fault class earned autonomy through verified successes?

  • Yes: execute the verified playbook via RAPS.
  • No: route to a human with the full evidence chain, the proposed plan and the reason it was gated, available for dry-run from the CLI or Git UI.

The gate is per fault class, not per product tier. And because Phase 1 already restored service, Phase 2 is never under time pressure, which is the actual reason it can afford to be careful. The analysis waits for your engineers, not the other way around.

This also settles an argument the category keeps having. Speed versus judgement is presented as a trade-off: fast automation is reckless, careful analysis is slow. It is only a trade-off if both come from the same decision. Split them, and the deterministic breaker delivers speed while gated reasoning delivers judgement.

Stage 4. Verify: the stage that makes autonomy possible

Verification is the most-skipped stage and the one that decides whether anything else can be trusted.

An action without verification is not remediation. It is an unlogged change to your incident timeline, and if it did not work, you have made the eventual diagnosis harder for whoever picks it up.

Verification has to check three distinct things, and conflating them is a common failure:

  1. Did the action apply? The rollback completed, the security-group rule exists again, the limit is back to 1Gi. Confirmed from declared state, not inferred from the absence of new alerts.
  2. Did the symptom clear? The detected signal returned to its expected range and stayed there long enough to matter. "Stayed there" needs a real window: an OOMKill fix is not verified until the workload has been through another instance of the load pattern that triggered it.
  3. Did anything else break? The action is itself a change, and changes have blast radii. Scaling a deployment can exhaust a connection pool. A rollback can reintroduce a bug fixed in the same release. Verification re-checks the blast radius of the action, not only the original fault.

That third check is what separates verification from optimism.

Then the outcome is written back. WAKE learns from verified outcomes: this fault signature, this diagnosis, this action, this result. Two consequences follow:

  • The Trust Ladder moves. A fault class with repeated verified successes becomes eligible for more autonomy. Autonomy is earned per class, from evidence.
  • Only verified outcomes are learned from. An unverified action produces no training signal, which is correct. Learning from unverified outcomes is worse than learning nothing, because it produces confident wrongness.

This is what makes the loop closed rather than merely sequential. Each pass should leave the system slightly more capable of handling the next occurrence without a human.

Worked example: one fault through all four stages

orders-api on EKS, a Wednesday morning.

09:41:07. Detect (state-driven). A GitOps sync lowers the orders-api container memory limit from 1Gi to 768Mi. PULSE immediately emits a labelled state-change event: resource_limit_decreased, on a production workload, by a CI principal. No symptom exists yet. TIDE records the new graph revision alongside the previous value.

09:52:30. Activating condition. The hourly reconciliation batch starts, as it does every hour. Working set climbs from ~700Mi toward its p99 of ~940Mi.

09:53:04. Detect (metric-driven). First OOMKill.

Last State: Terminated

Reason: OOMKilled

Exit Code: 137

Started: Wed, 19 Aug 2026 09:52:31 +0000

Finished: Wed, 19 Aug 2026 09:53:04 +0000

Restart count rises and the error rate on order submission climbs. Both detection classes have now fired, and the state-driven event from twelve minutes earlier is already in the graph. It does not need to be discovered under time pressure.

09:53:12. Diagnose. Blast radius from declared state: orders-api Deployment → its ReplicaSets → the current pod set → the container spec → resource limits. Change evidence inside that radius over the last 30 minutes returns exactly one mutating event: the 09:41:07 limit decrease. Layer 2 fetches full-fidelity cgroup working-set data for the affected pods for the 09:52:00–09:53:10 window, showing the working set crossing 768Mi at 09:53:01, three seconds before termination.

The causal chain, each link a fact:

Memory limit reduced 1Gi → 768Mi at 09:41:07 by the GitOps CI principal → the workload's p99 working set under the hourly batch is ~940Mi → the batch starting at 09:52:30 drove the working set past the new ceiling → the kernel OOM-killed the container at 09:53:04 (exit 137) → restart loop → order submission errors.

Note what is not in the chain: the batch job. It is the activating condition, and it ran unchanged at 08:52 and 07:52 without incident. Telling an activating condition from a cause is exactly what correlation cannot do, because the batch job correlates perfectly with the failure.

09:53:15. Act, Phase 1. The circuit breaker fires: roll the Deployment back to the previous revision, restoring the 1Gi limit. Bounded, reversible, pre-approved for this environment and fault signature, and requiring no causal claim. Pods stabilize and order submissions recover.

09:53:15 onward. Act, Phase 2, in parallel. Full RCA completes with a resolution plan: set the limit to 1.25Gi based on observed p99 plus headroom, and add an alert on the working-set-to-limit ratio crossing 85%. STEER checks the Trust Ladder for the resource_limit_below_observed_working_set class. Suppose it has three verified successes and the threshold is five. It gates and routes to a human with the evidence chain, the plan and the reason for gating. An engineer can dry-run the plan from the CLI before applying it.

09:54:30. Verify.

  1. Applied? Deployment revision confirmed rolled back. resources.limits.memory reads 1Gi in live state.
  2. Symptom cleared? Restart count flat, error rate at baseline. Verification does not close here: it holds until the batch window completes at 10:14 without another OOMKill, because that is the load pattern that triggered the fault.
  3. Anything else break? The blast radius of the rollback itself is re-checked: the previous revision's other differences are examined, and node-level memory pressure is confirmed unchanged after restoring the higher limit.

10:14. WAKE. The verified outcome is recorded: signature, diagnosis, action, result. The class advances to four verified successes. One more, and Phase 2 for this class stops requiring a human: earned from evidence, not granted by configuration.

Time from OOMKill to stable service: 11 seconds. Time to a complete evidence chain: about 8 seconds after that. The engineer who reads it at 10:30 finds the analysis finished and the service already up.

Where this sits against other approaches

How the detect, diagnose, act, verify loop differs across three approaches.
DimensionAssistant AI on a data lakeAutonomous investigation toolsDataAgent
Detection classesMetric-drivenMetric-driven, some change awarenessMetric-driven and state-driven
Topology sourceRequest traces (app-shaped)Traces plus some cloud inventoryControl-plane state: owner refs, IAM, VPC
Diagnosis outputSummary and suggestionsRanked hypotheses with evidenceCausal chain: timed, attributable change
StabilizationNone, a human actsUsually after investigationDeterministic circuit breaker, in seconds, before RCA
Action authorityRecommendsExecutes, mostly supervised; risky actions gatedExecutes per fault class via the Trust Ladder
VerificationHuman judgementVaries; often symptom clearance onlyApplied + symptom cleared + action blast radius
Learning inputNoneModel or heuristic updatesVerified outcomes only
Data locationSecond copy in a vendor lakeVendor lake, some BYOCIn-cluster; read in place, fetched at the fault

To be straight about the market: autonomous execution is no longer unique. Datadog's Bits AI SRE performs autonomous investigation and can trigger remediation actions, and Dynatrace's Autonomous SRE Agent triggers on newly detected problems without waiting for a human. "We act and they only detect" stopped being true in 2026.

The differences that remain are architectural: which detection classes exist, where the topology comes from, where the agent runs relative to the data, and whether verification feeds a per-fault-class trust model. Those are the rows above.

FAQ

What does "detect, diagnose, act, verify" mean in practice? Detect: notice a fault, either from a metric leaving its expected range or from a change to the system's declared state. Diagnose: scope the blast radius structurally and identify which change inside it caused the symptom. Act: stabilize immediately with a bounded, reversible action, then apply a reasoned fix behind a trust gate. Verify: confirm the action applied, the symptom cleared and stayed cleared, and nothing else broke.

What is the difference between state-driven and metric-driven detection? Metric-driven detection watches numbers and asks whether one is outside its expected range. It sees symptoms, and its cost scales with cardinality. State-driven detection watches the declared shape of the system and asks what changed. It sees candidate causes, costs almost nothing, needs no thresholds, and can fire before any symptom exists.

Why stabilize before root cause analysis is complete? Because stabilization does not require a causal claim. Rolling back to a known-good revision works whether or not you know why the current one fails. Waiting for diagnosis first means the outage lasts at least as long as the investigation, with no safety benefit, provided the stabilizing action is bounded and reversible.

Isn't acting before you understand the cause risky? It would be if the action were unbounded. Phase 1 actions come from a pre-approved set per environment, are reversible, and capture pre-action state first. The risk to manage is taking an irreversible action without understanding, and that is what the Trust Ladder gate in Phase 2 exists for.

How does the system know a fix worked? Three separate checks: that the action applied, confirmed from live declared state; that the detected signal returned to its expected range and stayed there through the load pattern that triggered the fault; and that the action's own blast radius produced no new problem.

What happens when a fault class hasn't earned autonomy yet? Phase 1 stabilization still runs, because it is bounded and pre-approved. Phase 2 produces the full evidence chain and resolution plan, then routes to a human with the reason for gating. The engineer can dry-run the plan before applying it, and the outcome of that approved action still counts toward the class's verified-success record.

Key takeaways

  • The loop is table stakes. What differentiates implementations is what each stage reads, and whether verification exists at all.
  • State-driven detection is cheap, exact and causal, and it is the only class that can fire before a fault, because it observes the change rather than the consequence.
  • Diagnosis over a control-plane topology graph narrows a large estate to about a dozen objects before searching, which is why it usually returns one candidate change instead of a ranked list.
  • Stabilize and diagnose are two decisions. Splitting them removes the speed-versus-judgement trade-off: a deterministic breaker in seconds, gated reasoning in parallel.
  • Verification turns an action into evidence, and evidence is the only honest basis for granting more autonomy.

See the closed loop on your own cluster

Detect, diagnose, act and verify, with a human only on the exceptions. See DataAgent on your Kubernetes and AWS environment.

See remediation-first in your own stack

Install an agent and watch DataAgent map your topology. No credentials, no commitment.

Keep reading