This prompt is designed for agent workflows that pause execution at a predefined approval gate and must hand a concise, actionable summary to a human reviewer. The reviewer needs to understand what the agent has done, what decision is required now, what evidence supports the proposed action, what risks are present, and what happens if they approve or reject. Use this prompt when the cost of a wrong autonomous decision exceeds the cost of human review time—for example, before sending a high-value email, executing a database migration, approving a financial transaction, or publishing content that carries legal or reputational risk. The prompt assumes the agent has already executed prior steps, collected tool outputs, and reached a point where it cannot proceed without explicit human authorization.
Prompt
Human-in-the-Loop Handoff State Prompt

When to Use This Prompt
Defines the precise conditions, required context, and risk thresholds for deploying the Human-in-the-Loop Handoff State Prompt in production agent workflows.
Do not use this prompt for real-time streaming decisions where latency makes human review impractical, trivial approvals where the agent's confidence is already calibrated above your defined threshold, or situations where the human reviewer already has full context from another source such as a dashboard or notification system. This prompt is also inappropriate when the approval decision requires domain expertise the reviewer does not possess—handing a complex medical or legal decision to a non-expert reviewer creates a false sense of safety. Before deploying this prompt, verify that your reviewer pool has the necessary context, authority, and training to evaluate the agent's proposed action. The prompt's value comes from compressing agent state into a reviewer-optimized format, not from replacing the reviewer's judgment.
The ideal user of this prompt is an engineering team building agent orchestration systems that include explicit human approval nodes. You should already have infrastructure for pausing agent execution, queuing review tasks, capturing reviewer decisions, and resuming or aborting the workflow based on the response. This prompt is the interface between your agent runtime and your human operations layer. To implement it correctly, you must define the approval schema upfront: what decision types are possible (approve, reject, modify, escalate), what evidence must be presented for each decision type, and what metadata your logging and audit systems require. The prompt template in the next section provides the structure; your application code must enforce that the agent cannot proceed until a valid reviewer response is received and validated against your schema.
Next, copy the prompt template and adapt the placeholders to your specific approval gate. Pay particular attention to the [RISK_LEVEL] and [CONSTRAINTS] placeholders—these directly shape how the agent communicates uncertainty and what guardrails it applies to its own recommendations. After adapting the template, build your eval suite using the criteria in the Evaluation and Testing section to ensure the handoff summaries are complete, accurate, and decision-ready before you put a human reviewer in the loop.
Use Case Fit
Where the Human-in-the-Loop Handoff State Prompt delivers value and where it introduces risk. Use these cards to decide whether this prompt fits your workflow before wiring it into production.
Strong Fit: Approval-Gated Workflows
Use when: your agent reaches a decision point that requires human sign-off before proceeding, such as high-value transactions, content publication, or configuration changes. Guardrail: The prompt structures pending decisions, evidence, and risk flags so reviewers can act without reading full agent traces.
Strong Fit: Long-Running Autonomous Agents
Use when: agents operate for many steps and need to pause at checkpoints for human review without losing context. Guardrail: The handoff summary preserves decision history and pending actions, preventing reviewers from needing to replay the entire session to understand current state.
Poor Fit: Real-Time Streaming Interactions
Avoid when: latency budgets are under 500ms or the interaction requires continuous back-and-forth without pause points. Guardrail: This prompt is designed for deliberate handoff, not inline interruption. Use lightweight state flags instead of full summaries for real-time paths.
Required Inputs: Structured Agent State
Risk: The prompt produces vague or incomplete summaries if fed raw conversation logs without structured state. Guardrail: Require a structured input object containing active plan, completed steps, pending decisions, tool outputs, and risk flags. Validate schema before invoking the prompt.
Operational Risk: Missing Consequence Disclosure
Risk: The summary may list pending decisions without explaining what happens if the reviewer approves, denies, or delays each one. Guardrail: Include an eval check that verifies every decision in the output has an associated consequence statement. Fail the handoff if consequences are missing.
Operational Risk: Stale Context in Delayed Review
Risk: If a reviewer picks up the handoff hours or days later, the summarized context may no longer reflect ground truth. Guardrail: Timestamp the handoff, include a context freshness warning, and provide a path for the reviewer to request a refreshed summary before acting.
Copy-Ready Prompt Template
A reusable prompt that generates a reviewer-ready handoff summary when an agent pauses at an approval gate.
This prompt template is designed to be pasted into your agent's handoff module. It takes the agent's current execution state—including the active plan, completed steps, pending decisions, tool outputs, and any risk flags—and produces a structured summary that a human reviewer can act on without reading the full trace. The template uses square-bracket placeholders that you wire to your agent runtime's state object before calling the model.
textYou are an agent handoff summarizer. Your job is to produce a concise, actionable summary of the current agent state for a human reviewer who must approve or reject pending decisions. ## Current Agent State - Active Plan: [ACTIVE_PLAN] - Completed Steps: [COMPLETED_STEPS] - Current Step: [CURRENT_STEP] - Pending Decisions: [PENDING_DECISIONS] - Tool Outputs (last 5): [RECENT_TOOL_OUTPUTS] - Risk Flags: [RISK_FLAGS] - Assumptions Made: [ASSUMPTIONS] - Confidence Scores: [CONFIDENCE_SCORES] ## Output Schema Return a JSON object with the following fields: { "summary": "One-paragraph summary of what the agent is doing and why.", "pending_decisions": [ { "id": "decision_id", "description": "What needs to be decided.", "options": ["option_a", "option_b"], "agent_recommendation": "Recommended option with rationale.", "risk_level": "low|medium|high", "consequences_if_wrong": "What happens if this decision is wrong." } ], "evidence_summary": "Key evidence the agent used to reach this point.", "risk_assessment": { "overall_risk": "low|medium|high", "top_risks": ["risk_1", "risk_2"], "irreversible_actions_taken": ["action_1"] }, "next_steps_if_approved": ["step_1", "step_2"], "questions_for_reviewer": ["question_1"], "missing_information": ["info_gap_1"] } ## Constraints - Do not omit the `consequences_if_wrong` field for any pending decision. - If no irreversible actions have been taken, return an empty array, not null. - Flag any decision where the agent's confidence is below [CONFIDENCE_THRESHOLD]. - If the agent has made assumptions, list them explicitly in the summary. - Keep the summary under 200 words. - Use the exact risk levels provided; do not invent new categories.
To adapt this template, replace each bracketed placeholder with values from your agent's execution state. The [ACTIVE_PLAN] should include the full plan structure with dependencies. [PENDING_DECISIONS] must capture every gate where the agent is waiting for human input. Set [CONFIDENCE_THRESHOLD] to a value appropriate for your risk tolerance—typically 0.7 for high-stakes workflows, 0.5 for exploratory ones. Before deploying, validate that your state serialization produces valid JSON for each placeholder and that the output schema matches your review queue's expected format. For high-risk domains, always include a human-readable fallback rendering alongside the structured JSON.
Prompt Variables
Inputs the prompt needs to work reliably. Wire these from your agent's execution state, tool outputs, and policy configuration.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[AGENT_ID] | Unique identifier for the agent instance requesting handoff | agent-7f3a-legal-review-01 | Must match active agent registry; non-null string; reject if agent not in PENDING_HANDOFF state |
[WORKFLOW_ID] | Identifier for the overall workflow or case this handoff belongs to | case-2025-0892-contract-review | Must resolve to an active workflow record; reject if workflow is CLOSED or CANCELLED |
[CURRENT_PLAN_STATE] | Serialized representation of the agent's plan with completed, in-progress, and pending steps | {"steps": [{"id":"1","status":"COMPLETE"}, {"id":"2","status":"PENDING_APPROVAL"}]} | Must parse as valid JSON with required fields: steps array, each with id and status; reject if plan is empty or all steps are COMPLETE without pending decisions |
[PENDING_DECISIONS] | Array of decision points requiring human input, each with context, options, and agent recommendation | [{"decision_id":"d1","question":"Approve vendor clause 4.2?","options":["APPROVE","REJECT","MODIFY"],"agent_recommendation":"REJECT"}] | Must be non-empty array; each decision must have decision_id, question, and options; reject if no pending decisions exist (handoff unnecessary) |
[ACTION_CONTEXT] | Relevant evidence, tool outputs, and reasoning that led to each pending decision | {"d1": {"clause_text": "...", "risk_flags": ["unlimited_liability"], "tool_outputs": [{"tool": "clause_extractor", "result": "..."}]}} | Must be valid JSON mapping decision_id to context object; each context must include at minimum the evidence that informed the agent recommendation; reject if context missing for any pending decision |
[RISK_FLAGS] | Prioritized list of risks identified during execution that the reviewer must be aware of | [{"severity":"HIGH","type":"compliance_risk","description":"GDPR data processing clause missing","affected_decisions":["d3"]}] | Must be array; severity must be one of HIGH, MEDIUM, LOW; reject if HIGH severity flags present but no corresponding affected_decisions linked |
[EXPECTED_OUTCOMES] | What the agent expects to happen after each possible human decision, including downstream step impacts | {"d1": {"APPROVE": "Proceed to step 3 with accepted clause", "REJECT": "Escalate to legal for redline; pause workflow"}} | Must be valid JSON mapping decision_id to outcome map; each option in PENDING_DECISIONS must have a corresponding outcome; reject if outcomes missing for any decision option |
[STATE_TIMESTAMP] | ISO 8601 timestamp of when this handoff state was captured | 2025-03-15T14:30:00Z | Must parse as valid ISO 8601; must be within agent session window; reject if timestamp is older than workflow timeout threshold |
Implementation Harness Notes
How to wire the handoff state prompt into an agent application with validation, retries, logging, and human-review queue integration.
The Human-in-the-Loop Handoff State Prompt is not a standalone artifact—it is a contract between the agent runtime and the human review queue. Wire this prompt into your application at the exact point where the agent pauses execution and requires a human decision. The prompt consumes the agent's current state snapshot (plan progress, pending decisions, tool outputs, risk flags) and produces a structured reviewer-ready brief. The output must be validated before it reaches a human reviewer, because an incomplete or misleading handoff summary causes decision errors that compound across the rest of the workflow.
Integrate the prompt into an API call that passes the agent's serialized state as [AGENT_STATE], the list of pending decisions as [PENDING_DECISIONS], and any risk classification as [RISK_LEVEL]. On the response path, validate the output against the expected [OUTPUT_SCHEMA] before enqueueing it for human review. Required fields include decision_summary, action_context, risk_flags, and expected_outcomes. If validation fails, retry once with the validation errors injected into [CONSTRAINTS] as explicit missing-field or malformed-output instructions. After a second failure, log the raw response and the validation errors, then escalate to an on-call channel rather than silently retrying. For high-risk domains (healthcare, finance, legal), always route the validated handoff through a human-review queue that records the reviewer's decision, timestamp, and any override rationale. This creates an audit trail that links the agent's state at pause time to the human action taken.
Model choice matters here. Use a model with strong instruction-following and structured output capabilities (GPT-4o, Claude 3.5 Sonnet, or equivalent). Avoid smaller or older models that may drop required fields or hallucinate risk flags. If your agent runtime uses tool-calling, include the tool call history and outputs in [AGENT_STATE] so the handoff summary accurately reflects what the agent has already attempted. For logging, capture the prompt version, the agent state hash, the validated handoff output, the reviewer's decision, and the time-to-decision latency. These logs become essential for debugging decision errors, auditing compliance, and measuring whether the handoff prompt is producing actionable summaries or causing review fatigue. Do not treat this prompt as a fire-and-forget text generation step—treat it as a state serialization and decision interface that must be tested, monitored, and versioned alongside the rest of your agent harness.
Expected Output Contract
Fields, format, and validation rules for the generated handoff summary. Use this contract to parse, validate, and route the model output before presenting it to a human reviewer.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
handoff_id | string (UUID v4) | Must match regex ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ | |
generated_at | string (ISO 8601 UTC) | Must parse as valid datetime; must be within 5 minutes of system clock at validation time | |
workflow_name | string | Must be non-empty; must match one of the allowed workflow identifiers from [WORKFLOW_REGISTRY] | |
pending_decisions | array of objects | Must contain at least 1 item; each item must have decision_id (string), title (string), options (array of strings with min 2 items), and recommended_option (string that appears in options array) | |
action_context.summary | string | Must be 50-2000 characters; must not contain unresolved placeholders or template tokens | |
action_context.completed_steps | array of strings | Must contain at least 1 item; each string must match a step_id from [EXECUTION_LOG] | |
risk_flags | array of objects | Must contain at least 1 item if any risk detected, otherwise empty array; each item must have severity (enum: low, medium, high, critical) and description (non-empty string) | |
expected_outcomes | array of strings | Must contain at least 1 item per pending_decision; each string must describe a concrete consequence of choosing the recommended_option |
Common Failure Modes
When a human-in-the-loop handoff prompt fails in production, the cost is not just a bad summary—it's a wrong decision, a missed escalation, or a stalled workflow. These are the most common failure patterns and how to guard against them.
Missing Consequence Disclosure
What to watch: The summary presents options without stating what happens if the reviewer approves, rejects, or delays. Reviewers make decisions blind to downstream effects. Guardrail: Require a dedicated consequences block in the output schema that maps each decision path to its expected outcome, risks, and reversibility.
Over-Summarization of Risk Flags
What to watch: The prompt compresses multiple risk signals into a single confidence score or buries critical warnings in dense prose. Reviewers miss high-severity issues that should block approval. Guardrail: Enforce a structured risk_flags array with severity levels, and add an eval that checks whether any critical flag appears outside the first screen of the summary.
Stale Context in Handoff Payload
What to watch: The handoff includes tool outputs or plan steps that were valid at checkpoint time but are now outdated. Reviewers act on obsolete information. Guardrail: Add a context_freshness field with timestamps and a validator that compares checkpoint age against a configurable TTL before the handoff is presented.
Decision Framing Bias
What to watch: The summary language subtly steers the reviewer toward a preferred outcome—using loaded terms, asymmetric detail, or anchoring. This undermines the purpose of human review. Guardrail: Run an eval that checks for balanced representation: each decision path should receive comparable detail, and evaluative adjectives should be flagged for review.
Incomplete Evidence Trace
What to watch: The handoff states conclusions without linking back to the specific tool outputs, source documents, or reasoning steps that produced them. Reviewers cannot verify claims and either trust blindly or waste time reconstructing the trail. Guardrail: Require inline citations or a source_map object that connects each claim to its origin, and add an eval that checks citation coverage for all asserted facts.
Silent Handoff Failure on Partial State
What to watch: The prompt receives incomplete agent state—missing tool results, truncated plan steps, or unresolved dependencies—but still produces a confident-looking summary. The reviewer never knows the handoff is built on gaps. Guardrail: Add a state_completeness check before handoff generation. If required fields are missing, the prompt must produce a gaps_disclosure section instead of a normal summary, and the eval must verify that incomplete state never produces a standard handoff.
Evaluation Rubric
How to test output quality before shipping. Run these checks on a golden dataset of handoff scenarios with known-good reviewer decisions.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Decision Clarity | Every pending decision is stated as a discrete, unambiguous question with exactly 2-5 concrete options | Decision is missing, phrased as a vague statement, or options are unbounded | Parse the [PENDING_DECISIONS] block. Assert each entry has a 'question' field and an 'options' array with 2-5 strings |
Action Context Completeness | Each decision includes the original goal, steps completed so far, and the specific output that triggered the pause | Missing goal reference, skipped steps, or no trigger event cited | For each decision, check that [GOAL], [COMPLETED_STEPS], and [TRIGGER_OUTPUT] fields are non-null and contain at least one sentence |
Risk Flag Accuracy | All risk flags map to a specific decision and cite the exact evidence or rule that triggered the flag | Risk flag is generic, unattributed, or references no decision | Extract [RISK_FLAGS] array. Assert each flag has a non-null 'decision_id' matching a [PENDING_DECISIONS] entry and a non-empty 'evidence' string |
Expected Outcome Disclosure | Every decision option includes the expected consequence if selected, stated in plain language | Option has no consequence, or consequence is speculative without grounding | For each option in each decision, assert the 'expected_outcome' field is non-null, non-empty, and does not contain hedging phrases like 'might possibly' without supporting evidence |
Missing Information Callout | Any information the reviewer would need but is absent is explicitly listed with a severity level | Required context is absent from the handoff with no acknowledgment | Check for a [MISSING_INFORMATION] block. If the golden dataset expects missing info, assert the block exists and each entry has 'item' and 'severity' fields |
Conciseness vs. Completeness Balance | Handoff summary stays under 800 tokens while preserving all required fields; no duplicate information | Summary exceeds 1200 tokens or repeats the same fact across multiple sections | Run token count on the full handoff output. Assert token count < 800. Run a semantic deduplication check across [ACTION_CONTEXT] and [PENDING_DECISIONS] sections |
Reviewer Role Clarity | The handoff explicitly states what the human reviewer is expected to do: approve, reject, select, or escalate | Handoff describes the situation but gives no clear instruction on what action the reviewer should take | Assert the [REVIEWER_INSTRUCTION] field contains one of the allowed action verbs: 'approve', 'reject', 'select', 'escalate', or 'defer' |
Source Traceability | Every factual claim in the handoff can be traced back to a specific step output or tool result | Claim appears without a source reference, or source reference is circular | For each claim in [ACTION_CONTEXT], assert a corresponding entry exists in [STEP_OUTPUTS] with matching content. Flag orphan claims |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base prompt and a single decision type. Use a simplified output schema with only decision_id, summary, pending_decision, and recommended_action. Skip risk scoring and consequence disclosure fields during early testing. Run the prompt against 5-10 handoff scenarios and manually review whether the summary gives a reviewer enough context to decide without reading the full trace.
Watch for
- Summaries that omit the reason the decision is needed at all
- Missing action context (what tool, what parameters, what happens next)
- Overly confident recommendations when evidence is thin

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us