Mandatory Red-Flag Escalation

aka Unconditional Escalation Trigger, Red-Flag Short-Circuit

category: safety-control · status: mature

Maintain a deterministic set of high-risk triggers so that on any match the agent immediately aborts its workflow and hands off to a human, without weighing whether to escalate. A telehealth triage voice agent is collecting symptoms when the caller says their father is not breathing. The phrase matches a red-flag trigger, so the agent abandons the symptom questionnaire mid-question, stops all further autonomous handling, and warm-transfers the call to an on-call nurse with the transcript and the fields gathered so far attached, rather than finishing the form first.

2. Problem

An agent runs a conversational or task workflow where a small fraction of inputs signal a life-, safety-, or money-critical situation: a clinical triage line, a crisis-support chat, a fraud or safety hotline, an industrial-control assistant. The workflow normally proceeds turn by turn, gathering context and acting, but a few signals mean that continuing the normal flow at all is the wrong move and a human must take over at once.

When a high-stakes signal appears, an agent left to its own judgement tends to keep doing what it was doing: it asks one more clarifying question, finishes the current step, or scores the situation against a soft threshold before deciding to escalate. Each of those extra turns is a chance to mishandle an emergency, and a model that treats escalation as one option among many will sometimes rationalise staying in the loop. The system needs a guarantee that a matched red flag stops normal handling immediately, not a tendency that usually does.

Competing forces:

3. When to Use

4. When Not to Use

5. Architecture Diagram

flowchart TD
  T[Incoming turn] --> C{Red-flag match?}
  C -- no --> W[Continue normal workflow]
  W --> T
  C -- yes --> A[Abort workflow now]
  A --> H[Warm handoff: transcript + context]
  H --> Op[Human owns the thread]

Every turn is checked first; a match forces an immediate abort and warm handoff, bypassing the rest of the workflow.

6. Components

7. Tools

8. Guardrails

On a matched red flag the agent must abort the workflow and hand off to a human immediately; it may not continue autonomous handling, ask further questions, or treat escalation as one option to be weighed against continuing.

Therefore: define the red flags as explicit, deterministic triggers checked on every turn, and on a match force an immediate abort-and-handoff that the model cannot reason its way out of, attaching the context gathered so far.

9. Failure Modes

10. Evaluation Metrics

11. Code Examples

Check every turn against a deterministic trigger set first; on a match, abort the workflow and warm-hand-off with the context gathered so far.unverified

# Versioned, deterministic trigger set, reviewed against the governing protocol.
RED_FLAGS = load_red_flag_rules(version="2026-06")   # phrases + classifier thresholds

def red_flag_match(turn, context):
    if RED_FLAGS.phrase_match(turn.text):
        return True
    return RED_FLAGS.classifier_score(turn.text, context) >= RED_FLAGS.threshold

def handle_turn(turn, context):
    # The check runs BEFORE the normal workflow, on every turn, outside model discretion.
    if red_flag_match(turn, context):
        abort_workflow(context)                       # stop all further autonomous handling
        warm_handoff(
            operator=on_call_human(),
            transcript=context.transcript,
            collected=context.structured_fields,      # pass context gathered so far
        )
        # The model only relays a fixed message; it does NOT decide whether to escalate.
        return relay(RED_FLAGS.escalation_message)

    # No red flag: normal turn-by-turn handling proceeds.
    reply = agent.step(turn, context)
    context.append(turn, reply)
    return reply

Expected benefits

Known uses

Related patterns

References