Escalation Chain

When several AI agents work for you while you are away from the keyboard, they inevitably hit questions they cannot answer alone. If every worker messages you directly, your inbox fills with things you already wrote down last week — and the one high-stakes choice that genuinely needs your judgment gets buried at the bottom.

Escalation Chain puts a deterministic, ordered series of stops between an asking agent and the human requester. The hub first checks whether you reserved that class of decision for yourself; if not, it tries stored records, then standing policies, then the lead agent, interrupting you only when none of those can settle the question. Reach for it whenever multiple agents raise frequent questions and your attention is the scarcest resource.

Group Decision rights
Also known as Chain of Responsibility, Tiered Escalation
Core rule Check reserved decisions first; otherwise settle at the cheapest stop
Defines records Routing step

Why flat asking breaks down at scale

Across engineering, customer operations, procurement, research, and publishing, workers that hit uncertainty face an unfair choice: guess and risk doing the wrong thing, or ask the human requester directly. Asking spares the worker from guessing, so well-behaved agents default to asking.

Multiply that across parallel workers and the requester spends every check-in answering questions that were already settled somewhere else: a fact captured in last week's brief, a standing approval already granted for low-risk actions, or a local choice the lead agent was hired to make. Worse, because every ask arrives in the same flat stream, the requester skims past the queue and misses the one irreversible or customer-facing call — such as issuing refunds or waiving a contract — that truly required her attention.

Escalation Chain replaces ad-hoc asking with four structural rules enforced by the hub:

  1. Workers ask the hub, never a person directly. A worker states what it needs and keeps working on parts of its job that do not depend on the answer.
  2. Reserved decisions skip straight to the requester. Before trying lower stops, the hub checks whether a standing policy reserves this decision class for the human.
  3. Every other question walks four stops in fixed order: stored records, then delegation policies, then the lead agent, and finally the requester.
  4. Every stop leaves a durable routing step recording who handled it, its deadline, and why it settled or passed the question on — answering "Why are you asking me this?" before the requester has to ask.

Why check reserved decisions before searching stored records? Because a past answer to one specific case must never silently answer a new decision you explicitly kept for yourself. Checking reservations first guarantees that an old refund answer from last month cannot auto-approve a fresh refund today.

Flat direct asks Workers hit 4 open questions Fact, policy, local choice, and refund All 4 go straight to Requester No lookup, no policy check, no lead filter Requester triages routine noise "Why are you asking me this?" Critical decision waits in backlog Urgent refund buried under stale asks Escalation Chain Hub checks reserved rules first Reserved refund skips straight to Requester 1. Stored records Settles known fact immediately 2. Delegation policies Settles standing rule immediately 3. Lead agent (in scope) Settles local choice within deadline 4. Requester sees 1 clear ask Carries exact route & why it arrived
Without a chain, routine facts, policy-covered actions, and local implementation choices compete with reserved decisions for the requester's attention. Escalation Chain settles the first three at zero human cost and delivers the fourth directly with its route attached.

Architecture and participants

The Hub owns the route. It stores one Question record and appends one Routing step for each stop the question visits. Passing a question onward never creates a duplicate question; the hub closes the current step as passed_on, opens the next step in the fixed sequence, and updates who is currently authorized to settle it.

