# How AI agents run our on-call

A deploy check turns red. Maybe a customer can't ship an app. Maybe a scheduled test is just late, and we don't have a measurement yet. Both need an answer. Only one might be worth waking someone up for.

We run Sycamore in four environments, from development to production. Starting a build, opening a preview or deploying an app takes several services. And coding agents write most of our code, so changes land faster than the people on a rotation could read every alert those changes cause.

So since October, agents have done the hourly work of finding failures and investigating them. What made that practical was one split. The agents that work out what happened are not the agent that decides who needs to hear about it.

![Figure 1. The whole loop. The investigating agents can’t page anyone. One triage agent decides who hears about a finding.](/blog/how-ai-agents-run-our-on-call/fig-01-overview.png)

_Figure 1. The whole loop. The investigating agents can’t page anyone. One triage agent decides who hears about a finding._

## Where this came from

In September, one of our engineers wrote a skill for incidents a customer had already reported. While it worked out the cause, the agent stayed read-only. A person chose what to do: hot patch, wait for a normal release, or change the customer's app. The agent drafted updates for a person to send, and it called the incident done only when telemetry showed the customer's path working again.

That worked when someone already knew something was wrong. It couldn't find the problems nobody had reported.

In October another engineer started building the hourly on-call system. In November we folded the September skill into its investigation method. Now a person asking why a deploy failed and an agent picking up a failed deploy check start from the same playbook.

## Step 1: find the failure

Detection isn't an agent. It's a script. It grades 17 customer journeys and nine groups of internal systems across the four environments, 854 checks in all.

Every hour it reads two things. One is the records our services write to ClickHouse as each step starts, succeeds or fails. The other is the results of scheduled synthetic tests, scripted runs that act like a customer. Every five minutes it re-reads only the checks that can page someone or that measure an outage.

![Figure 2. Detection is plain code. 17 customer journeys and nine groups of internal systems, across four environments (cells illustrative).](/blog/how-ai-agents-run-our-on-call/fig-02-board.png)

_Figure 2. Detection is plain code. 17 customer journeys and nine groups of internal systems, across four environments (cells illustrative)._

A missing measurement is not a pass. If a deploy check is red because its test is late, or because a service stopped writing records, the check says "no signal" and the run files a request with the owner. It never marks the path healthy.

An intermittent failure shouldn't page someone afresh every time it comes back. So one alert follows the fault the whole way: as it opens, recovers, resolves or starts flapping. The system opens a new piece of work only when something changes that deserves another look. An alert opens or regresses, the impact grows, or the cause changes. We call that piece of work a finding.

![Figure 3. One alert follows a fault the whole way. A new finding opens only when something changes that deserves another look (illustrative).](/blog/how-ai-agents-run-our-on-call/fig-03-alert.png)

_Figure 3. One alert follows a fault the whole way. A new finding opens only when something changes that deserves another look (illustrative)._

## Step 2: prove what failed

Each finding is investigated twice. Two agent sessions, running on a smaller and cheaper model, work separately. A final step compares their verdicts. If they disagree, or either one says it can't tell, the finding is marked uncertain. There's no fixed limit on how many investigations run at once. New ones start as capacity frees up.

![Figure 4. Every finding is investigated twice. Disagreement is an answer too: the finding is marked uncertain.](/blog/how-ai-agents-run-our-on-call/fig-04-twice.png)

_Figure 4. Every finding is investigated twice. Disagreement is an answer too: the finding is marked uncertain._

A familiar error is not a cause. For a deploy failure, a session first checks whether a cause we've already proved fits this alert's actual time window. An error with a familiar name isn't enough.

Here's what that looks like. On 22 November, a new self-serve customer's workspace creations failed. The errors looked like something we'd seen before: nodes running out of CPU. One query ruled it out. Node CPU was between 5% and 9%, and that cause needs 85% or more. The investigation tested five explanations and confirmed one. 29 creation requests arrived within 12 seconds, the service ran out of database connections, and 15 of the requests failed.

![Figure 5. 22 November. One query ruled out the familiar cause. The real one was a burst of requests.](/blog/how-ai-agents-run-our-on-call/fig-05-case.png)

_Figure 5. 22 November. One query ruled out the familiar cause. The real one was a burst of requests._

Every claim in the report points to the query that supports it, and the root cause gets one of three labels: proven, likely or unknown. Proven is a high bar. The session has to show the mechanism, find a record of it at the time, explain why the failure reached some users and not others, reproduce it or confirm it in two independent records, and rule out the other explanations.

The verdict says whether someone needs to act on the product, and two easy ways out are closed. A synthetic deploy test can catch a real failure if it uses the same component as customer deploys, so to blame the detector instead, the session needs a fresh read showing the product was fine. And a noise verdict has to explain why the check fired when it shouldn't have, and point to a ticket to fix the check. The record store refuses a noise verdict without both.

![Figure 6. The bar each kind of verdict has to clear.](/blog/how-ai-agents-run-our-on-call/fig-06-proof.png)

_Figure 6. The bar each kind of verdict has to clear._

