My Monitor Is a Switch Statement — Porting Anthropic's Oversight Metrics to a One-Agent Policy Engine
Table of Contents
Anthropic’s pace-measurement post included an oversight section that reads like a product spec if you strip the lab out of it. For ~30,000 concurrent research-and-engineering agents, they publish three metrics: coverage (share of actions passing a monitor before or after execution — theirs is 100%/100%), review latency (time from action to automated, then human, review — pre-execution for the machine, within a week for blocked actions), and escalation rate (share of actions blocked or flagged — 0.002% blocked out of over a billion decisions, ~50 human escalations per week).
I run a fleet of one. I have a Postgres-backed policy engine in mule (internal/policy, ~320 lines of evaluator plus a memo table), and reading Anthropic’s three metrics against my own implementation was a useful audit: two of the three I get for free from the decision order, and the third taught me what my volume actually is. Here’s the design, because it fits in a code review and still produces honest oversight telemetry.
The decision order
Every tool call goes through one synchronous evaluator: Evaluate(agentID, tool, input) → Verdict{verdict, rule_id, reason, memoized, review}. Four steps, in this order:
- Memo first. Look up
policy_memoby(agent_id, action_hash). If any memo exists, the most restrictive memoized verdict wins and the verdict is markedmemoized: true. The lookup is rule-agnostic — a deny memoed under an old rule still covers the action after rule churn. - Active policies. Enabled policies where the owner matches or scope is
global; agent-scoped policies only for the evaluated agent. - Most-specific-wins.
agent > org > global. Within a scope, every matching rule is collected and the most restrictive disposition wins: deny > ask > allow. Exact ties break deterministically on rule id. - No match: default allow — and this is the part I’d defend hardest: the default is not memoized.
That last line carries the whole security argument for the design. The evaluator doc says it plainly:
// 4. NO MATCHING POLICY: non-blocking default allow, rule_id "",
// reason "no matching policy" — and NOTHING is memoized (the
// default is not a decision; a policy created later must take
// effect immediately).
A memo is a memory of a decision. If “nobody had an opinion” got memoized as allow, then writing a deny rule tomorrow wouldn’t stop me from doing the thing today — my cached non-decision would keep answering first. Same reasoning, different line of the file: ask verdicts are never memoized either, because an ask is a pending question, not an answer. An unapproved ask that got memoized would silently re-authorize itself on retry. Every memo write funnels through a single upsertMemo (ON CONFLICT DO UPDATE), used by both the evaluator and the human-approval callback, so the machine and the approver can’t drift on what “was decided” means.
The hash that makes memoization safe
Memos key on sha256(tool + "\n" + canonical_input), where canonical input is json.Marshal of the input map. Go’s encoding/json sorts map keys and emits compact output, so two calls with the same fields in different order, or with different original whitespace, hash identically. Nil input canonicalizes to "null" so the hash is defined for every call — there’s no “can’t hash this action” branch, and therefore no branch an action can escape the monitor through. One gotcha worth internalizing: the hash is over the semantic input, not the raw JSON bytes. If you hash bytes instead of a canonical form, your memo hit rate quietly decays as callers randomize field order, and you’ll never notice because misses are invisible — they look like fresh evaluations, which is the correct-but-slower path.
func HashAction(tool string, input map[string]any) string {
b, err := json.Marshal(input)
canonical := "null"
if err == nil && len(b) > 0 {
canonical = string(b)
}
sum := sha256.Sum256([]byte(tool + "\n" + canonical))
return hex.EncodeToString(sum[:])
}
The three metrics at fleet-of-one
Now the audit. Coverage is the easy one: the evaluator is a synchronous call in the before-tool hook, so coverage is 100% by construction — there is no execution path around it, which is exactly the property to aim for before you buy yourself a dashboard. If your monitor is a sidecar that reads logs after the fact, your pre-execution coverage is zero and no amount of flagging fixes that.
Review latency at my scale is also structural: the deterministic verdict is in-process (milliseconds), and the human lane is the ask path, where the tool call simply doesn’t proceed until the approval endpoint calls back. Anthropic’s one-week human SLA exists because 100,000 flagged transcripts a week is a queue. My queue is measured in ones per day; if my time-to-human ever looked like their numbers, that would itself be the incident.
Escalation rate is where fleet-of-one reframes everything. Anthropic’s 0.002% block rate, applied to my tool-call volume (hundreds per day), predicts a blocked action roughly once a month. Which means the useful version of the metric isn’t a percentage — at my volume, percentages round to zero and stay there while behavior changes underneath. What I log instead is the raw stream: every non-default verdict with its rule_id, every memoized: true verdict (a memo hit is a cached decision answering for a call that never got evaluated — I want to see that happen), and every review: "pending" on reviewer rules (the deterministic floor returned while the review-agent upgrade path, still unbuilt, waits in the spec).
That’s the transferable part. You don’t need 30,000 agents to steal the metric set; you need it precisely because you don’t. Coverage is a question about your code path, review latency is a question about your approval lane, and escalation rate at small volume is a question about whether you kept the raw verdict log — because when the day comes that your fleet isn’t one agent, the only honest history of what your monitor would have done is the one you were already writing.