Worker Raises ask, keeps working Hub Runs chain, order & deadlines Reserved check Matches reserving policies Hub durable records Question One record; current answerer updates Routing steps (position 1, 2, ...) Stop, handler, deadline, outcome, reason Usual route starts at stop 1 Reserved bypasses stops 1–3 1. Records Specs, facts & prior answers 2. Policies Standing rules in force 3. Lead agent Decision scope (timed deadline) 4. Requester Final authority (never passed on)
Workers submit questions to the hub. Reserved decisions open a single routing step at stop 4 (Requester); all other questions walk stops 1 through 4 in strict order with deadlines on every stop before the requester.
Worker
Raises a Question when blocked on an unknown fact, permission, or choice. Never chooses who answers, and continues independent work while the chain runs.
Hub
Checks reserving policies first, executes stops 1 and 2 itself, enforces fixed stop order and deadlines, writes every Routing step, and rejects answers from anyone other than the open step's handler.
Stop 1 — Stored records
Request specs, recorded facts, and prior answers. The hub searches them automatically and settles the question immediately when an up-to-date record answers it.
Stop 2 — Delegation policies
The requester's standing instructions in force. Settles covered classes of cases without waiting, and defines which decision classes are reserved for the requester.
Stop 3 — Lead agent
Settles questions that fall inside its stated decision scope within its time limit (for example, 10 minutes), and passes on anything outside its scope or uncertain.
Stop 4 — Requester
The final authority. Receives only reserved decisions and questions no earlier stop could settle, always accompanied by the recorded route showing why it arrived.

Execution flow

Toggle between the normal path — where the lead agent settles a question inside its scope without disturbing the requester — and the timeout failure path — where a crashed lead agent triggers automatic escalation and the hub rejects its late reply after restart.

Requester Hub Lead agent Worker 1. Ask: new table or existing table? 2. Check reserved rules & stop 1 (records) Not reserved; no stored fact → step 1 passed_on 3. Check stop 2 (delegation policies) No standing rule covers it → step 2 passed_on 4. Open step 3 for Lead agent (10m limit) 5. Evaluate within decision scope Internal schema choice is inside scope 6. Settle step 3: use existing table 7. Deliver answer; Worker continues Requester never interrupted All 3 routing steps kept for later audit

The hub checks reservations first, walks stored records (step 1) and policies (step 2), and hands the question to the lead agent (step 3). The lead agent settles it within its decision scope and deadline; the requester is never interrupted and can audit the route later.

Reserved decisions: If a reserving policy matches before step 1, the hub skips stops 1–3 completely and opens a single step at requester naming that policy_id.

Concrete examples

Escalation Chain applies anywhere agents escalate questions to a busy human — from customer operations and vendor finance to software engineering.

Example 1 — Customer operations billing dispute

No code or unit tests
Context
Operations agents are resolving a vendor overbilling incident across 40 accounts while the operations director is in meetings all afternoon. Four questions arise.
Stops 1–3
"Which contract addendum sets the SLA credit rate?" → settled at Stop 1 (Stored records) from the pinned contract fact.
"May we issue a $35 goodwill credit?" → settled at Stop 2 (Policies) under a standing rule covering credits under $50.
"Should we email accounts before or after the vendor confirms?" → settled at Stop 3 (Lead agent) inside its communications scope.
Reserved bypass
"Should we waive the disputed $4,200 enterprise invoice?" matches a reserving policy on waivers over $500. It skips stops 1–3 and arrives alone in the director's inbox with the reserving policy attached.
Outcome
Three questions are resolved in seconds without breaking the director's focus; the one financial judgment that matters gets an immediate, clear decision.

Example 2 — Duplicate charge bug fix (API service)

Software engineering
Context
Workers fixing a webhook retry bug that double-charged customers raise four questions during the afternoon while the engineering lead (Requester) is away.
Stops 1–3
"Which queue does the delivery service use?" → settled at Stop 1 (Stored records) from a fact stated last week.
"May the lead agent merge the approved retry fix?" → settled at Stop 2 (Policies) by a standing rule for checker-approved bug fixes.
"Store failed deliveries in a new table or the existing one?" → passed to Stop 3 (Lead agent), which chooses the existing table within its 10-minute deadline (or escalates automatically to the requester if it times out).
Reserved bypass
"Should we refund the customers who were charged twice?" is reserved for the requester. The hub sends it straight to stop 4 so no stale answer or broad policy can auto-settle customer refunds.
Outcome
The requester sees one decision at her check-in — the refund — instead of four mixed chat messages, and every earlier stop's decision is auditable in routing_steps.

