Go/pagerduty·

Awaithuman: go/pagerduty

The go/pagerduty pattern has evolved from a URL redirect into an architectural standard for AI agent escalation. This guide explains how to implement it with full context preservation, and why most teams get it wrong.

What the Go/PagerDuty Pattern Really Means for AI Agent Escalation

What the Go/PagerDuty Pattern Actually Does

The pattern only works when the escalation payload carries enough context for immediate action.

The Scope of the Pattern

The "go" side defines when the agent continues unassisted.

Structural Components Required

  • A trigger condition: a deterministic rule or threshold that causes escalation. This could be a confidence score below 0.6, a spending limit exceeded, a regulatory action flagged, or a user request that contains ambiguous terms.
  • A context-packaging step: the agent must snapshot its current state, the full reasoning trace, every tool call made and its result, the original user input, and any intermediate variables, and attach that snapshot to the escalation signal. Without this, the human operator starts a reconstruction process that often takes longer than the agent itself would have taken to retry.
  • A notification channel: the escalation must reach a human operator through a medium that suits the urgency and the operator's working context. A synchronous page for production incidents; an async queue for non-blocking reviews.

One common oversight is treating the escalation as a mere alert. AwaitHuman's own documentation emphasizes context preservation as the core requirement: the agent's reasoning trace, tool logs, and user input must travel with the escalation, not just a status message. Teams that skip this step end up with a pattern that is strictly worse than not escalating at all.

Four Escalation Trigger Types

The trigger type defines what the agent has to emit, what the human has to evaluate, and how the resume path works. These four categories cover nearly every production use case.

The agent's own internal confidence score, or the output of a separate classifier, falls below a defined floor. The defining characteristic is that the agent itself signals doubt. This is the most automatable trigger because the signal is available mid-inference. The agent must be instrumented to expose its per-step confidence, which most modern LLM APIs provide. Misclassifying a low-confidence output as a success means the human never sees the error, and the agent proceeds with a statistically likely but factually wrong answer.

The agent attempts to perform an action that crosses a governance rule, a spending cap, a data-access tier, a regulatory constraint on which countries' data can be processed. The distinguishing criterion is that the rule is externally defined and the agent has no discretion to override it. The policy engine intercepts the tool call before execution and routes the request to a human for approval or rejection. This trigger type is the most straightforward to implement because the rule set is explicit, but it also has the sharpest failure mode: if the policy definitions are incomplete, the agent may escalate too little or too much.

The task requires multi-step reasoning or domain knowledge beyond the agent's capability tier. The AG2 project documents escalation as a core pattern: simpler agents route tasks to more capable agents when they exceed their own capacity. The same logic applies when the "more capable agent" is a human. The signal is emitted at the orchestration layer, a router or planner determines that the current agent cannot handle the task before assigning it. Misclassifying a complexity ceiling as a policy boundary means the human approves the action but the agent still cannot execute it, leading to a second escalation or a broken workflow.

The user's intent is genuinely underspecified. No amount of additional tool calls can resolve the ambiguity without human input. Classic examples: "Send the report to the client" when there are three client contacts, or "Update the contract with the new terms" when the agent cannot use a human-approved set of changes. The signal fires at the input-parsing layer, the intent classifier or slot-filling step returns an underspecified result. This is the hardest trigger to wire because ambiguity is subjective and context-dependent. A rule-based check for missing slots catches the obvious cases, but subtle ambiguities require a classifier trained on your specific domain.

Choosing and Wiring the Right Trigger

