---
title: "Add a judge and escalate"
lesson_id: "04"
---

# Add a judge and escalate

- **Lesson ID:** 04
- **Goal:** Send a split tally to a judge. Escalate means stop and show a person.
- **Human lesson:** [04-judge-and-escalation.html](04-judge-and-escalation.html)

## Prerequisites

Lesson 03.

## Inputs, outputs, and artifacts

- **Inputs:** A failed or split tally and the vote packet.
- **Outputs:** Gate allow, block, or escalate.
- **Artifacts:** Judgment and resolve sketches.

## Agent build steps

1. Run a judge session or the judge seat on a Dynamic Profile.
2. Define escalate as a UI stop, not a retry of the action.
3. Keep the judge on device unless the packet is already redacted.
4. Link [Pause and resume long AI jobs](../on-device-durable-workflows/), [Stop prompt attacks and leaks](../on-device-guardrails/), and [Talk to tools with MCP](../on-device-mcp-server-client/).

## Constraints

iOS 27 or later, or macOS 27 or later, and Xcode 27. Plain spoken English. No metaphor, quizzes, Mermaid, or em dashes. Do not claim Dynamic Profiles run several agents in parallel inside one session. Parallel votes need several LanguageModelSession values. Confirm Dynamic Profile names in the installed SDK docs.

## Key concepts

- A split vote goes to a judge session or a judge seat.
- The judge returns approve, reject, or escalate.
- Escalate means stop and show a person, not try the action anyway.
- The judge sees votes, not permission to invent a new action.

## Takeaways

- Do not call a side-effect tool from the judge session.
- Keep the judge on-device unless you redact first.
- Escalation is a UI state that waits for a person.

## Acceptance checks

- Escalate shows a person and stops.
- The judge does not run the side-effect tool.
- Sibling links, progressive .flow diagrams, and the Agent brief link are present.
- [ ] Proceed to [lesson brief](05-gate-the-action.llms.md).