What this pattern is NOT — Single-agent pairing or mandatory release gates

Negative example
Situation
One person pairs interactively with one coding agent in a single chat session, or a production deployment requires mandatory human approval before shipping.
Why skip it
In a one-on-one interactive session, the chain has only a single stop (you), so routing steps add machinery with zero filtering benefit. And for a mandatory release sign-off, use Policy Gate to hold the transition and send the reserved approval straight to the human without walking lower stops.

When to use and when to skip

Use Escalation Chain when

  • Multiple agents work asynchronously for one requester who checks in sporadically rather than watching live.
  • Agents raise frequent questions, and most can be answered from existing specs, prior answers, standing policies, or lead-agent scope.
  • The hub can search stored records and evaluate standing policies deterministically.
  • Each request has a lead agent with a clearly bounded decision scope and timeout fallback.

Skip it when

  • One person works live with one agent in a single conversation — there are no intermediate stops to walk.
  • A hard rule always requires human sign-off on a transition (enforce that with Policy Gate and route the approval directly as reserved).
  • The system has no durable specs, facts, or policies for the hub to consult before asking a person.
  • Questions are rare enough that direct routing imposes negligible interruption cost.

Data model and hub invariants

Escalation Chain defines one durable table — routing_steps — and references four records defined by neighboring patterns: Question (Self-Contained Question), Party (Orchestrator-Workers), Policy (Delegation Policy), and Answer (Tracked Answer). Reading a question's steps in position order yields the complete, immutable route the question took.

Question PK id Self-Contained Q. Party PK id Orchestrator-Workers Routing step PK id (uuid) FK question_id position (int) stop (text) FK handler_id outcome? reason? FK policy_id? source? (jsonb) FK answer_id? started_at due_at? ended_at? Policy PK id Delegation Policy Answer PK id Tracked Answer 1 1+ 1 n n 1? 1? 1?
Every Question has one or more Routing step rows (1 to 1+). Each step names one handler Party, an optional Policy, and at most one unique Answer when settled.

Table: routing_steps

Column Postgres type Nullability Notes
id uuid NOT NULL, PK Unique identifier for this routing step.
question_id uuid NOT NULL, FK References questions(id); the question being routed.
position integer NOT NULL 1-based step index with no gaps; UNIQUE (question_id, position).
stop text NOT NULL CHECK (stop IN ('records', 'policies', 'lead_agent', 'requester')).
handler_id uuid NOT NULL, FK References parties(id); the hub at stops 1–2, lead or requester at stops 3–4.
outcome text NULLABLE CHECK (outcome IN ('settled', 'passed_on', 'withdrawn')); NULL while open.
reason text NULLABLE One-sentence explanation of why the step closed; NULL while open.
policy_id uuid NULLABLE, FK References policies(id); the settling, scoping, or reserving policy applied.
source jsonb NULLABLE Type and ID of the stored record that settled stop 1 (for example, an earlier answer or fact).
answer_id uuid NULLABLE, FK References answers(id); set only when outcome = 'settled', unique when non-null.
started_at timestamptz NOT NULL When the question arrived at this stop.
due_at timestamptz NULLABLE Deadline after which the hub passes the question on; NULL at requester.
ended_at timestamptz NULLABLE When the step closed; NULL while open.