Each step produces inputs for the next.

  1. Audit the agent's failure modes. Before writing any escalation code, map which failure type each workflow step is exposed to. A customer support agent that processes refunds will hit policy boundaries (refund limit), confidence thresholds (unclear complaint), and occasionally ambiguity (vague request). A code review agent hits complexity ceilings (large PRs) and policy boundaries (security-sensitive changes). The trigger type determines the signal shape, so this audit is where you get the design right.
  2. Define a testable predicate. Not "the agent seems unsure" but a concrete threshold the code can evaluate deterministically. For confidence, a float against a cutoff. For policy, a match against a rule in a policy engine. For complexity, an estimated step count or domain match score. For ambiguity, a slot-filling completeness check plus a classifier score. The predicate must be discrete and testable in isolation.
  3. Package the escalation payload when the predicate fires. Capture the reasoning trace, the tool-call log (every call made up to that point, including their outputs), the current agent state (variables, intermediate results), and the original user input. Do this before you send the notification. The payload must be self-contained so the human operator can understand the situation without querying the agent.
  4. Route the payload through a matching channel. A synchronous page (phone call, SMS) for time-critical decisions like a production rollback. An async queue (email, dashboard notification) for non-blocking review like a refund approval. The channel must match the urgency of the trigger. Using email for a policy-boundary escalation that blocks a revenue-generating workflow frustrates operators and slows resolution.
  5. Design the resume path. The agent must be able to receive the human's decision and continue from the exact state it paused at. This means persisting the agent's snapshot externally and making it accessible to a continuation endpoint. A restart pattern, where the agent re-executes from scratch after receiving human input, duplicates tool calls, inflates cost, and can produce side effects (e.g., sending a confirmation email twice). The resume path is the least-optimized component in most implementations.

Skipping step 3, the context-packaging step, is the single most common implementation error. Teams wire the trigger, notify the human, and assume the human can reconstruct context from a log search. They cannot, and the time they spend reconstructing defeats the latency improvement the pattern was supposed to deliver.

Under the Hood: How Triggers Propagate Through the Stack

Each trigger type fires at a different layer of the agentic stack, and the layer determines what context is available when the escalation occurs.

Confidence-threshold triggers fire inside the agent's own inference loop. The LLM call returns a confidence score alongside the output, and the agent code checks it immediately. The context available at this layer is the richest: the full reasoning trace, the prompt, the preceding turns. If the agent is instrumented correctly, the human operator receives the agent's own chain-of-thought, not just a summary. This makes it the most informative trigger type but also the most invasive to implement, you must instrument every inference path.

Policy-boundary triggers fire at the tool-call layer. The agent attempts a call to an external service (payment gateway, database write, email send), and a policy engine intercepts the call before execution. The context available here is the tool arguments and the policy rule that fired. Unless the agent is explicitly instrumented to log its intermediate reasoning steps (which most frameworks do not do by default), the human sees only the attempted action, not why the agent chose it. This is a critical gap: the human can approve or deny the action but may lack context to diagnose the root cause.

Complexity-ceiling triggers fire at the orchestration layer. A router or planner evaluates the task against a capability registry before assigning it to an agent. The context available is the task description and the capability mismatch. The router often has no visibility into the agent's internal reasoning because the agent hasn't started executing yet. This means the human operator receives the task and must either complete it themselves or delegate it to the right resource, the agent's context is not available.

Ambiguity-signal triggers fire at the input-parsing layer. The intent classifier or slot-filling step returns an underspecified result. The context available is the raw user input and the set of missing or ambiguous slots. The human operator can ask a clarifying question and send the completed input back to the agent, which then proceeds with full context.

The mechanical distinction matters because it tells you what context you must reconstruct. An inference-layer trigger already has the reasoning trace; a tool-call-layer trigger likely does not, and you must instrument the agent to log it.

Where the Pattern Breaks

The human operator receives a generic notification: "Agent stuck on order #4521." No trace, no tool history, no current state. The operator has to log into the dashboard, find the agent session, replay the conversation, and reconstruct what happened, ten minutes of delay on top of the escalation itself. The pattern now introduces more latency than it saves.

Using a policy-boundary trigger to handle what is actually an ambiguity problem produces a structurally different failure. The agent escalates because a rule fired, say, a spending limit on a purchase. The human approves the purchase, but the real issue was that the user specified "the expensive option" without saying which one. The human's approval doesn't resolve the ambiguity, so the agent still picks the wrong product. The policy rule was satisfied, but the output is wrong.