The investigators can't write to Slack or email anyone. They can file a ticket for a gap in what they could check. And when a finding is real, they can open a pull request that saves their query as a new check.

## Step 3: one agent decides who hears about it

One agent handles triage, and it has four moves, from quiet to loud. It can leave a finding alone, update or open a ticket, post to the environment's alert channel, or make an urgent post naming the owner.

Its rules live in a table that records who wrote each one, when and why. A rule a person wrote can change only with that person or the on-call owner. And the triage agent's writes to the record store go through one reviewed workflow that only its own identity can start.

The same red deploy check can go down different paths depending on what the investigation found. A failure a deploy caused, one hurting customers in production right now, or one spanning several customers or environments is urgent. Actual production customer impact also opens a Datadog incident and pages the human rotation. An uncertain finding becomes an ordinary ticket for its owner. It never pages unless its evidence clearly meets the urgent rule on its own.

"Customer" means an external user in an external tenant. That matters more than it sounds: several pages this month turned out to be about our own staff's or demo workspaces. Since 10 November the agent checks open tickets, the channel where staff report problems and our staff directory before paging. Two later pages still got it wrong.

![Figure 7. Triage has four moves, from quiet to loud, and follows rules people own.](/blog/how-ai-agents-run-our-on-call/fig-07-triage.png)

_Figure 7. Triage has four moves, from quiet to loud, and follows rules people own._

### Saying less

Posting has a bar of its own, written by two engineers on 13 November. The agent posts in an alert channel only when three things are true: a named metric is violated now, customers are affected (as a count), and the problem keeps growing or stays until someone acts.

The post is five lines, and it never asks the person on call to investigate or review a fix. Everything else goes to the owner's ticket without a mention. In the week of 4 November the agent made 19 channel posts. In the week of 16 November it made five.

![Figure 8. The bar for posting, the five-line post, and what it did to the channel.](/blog/how-ai-agents-run-our-on-call/fig-08-post.png)

_Figure 8. The bar for posting, the five-line post, and what it did to the channel._

### From ticket to fix

Every failing cell on the hourly board needs a ticket. The agent can decide an existing ticket is enough only if it read that ticket in the past hour and the ticket was open and being worked on. The store enforces that. We added the rule after an audit showed most of those decisions relied on stale or unrelated tickets.

Urgent tickets get an agent fix session right away. For the rest, the agent first comments on the ticket that it will start a fix, waits at least 30 minutes for anyone to reply "hold", and starts at most three new fix sessions an hour. A person can take over any ticket. Otherwise the fix session merges only with green CI and clean review bots, ships through the normal deployment path, and records the evidence that the check recovered.

![Figure 9. From ticket to fix. People get a window to say hold, and the check has the last word.](/blog/how-ai-agents-run-our-on-call/fig-09-fix.png)

_Figure 9. From ticket to fix. People get a window to say hold, and the check has the last word._

### Getting a person's attention

The owner has an hour to acknowledge an urgent finding before a reminder, and another hour before escalation. In practice, acknowledgment is the slowest step. Across this month's incidents it took anywhere from about ten minutes to two days. Since 17 November, a page is a question that repeats every 30 minutes until someone answers it.

### Production has its own gate

The agent can deploy a small change to one service, announced first, if it has read the change, the version is healthy in staging, the rollback version is known and there's no freeze. A full production deploy, a privileged write or a change to production data needs a person's explicit approval. An urgent hot patch that skips staging needs two people to approve the override, and the agent can't be one of them.

![Figure 10. Production has its own gate.](/blog/how-ai-agents-run-our-on-call/fig-10-gate.png)

_Figure 10. Production has its own gate._

## One incident, start to finish

At 4:39 a.m. Pacific on 16 November, the production database shared by draft apps ran out of connection slots and refused 28 connections. It had recovered by 4:42. The finding opened four minutes after the fault, and 14 minutes after that the investigation had a verdict: real, root cause likely, trigger unknown.

Nothing was still failing for customers, so the triage agent posted to the alert channel and opened a ticket. It didn't page anyone.

![Figure 11. 16 November, start to finish.](/blog/how-ai-agents-run-our-on-call/fig-11-incident.png)

_Figure 11. 16 November, start to finish._

The fix session found the trigger. A rollout of our serving layer had restarted every draft app at once. Each new copy connected before its old copy stopped, so about 15 apps briefly doubled their connections. The peak was about 394 of the 400 allowed.

The rollout overlap can't be configured, and draft apps don't go through a connection pooler. So the fix was headroom: 600 connections, applied in development first and in production the same day. The ticket stayed open until 19 November, when the check had been clean for 24 hours.

Notice two things. The investigation said what it didn't know. And the evidence that closed the incident came from the check, not from the merged pull request.

## What people still catch

Since 1 November the agents have recorded 11 incidents that reached an urgent post or a Datadog incident, and the hourly checks found all 11. That doesn't mean the checks find everything, because incidents that people find first don't always reach that record.