Nine hub invariants

  1. 01
    Contiguous 1-based positions per question Database constraint

    UNIQUE (question_id, position) and CHECK (position >= 1) ensure steps form a clean sequence, and the hub writes step 1 in the same transaction that creates the question.

  2. 02
    At most one open routing step per question Database constraint

    A partial unique index UNIQUE (question_id) WHERE ended_at IS NULL guarantees two stops can never simultaneously claim authority over the same open question.

  3. 03
    Outcome, reason, and end timestamp close together Database constraint

    A CHECK constraint requires (ended_at IS NULL) = (outcome IS NULL AND reason IS NULL) and non-empty reason when closed, matching the hub's reason_required guard.

  4. 04
    Answer links exist only on settled steps and stay unique Database constraint

    CHECK ((outcome = 'settled') = (answer_id IS NOT NULL)) plus a partial unique index UNIQUE (answer_id) WHERE answer_id IS NOT NULL enforce answer_required and prevent two steps from pointing at the same answer.

  5. 05
    Requester stop has no deadline and is never passed on Database constraint

    CHECK (NOT (stop = 'requester' AND (due_at IS NOT NULL OR outcome = 'passed_on'))) backs the hub's nowhere_to_pass_on guard at the final stop.

  6. 06
    Fixed monotonic stop order Hub guard

    Steps advance strictly along records → policies → lead_agent → requester. A route never steps backward, and every step before the final one closes as passed_on.

  7. 07
    Reserved decisions start directly at the requester Hub guard

    start checks reserving policies before opening stop 1. If a policy with effect = 'reserve' matches the question's decision_class, the route consists of a single step at requester naming that policy_id.

  8. 08
    Only the open step's handler may settle the question Hub guard

    settle checks that the latest step is open and its handler_id equals the caller; otherwise it fails with not_the_open_handler. Closed steps are immutable.

  9. 09
    Policy-backed settlements record a matching policy use Hub guard

    Whenever stop 2 (policies) or stop 3 (lead_agent within its decision scope) settles a question under a policy, the hub writes a corresponding Policy use (defined in Delegation Policy) in the same transaction.

Reference implementation

The same pure routing state machine in Lean, TypeScript, Python, and Elixir. Lookups into stored records and reserving policies are injected as functions so the chain's ordering, reservation bypass, deadline checks, and handler guards stay trivial to verify.

-- Hub guards for Escalation Chain (enforced in code, never in prompts)
-- Pure functional core: the steps list holds the newest step at its head.
inductive Stop where
  | records | policies | leadAgent | requester
  deriving Repr, BEq, DecidableEq

inductive Outcome where
  | settled | passedOn | withdrawn
  deriving Repr, BEq, DecidableEq

inductive HubError where
  | notTheOpenHandler | answerRequired | reasonRequired | nowhereToPassOn
  deriving Repr, BEq

structure Question where
  id : String
  decisionClass : String
  deriving Repr

-- Timestamps are Unix seconds, passed in by the caller.
structure RoutingStep where
  id : String
  questionId : String
  position : Nat
  stop : Stop
  handlerId : String
  outcome : Option Outcome := none
  reason : Option String := none
  policyId : Option String := none
  answerId : Option String := none
  startedAt : Nat
  dueAt : Option Nat := none
  endedAt : Option Nat := none
  deriving Repr

-- Lookups the hub supplies; step ids are passed in, as Lean has no UUID generator.
structure Lookups where
  reservedBy : Question → Option String
  handlerFor : Stop → String

structure SettleInput where
  answerId : String
  reason : String
  policyId : Option String := none

-- ORDER: the stop after this one, if any.
def Stop.next : Stop → Option Stop
  | .records => some .policies
  | .policies => some .leadAgent
  | .leadAgent => some .requester
  | .requester => none

-- LIMITS_SEC: requester is the final stop and has no deadline.
def Stop.limitSec : Stop → Option Nat
  | .records => some 5
  | .policies => some 5
  | .leadAgent => some 600
  | .requester => none

def blank (s : String) : Bool := s.all Char.isWhitespace

namespace EscalationChain

def openStep (question : Question) (stepId : String) (position : Nat) (stop : Stop)
    (lookups : Lookups) (now : Nat) (policyId : Option String) : RoutingStep :=
  { id := stepId, questionId := question.id, position, stop,
    handlerId := lookups.handlerFor stop, policyId, startedAt := now,
    dueAt := stop.limitSec.map (now + ·) }