Designing the resume path as a restart rather than a continuation doubles the agent's execution cost. The agent receives the human's input, re-initializes, and re-executes every tool call from scratch. For complex workflows, this can mean hundreds of additional LLM calls and tool executions, any of which can produce side effects. A restart is always worse than a continuation, yet many teams default to it because it is easier to implement, just drop the agent context and start a new session.

Treating escalation as a binary rather than as a typed signal is the fourth common failure. The human operator receives an escalation but has no idea whether it is a confidence problem, a policy violation, a complexity exceedance, or an ambiguity. Without this type information, the human cannot give a targeted response. A confidence escalation needs verification of the agent's output; a policy escalation needs approval or denial; a complexity escalation needs the task to be reassigned; an ambiguity escalation needs a clarification. The same escalation payload needs a different human response depending on the type, but if the type is not encoded, the operator guesses, and often guesses wrong.

Each of these failures has a different root cause, but they share one pattern: the implementation skipped the context-packaging step or the typing step. Fix those two, and most failures disappear.

How AwaitHuman Implements the Go/PagerDuty Pattern for Agentic Workflows

We focus on the three components that production teams consistently undervalue: context preservation, typed escalation, and the resume path.

Our drop-in approval queues implement the async escalation path described in the framework section. When an agent fires a trigger, the escalation enters a queue where a human operator can review it without the agent timing out. The agent pauses and waits, no restart, no lost state. The queue respects ordering and priority so critical escalations are processed first.

Our dynamic escalation triggers via native tool calling map cleanly onto all four trigger types. The agent emits a tool call to signal escalation, which means the trigger fires at the tool-call layer and the full reasoning trace is available at the moment of escalation. The tool call carries the trigger type as a parameter, so the human operator knows whether this is a confidence, policy, complexity, or ambiguity escalation before they open the payload. The tool call also attaches the packaged context (trace, tool logs, state, user input) as structured data, no manual reconstruction needed.

Our omnichannel operator alerts (Push, Email, SMS, Telegram, WhatsApp) address the channel-matching requirement from the framework section. A time-critical policy boundary gets routed to SMS or push notification; a low-ambiguity clarification goes to email or a dashboard queue. The operator chooses their preferred channel, and the system respects that preference per trigger type. This reduces notification fatigue and improves response time.

Our intervention dashboards with full agent reasoning context solve the context-packaging problem directly. The human operator sees the agent's reasoning trace, each tool call and its result, the agent state at the moment of escalation, and the original user input, all in one screen. No log search, no session replay. The operator can approve, deny, edit the response, or ask for clarification, and the agent receives the decision and continues from its paused state.

Our immutable audit trails support compliance and fine-tuning use cases downstream of the escalation. Every escalation event, from the trigger to the operator's response to the agent's continuation, is logged with a timestamp and the full payload. Regulated teams can use these logs to demonstrate that every action was reviewed by a human when required. Model fine-tuning teams can extract the escalations as training data for the edge cases the agent missed.

Teams using LangChain, Claude, or OpenAI agents can integrate AwaitHuman via a single webhook. The agent emits a tool call, and AwaitHuman handles the rest: routing, notifications, dashboards, and resume. AwaitHuman is currently in beta, and we are actively working with teams to refine the trigger-type handling and context-preservation features.

Frequently Asked Questions About the Go/PagerDuty Pattern

What does PagerDuty do?

The pattern extends this model by requiring context preservation and typed triggers.

Is PagerDuty free to use?

Paid plans add advanced analytics, enterprise integrations, and higher event volumes. For the AI agent escalation pattern pattern applied to AI agents, the cost of the alerting platform itself is usually secondary to the operational cost of responding to escalations, which is why context preservation matters so much.

Is PagerDuty a real company?

Yes. It was founded in 2009 and is widely used for incident response in software operations. The human-in-the-loop infrastructure pattern borrows its naming convention from the company's role in operational alerting, but the pattern itself is platform-agnostic and can be implemented with any notification tool.

What is a PagerDuty incident?

In the agentic workflow escalation pattern for AI agents, the equivalent is an escalation event, a structured handoff that carries the agent's context to a human operator and remains open until the human responds and the agent resumes.