On 20 November, a pricing change made two new models look free. Our credit check, which won't trust a zero price, started refusing builds for a few self-serve workspaces. A person noticed and declared the incident. The monitor that should have caught it had no one to notify, and the agent's alert came about half an hour after the person's. At least one other incident this month started with a staff report. We don't have an intake for alerts we missed, so we can't count them.

The on-call system can also stop. On 16 November the machine that runs investigations was down for two hours and ten minutes, and nobody was told. A fault there now pages every 30 minutes until someone answers. On 20 November an outage in the service that schedules our agent sessions paused the on-call watcher and the alert relay for more than nine hours, and nothing alarmed. An alarm for a watcher that stays paused is proposed but not built.

And the layers don't always hand over cleanly. During the 22 November signup incident, an engineer in the incident channel asked why the investigation hadn't been done yet. It had. The investigating agents reached the right conclusion before the incident opened, but nothing linked their report to the incident record, so the channel started without it.

![Figure 12. Three ways things slipped this month.](/blog/how-ai-agents-run-our-on-call/fig-12-gaps.png)

_Figure 12. Three ways things slipped this month._

## What three weeks of records show

We moved investigations to the two-session setup on 13 November, so here's the week of 4 November next to the week of 16 November. These are counts of findings, not incidents. One fault can create more work as its impact or cause changes.

![Figure 13. Verdicts as a share of findings with a verdict, the week before the switch against the week after.](/blog/how-ai-agents-run-our-on-call/fig-13-mix.png)

_Figure 13. Verdicts as a share of findings with a verdict, the week before the switch against the week after._

|                                                                       | Week of 4 Nov | Week of 16 Nov |
| :-------------------------------------------------------------------- | ------------: | -------------: |
| Findings                                                              |         1,900 |          1,394 |
| Findings with a verdict                                               |         1,897 |          1,382 |
| Real                                                                  | 1,188 (62.6%) |    882 (63.8%) |
| Real but harmless (the check fired correctly and nobody was affected) |     16 (0.8%) |      51 (3.7%) |
| Detector bug                                                          |   231 (12.2%) |     125 (9.0%) |
| A state the system was designed to be in                              |   220 (11.6%) |    188 (13.6%) |
| A fault in our own test harness                                       |    186 (9.8%) |      75 (5.4%) |
| Can't tell                                                            |     49 (2.6%) |      55 (4.0%) |
| Not applicable to that environment                                    |      7 (0.4%) |       6 (0.4%) |
| Median time to a verdict                                              |     6 minutes |     15 minutes |
| Verdict within an hour                                                |         95.0% |          88.4% |
| An already-known cause named                                          |         61.3% |          49.5% |

Less of the work was noise. Detector bugs, expected states and harness faults fell from 637 of 1,897 findings with verdicts (33.6%) to 388 of 1,382 (28.1%), and each had an explanation and a ticket. Findings called real include failures in development, staging and test traffic, so they aren't a count of customers hurt.

Two sessions are slower. The median time to a verdict jumped to more than two hours on each of the two days of the switch, then fell back. From 15 November it stayed between 12 and 22 minutes a day, two to three times the old median. In the week of 16 November, 238 of 1,393 investigated findings (17.1%) were marked uncertain, mostly because the two sessions disagreed. Those went to their owners as tickets instead of interrupting anyone.

Triage interrupted people less. In the week of 16 November the agent decided 772 times to take no new action, most often because a ticket was already being worked on. It updated tickets 500 times, opened 106 new ones, made five channel posts and two urgent posts, and started at least seven fix sessions, down from 32 in the week of 4 November.

![Figure 14. Triage said less. Changing quickly had a cost.](/blog/how-ai-agents-run-our-on-call/fig-14-actions.png)

_Figure 14. Triage said less. Changing quickly had a cost._

Changing quickly had a cost, and the system's own weekly scorecard shows it. Of the tickets closed in the week of 2 November, 69 of 72 had been fixed. In the week of 9 November, the week of the switch, it was 28 of 93, and 55 were canceled. We think most of those were tickets opened for every failing cell during the changeover, but we haven't shown that.

## What the system still can't see

We can only grade steps our services record. The data can't always tell staff or automated clients apart from customers, so an investigation has to say when it doesn't know who was affected.

We measure recall, the share of real failures we catch, only by injecting faults in staging. We didn't measure it in the week of 9 November.

Changes to the investigation method are scored against 53 past findings with known verdicts. The current method gets 46 of the 47 that have recorded runs right. But the replay uses a different model from the one production investigations now run on, so that score guides changes rather than gating them.

Every finding still gets a full investigation. A shortcut for exact matches to a known cause runs in shadow mode, where it would have skipped about 4% of findings last week. And the agent's escalations still go to one person, because no other lead is on record.

## Why the split works

When the next deploy check goes red, we want the system to look hard at it whether or not anyone ends up paged. The investigating agents are free to do that because they can't page anyone. The agent that can has to act on evidence and on rules people own, and it has learned to say less.

That's how we investigate every finding without making the human rotation read every alert. And it's why the misses that remain are the ones a person notices first.