def start (question : Question) (stepId : String) (lookups : Lookups) (now : Nat) :
    List RoutingStep :=
  match lookups.reservedBy question with
  | some reservedPolicyId => [openStep question stepId 1 .requester lookups now reservedPolicyId]
  | none => [openStep question stepId 1 .records lookups now none]

def settle (steps : List RoutingStep) (actorId : String) (input : SettleInput) (now : Nat) :
    Except HubError (List RoutingStep) := do
  -- `let pat := e | alt` runs alt when the pattern does not match.
  let openStep :: earlier := steps | throw .notTheOpenHandler
  unless openStep.endedAt.isNone && openStep.handlerId == actorId do throw .notTheOpenHandler
  if blank input.answerId then throw .answerRequired
  if blank input.reason then throw .reasonRequired
  let closed := { openStep with
    answerId := some input.answerId, policyId := input.policyId <|> openStep.policyId,
    reason := some input.reason, outcome := some .settled, endedAt := some now }
  return closed :: earlier

def passOn (steps : List RoutingStep) (question : Question) (reason : String)
    (stepId : String) (lookups : Lookups) (now : Nat) : Except HubError (List RoutingStep) := do
  if blank reason then throw .reasonRequired
  let current :: earlier := steps | throw .nowhereToPassOn
  unless current.endedAt.isNone do throw .nowhereToPassOn
  let some nextStop := current.stop.next | throw .nowhereToPassOn
  let closed := { current with outcome := some .passedOn, reason := some reason,
                               endedAt := some now }
  let next := openStep question stepId (steps.length + 1) nextStop lookups now none
  return next :: closed :: earlier

def isOverdue (steps : List RoutingStep) (now : Nat) : Bool :=
  match steps with
  | current :: _ => current.endedAt.isNone && current.dueAt.any (now >= ·)
  | [] => false

end EscalationChain

-- The requester is the last stop: a chain parked there cannot be passed on.
theorem requester_is_final (s : RoutingStep) (earlier : List RoutingStep) (q : Question)
    (reason stepId : String) (l : Lookups) (now : Nat)
    (h : s.stop = .requester) (hr : blank reason = false) :
    EscalationChain.passOn (s :: earlier) q reason stepId l now = .error .nowhereToPassOn := by
  cases hs : s.endedAt <;> simp [EscalationChain.passOn, hr, hs, h, Stop.next] <;> rfl

Execution trace

Walking Example 2 (duplicate charge bug fix) through these guards shows both normal settlement at the lead agent, rejection of blank reasons and wrong handlers, and a reserved refund bypassing stops 1–3 directly to the requester:

Execution trace: Example 2 (duplicate charge bug fix — table choice & reserved refund)
1. steps = chain.start(q_failed_deliveries_table, lookups, new Date("2026-11-17T14:45:00Z"))
   -> [step_1: stop="records", handler="hub", due="14:45:05Z"] (not reserved)

2. chain.passOn(steps, q_failed_deliveries_table, "", lookups, new Date("2026-11-17T14:45:01Z"))
   -> error: reason_required (every pass-on must explain why the stop could not settle)

3. steps = chain.passOn(steps, q_failed_deliveries_table, "No stored record settles it.", lookups, new Date("2026-11-17T14:45:02Z"))
   steps = chain.passOn(steps, q_failed_deliveries_table, "No policy covers it.", lookups, new Date("2026-11-17T14:45:03Z"))
   -> open step_3: stop="lead_agent", handler="lead_1", due="14:55:03Z"

4. chain.settle(steps, "worker_1", { answerId: "ans_40", reason: "Guessing existing table." }, new Date("2026-11-17T14:46:00Z"))
   -> error: not_the_open_handler (only lead_1 may settle step_3 while it is open)

5. chain.settle(steps, "lead_1", { answerId: "ans_41", reason: "" }, new Date("2026-11-17T14:48:00Z"))
   -> error: reason_required (settling must record the basis for the decision)

