Record Class EscalationRequest
- Record Components:
reviewId- the paused review sessiontriggeringFinding- the CRITICAL finding that caused the pausequestion- the specific question the developer must answeravailableOptions- the decision types the developer can choose fromescalatedAt- ISO-8601 timestamp when the escalation was createdconfidenceNote- optional explanation if confidence affects the severity
Analogy: like a circuit breaker tripping — when current (risk) exceeds
the safe threshold, the breaker opens (review pauses) and a human must
manually reset it. EscalationRequest is the message the breaker
sends to the electrician: "I tripped on this specific problem, here are
your options, please decide."
Flow:
OrchestratorAgent#escalate()detects CRITICAL finding with confidence ≥ 0.70- Creates
EscalationRequestand returns it toOrchestratorAgent - Orchestrator pauses the review, stores the request under
reviewId GetReportToolreturnsstatus: AWAITING_HUMANwith this request- Claude Desktop presents the finding to the developer
- Developer calls
RespondToEscalationToolwith their decision OrchestratorAgent.resumeAfterEscalation()is called → review continues
CERTIFICATION NOTE — Domain 1: Agentic Architecture & Orchestration (27%):
EscalationRequest is what the OrchestratorAgent returns to
the MCP layer when it cannot proceed autonomously. The orchestrator stores
the review session in AWAITING_HUMAN state and attaches this object so
GetReportTool can surface it to Claude Desktop. The loop is paused,
not terminated — it resumes exactly where it stopped once the human decides.
CERTIFICATION NOTE — Domain 5: Context Management & Reliability (15%): This class represents the "pause point" in an agentic loop — the moment when the system decides it cannot continue autonomously and must involve a human. The exam tests: when should an agent pause? What information must it surface? How does it resume? This record answers all three.
-
Constructor Summary
ConstructorsConstructorDescriptionEscalationRequest(String reviewId, Finding triggeringFinding, String question, List<HumanDecision.DecisionType> availableOptions, String escalatedAt, String confidenceNote) Creates an instance of aEscalationRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavailableOptionsrecord component.Returns the value of theconfidenceNoterecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theescalatedAtrecord component.final inthashCode()Returns a hash code value for this object.question()Returns the value of thequestionrecord component.reviewId()Returns the value of thereviewIdrecord component.static StringstandardQuestion(Finding finding) Standard escalation question for a CRITICAL finding.final StringtoString()Returns a string representation of this record class.Returns the value of thetriggeringFindingrecord component.static StringuncertaintyQuestion(Finding finding) Uncertainty escalation question for a CRITICAL finding with 0.70–0.84 confidence.
-
Constructor Details
-
EscalationRequest
public EscalationRequest(String reviewId, Finding triggeringFinding, String question, List<HumanDecision.DecisionType> availableOptions, String escalatedAt, String confidenceNote) Creates an instance of aEscalationRequestrecord class.- Parameters:
reviewId- the value for thereviewIdrecord componenttriggeringFinding- the value for thetriggeringFindingrecord componentquestion- the value for thequestionrecord componentavailableOptions- the value for theavailableOptionsrecord componentescalatedAt- the value for theescalatedAtrecord componentconfidenceNote- the value for theconfidenceNoterecord component
-
-
Method Details
-
standardQuestion
Standard escalation question for a CRITICAL finding. Used when confidence ≥ 0.85 (high certainty).Called by
OrchestratorAgent#escalate()when a CRITICAL finding is detected inSubAgent.execute(). The orchestrator checks confidence, picks this method oruncertaintyQuestion(), creates theEscalationRequest, stores it in the session, and blocks the agent thread on aCountDownLatchuntil the developer responds viaRespondToEscalationTool. -
uncertaintyQuestion
Uncertainty escalation question for a CRITICAL finding with 0.70–0.84 confidence. Includes a note that the agent is not fully certain. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
reviewId
Returns the value of thereviewIdrecord component.- Returns:
- the value of the
reviewIdrecord component
-
triggeringFinding
Returns the value of thetriggeringFindingrecord component.- Returns:
- the value of the
triggeringFindingrecord component
-
question
Returns the value of thequestionrecord component.- Returns:
- the value of the
questionrecord component
-
availableOptions
Returns the value of theavailableOptionsrecord component.- Returns:
- the value of the
availableOptionsrecord component
-
escalatedAt
Returns the value of theescalatedAtrecord component.- Returns:
- the value of the
escalatedAtrecord component
-
confidenceNote
Returns the value of theconfidenceNoterecord component.- Returns:
- the value of the
confidenceNoterecord component
-