6. steps = chain.settle(steps, "lead_1", { answerId: "ans_41", policyId: "pol_scope_1",
     reason: "Internal schema choice is inside the lead agent's decision scope." }, new Date("2026-11-17T14:49:00Z"))
   -> ok (route: [1: records/passed_on, 2: policies/passed_on, 3: lead_agent/settled]; requester uninterrupted)

7. # Reserved decision bypass (customer refunds):
   reservedSteps = chain.start(q_double_charge_refund, lookups, new Date("2026-11-17T14:50:00Z"))
   -> [step_1: stop="requester", handler="dana", policy_id="pol_reserve_refunds", due=null]
   chain.passOn(reservedSteps, q_double_charge_refund, "Cannot decide", lookups, new Date("2026-11-17T14:51:00Z"))
   -> error: nowhere_to_pass_on (requester is the final stop)

Tradeoffs and practical guidance

Escalation Chain dramatically cuts human interruptions while preserving authority over high-stakes choices, but it carries real tradeoffs you should design around:

  • Slight latency on unreserved human questions: a question that truly needs the requester waits through stops 1–3 before landing in her inbox. Keep stops 1 and 2 fast (seconds) and set a firm, modest deadline on the lead agent.
  • Risk of silent wrong answers at early stops: a stale stored fact or an overly broad policy can settle a question before the requester ever sees it. Pair this pattern with Decision Audit so the requester spot-checks decisions settled below her.
  • Matching quality matters: if the hub fails to classify a question's decision_class accurately, a reserved decision could slip into stop 1 or stop 3 instead of bypassing them.

Practical implementation notes

  • Run stops 1 and 2 inside the hub: relying on workers to "remember to check docs and policies before asking" fails under context pressure; running both stops in hub code guarantees consistent order and complete routing history.
  • Always pass on when in doubt: whether matching by exact decision class or an LLM classifier, any ambiguity or expired record must close as passed_on rather than guessing an answer.
  • Mine routing history for new policies: a decision class that repeatedly passes stops 1–3 and gets the exact same answer from the requester is a prime candidate for a new Delegation Policy.
  • Handle crashed lead agents explicitly: either pass the question straight to the requester with the timeout reason (simplest) or open a fresh step for a replacement lead agent while keeping the original step closed.

Known uses and related patterns

  • PagerDuty escalation policies: routes incident alerts through ordered escalation levels with per-level timeouts, advancing automatically when a responder fails to acknowledge before the deadline.
  • Claude Code permission evaluation & agent teams: evaluates tool calls against ordered deny, ask, and allow rules before prompting, and routes teammate permission prompts through the lead session.
  • Tiered technical support (L1/L2/L3): resolves routine lookups and known-issue runbooks at lower tiers while escalating novel or high-severity cases with the full diagnostic trail attached.
  • Volgenic: routes worker questions first to their lead agent rather than directly to the human requester, preserving a durable trail when a question is escalated or moved after a lead session stops.
  • Contrast with Chain of Responsibility and Enterprise Integration Patterns: classic Chain of Responsibility passes a request down handlers until one handles it; Escalation Chain orders handlers by requester attention cost, combines a Content-Based Router for reserved bypasses, and keeps a durable Message History via routing_steps.

Related patterns

  • Delegation Policy — supplies the standing policies checked at stop 2, the lead agent's decision scope at stop 3, and the reserved rules checked upfront.
  • Decision Audit — samples questions settled at stops 1–3 so the requester verifies the chain is stopping the right asks.
  • Question Inbox — controls when questions reaching stop 4 are batched for check-ins versus interrupting immediately.
  • Self-Contained Question & Tracked Answer — define the Question record entering the chain and the Answer produced when a stop settles it.
  • Policy Gate — blocks a guarded transition until its conditions pass, raising a reserved question straight to stop 4 when human sign-off is required.
  • Orchestrator-Workers — defines the Party record referenced by every routing step's handler_id.