Inferensys

Prompt

Partial Failure Status Update Prompt

A practical prompt playbook for using the Partial Failure Status Update Prompt in production AI agent workflows to distinguish completed work from failed steps, preserve partial results, and recommend next actions.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, reader, and constraints for the Partial Failure Status Update Prompt.

This prompt is for agent operators and workflow monitors who need a structured, machine-readable status when a multi-step plan completes with a mix of successes and failures. The job-to-be-done is clear: produce a single artifact that separates completed work from failed steps, inventories partial results that can be salvaged, and recommends a concrete next action—resume, rollback, escalate, or abandon. Without this prompt, partial failures often produce ambiguous logs or verbose traces that force an operator to manually reconstruct what happened, which is slow and error-prone in production systems where minutes matter.

Use this prompt when your agent runtime has finished executing a plan (or hit a terminal error state) and at least one step succeeded while at least one step failed or was skipped due to upstream dependency failure. The prompt expects a structured execution trace as input, including step IDs, statuses, outputs, error messages, and dependency relationships. It is designed for supervised autonomy workflows where a human operator or an upstream orchestrator needs a concise, actionable summary before deciding whether to resume execution, roll back side effects, or escalate. Do not use this prompt for fully successful runs (use a Task Completion Summary instead) or for runs where every step failed identically (use a Retry Exhausted Escalation or Goal Abandonment prompt). It is also not appropriate for real-time streaming updates during execution—this is a post-execution analysis prompt.

The prompt produces a structured output with four required sections: a completion summary table mapping each step to a status (completed, failed, skipped), an artifact inventory listing preserved outputs from completed steps with their locations or identifiers, a failure analysis grouping failed steps by root cause and recoverability, and a recommended action with rationale. The recommendation must be one of four enumerated values: RESUME, ROLLBACK, ESCALATE, or ABANDON. This constrained output shape lets you wire the prompt into automated decision pipelines—for example, a RESUME recommendation can trigger an automatic replanning step, while ESCALATE can create a ticket in your incident management system with the full failure payload attached.

Before deploying this prompt, define your evaluation criteria. At minimum, test that the output correctly classifies every step from the input trace (no dropped or hallucinated steps), that the artifact inventory includes only outputs from genuinely completed steps, and that the recommended action is consistent with your operational policies. Common failure modes include the model recommending RESUME when a failed step has irreversible side effects, omitting artifacts from steps that succeeded but whose outputs were overwritten by later failures, and producing an artifact inventory that references internal memory addresses or ephemeral paths that are not accessible to the operator. Run this prompt against a golden dataset of known partial-failure traces and measure step-classification accuracy, artifact recall, and recommendation alignment before production use.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Partial Failure Status Update Prompt works well, where it breaks down, and the operational preconditions you must meet before deploying it into a production agent workflow.

01

Good Fit: Multi-Step Workflows with Independent Subtasks

Use when: the agent executes steps that can succeed or fail independently, such as data extraction from multiple sources, batch file processing, or parallel API calls. Why: the prompt is designed to inventory partial results and isolate failures without discarding completed work.

02

Bad Fit: Atomic Transactions with No Partial State

Avoid when: the workflow is a single atomic operation that must fully succeed or fully roll back, such as a database transaction or a payment submission. Risk: the prompt will produce a misleading status that implies partial completion is acceptable when it is not. Guardrail: gate the prompt behind a check that confirms the workflow supports partial results before invoking it.

03

Required Inputs: Step-Level Execution Trace

What to watch: the prompt cannot produce a reliable partial failure status from only a high-level goal description. Guardrail: ensure the input includes per-step identifiers, success/failure outcomes, error messages, and artifact references. Without step-level granularity, the model will hallucinate completion status.

04

Operational Risk: Silent Data Loss from Unreported Artifacts

What to watch: the model may omit completed artifacts from the inventory if the execution trace is truncated or poorly structured. Guardrail: implement a post-generation validator that cross-references the artifact inventory against the input trace's completed step list and flags missing entries for repair or human review.

05

Operational Risk: Overconfident Resume Recommendations

What to watch: the model may recommend resuming from a failed step without verifying that the failure was transient or that preconditions have been restored. Guardrail: require the prompt to include a confidence qualifier and evidence summary for any resume recommendation. Escalate to human review when the failure involved external state changes or authorization errors.

06

Integration Constraint: Downstream Consumers Need Structured Output

What to watch: if the status update is consumed by an orchestrator or notification system, free-text summaries will break automation. Guardrail: enforce a strict output schema with typed fields for completed steps, failed steps, artifact references, and recommended actions. Validate schema compliance before forwarding the status to any downstream system.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for generating structured partial failure status updates with artifact inventory and recovery recommendations.

This prompt template produces a structured status update when a multi-step workflow has completed some steps successfully while others have failed. It forces the model to distinguish completed work from failed steps, preserve partial results, inventory artifacts from successful steps, and recommend a concrete recovery path—resume, rollback, or escalate. Use this when your agent orchestrator or workflow engine needs to communicate partial progress to operators, downstream systems, or replanning modules without losing the value of completed work.

text
You are a workflow status reporter. Your task is to produce a structured partial failure status update from the execution trace provided.

## INPUT
[EXECUTION_TRACE]

## CONSTRAINTS
- Distinguish clearly between completed steps, failed steps, and steps not yet attempted.
- For each failed step, include: step identifier, error type, error message, retry count, and whether the failure blocks downstream steps.
- For each completed step, include: step identifier, completion timestamp, a one-line summary of output, and any artifacts produced with their locations or identifiers.
- Preserve all partial results. Do not discard outputs from completed steps.
- Classify the overall status as one of: resumable, requires_rollback, requires_escalation, or abandoned.
- If resumable, specify which step to resume from and any preconditions that must be re-validated.
- If rollback is recommended, specify which steps must be undone and in what order.
- If escalation is recommended, provide a structured handoff summary for a human operator.
- Flag any silent failure risks: steps that appear successful but produced empty results, schema-compliant garbage, or outputs outside expected ranges.
- Do not invent outcomes for steps that did not execute.
- If [RISK_LEVEL] is high or critical, include an explicit statement that human review is required before any recovery action.

## OUTPUT SCHEMA
Return valid JSON matching this structure:
{
  "workflow_id": "string",
  "status": "resumable | requires_rollback | requires_escalation | abandoned",
  "summary": "string (one-paragraph operator summary)",
  "completed_steps": [
    {
      "step_id": "string",
      "completed_at": "ISO8601 timestamp",
      "summary": "string",
      "artifacts": [{"type": "string", "location": "string", "description": "string"}]
    }
  ],
  "failed_steps": [
    {
      "step_id": "string",
      "error_type": "string",
      "error_message": "string",
      "retry_count": "integer",
      "blocks_downstream": "boolean",
      "blocked_step_ids": ["string"]
    }
  ],
  "unattempted_steps": ["string"],
  "silent_failure_flags": [
    {"step_id": "string", "concern": "string", "evidence": "string"}
  ],
  "recovery_recommendation": {
    "action": "resume | rollback | escalate | abandon",
    "resume_from_step_id": "string | null",
    "preconditions_to_revalidate": ["string"],
    "rollback_steps": ["string"],
    "escalation_handoff": "string | null",
    "requires_human_review": "boolean"
  },
  "artifact_inventory": [
    {"step_id": "string", "artifact_type": "string", "location": "string", "preserved": "boolean"}
  ]
}

## RISK_LEVEL
[RISK_LEVEL]

Adapt this template by adjusting the output schema to match your workflow engine's state model. If your system uses a different set of terminal statuses—such as blocked, degraded, or awaiting_approval—replace the enum values in the status field and recovery_recommendation.action field. The silent_failure_flags array is critical for production systems where valid JSON does not mean correct results; pair this output with a validator that checks artifact locations are reachable and step summaries are non-empty. For regulated workflows, set [RISK_LEVEL] to high and ensure the requires_human_review flag gates any automated recovery action. Before deploying, run eval cases with mixed success and failure traces to confirm the model correctly distinguishes resumable from requires_rollback and does not silently drop completed artifacts.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Partial Failure Status Update Prompt. Each placeholder must be populated before the prompt is assembled and sent. Validation notes describe how to programmatically verify the input before incurring model cost.

PlaceholderPurposeExampleValidation Notes

[ORIGINAL_PLAN]

The full plan object or structured task list that was being executed, including step IDs, descriptions, and dependencies.

{"plan_id": "exec-442", "steps": [{"id": "S1", "desc": "Fetch user profile", "status": "completed"}, {"id": "S2", "desc": "Update billing", "status": "failed"}]}

Must be valid JSON. Every step must have an 'id' and 'status' field. Parse check required. Reject if plan_id is missing or step count is zero.

[EXECUTION_LOG]

The ordered sequence of actions taken, tool calls made, and responses received during the execution attempt.

[{"step_id": "S1", "action": "api_call", "result": "200 OK", "timestamp": "2025-01-15T10:03:00Z"}, {"step_id": "S2", "action": "api_call", "result": "500 Internal Server Error", "timestamp": "2025-01-15T10:03:05Z"}]

Must be a JSON array with at least one entry. Each entry requires step_id, action, result, and timestamp. Timestamps must be ISO 8601 and monotonically non-decreasing. Reject if log is empty or timestamps are out of order.

[ARTIFACT_INVENTORY]

A map of completed step IDs to their output artifacts, including URIs, checksums, or inline values that must be preserved.

{"S1": {"type": "json_object", "location": "s3://bucket/results/S1.json", "checksum": "sha256:abc123"}, "S3": {"type": "csv", "location": "s3://bucket/results/S3.csv"}}

Keys must match step IDs from [ORIGINAL_PLAN] with status 'completed'. Each artifact entry must have a 'type' field. Checksum is optional but recommended. Reject if artifacts reference step IDs not present in the plan.

[FAILURE_DETAILS]

Structured error information for each failed step, including error codes, messages, and retry counts.

[{"step_id": "S2", "error_code": "UPSTREAM_SERVICE_500", "message": "Billing service unavailable", "retry_count": 3, "last_error_ts": "2025-01-15T10:03:10Z"}]

Must be a JSON array. Each entry requires step_id and error_code. step_id must exist in [ORIGINAL_PLAN] with status 'failed'. Reject if failure details reference steps not marked as failed in the plan.

[RESUME_POLICY]

The configured rules for whether the agent is allowed to resume, retry, skip, or must escalate after partial failure.

{"max_auto_retries": 3, "retryable_errors": ["TIMEOUT", "RATE_LIMITED"], "require_approval_for": ["DATA_MUTATION", "EXTERNAL_SEND"], "default_fallback": "ESCALATE"}

Must be a valid JSON object. Required fields: max_auto_retries, retryable_errors (array), require_approval_for (array), default_fallback (enum: RESUME, SKIP, ROLLBACK, ESCALATE). Reject if default_fallback is not a recognized value.

[OPERATOR_CONTEXT]

Optional human-provided notes, priority overrides, or business context that should influence the status update recommendation.

{"priority": "HIGH", "note": "Customer is waiting on live chat. Prefer partial delivery over full rollback."}

Null allowed. If provided, must be valid JSON. No required fields. Parse check only. Do not reject if null or empty object.

[OUTPUT_SCHEMA]

The expected structure for the status update output, including required fields for completed, failed, and recommendation sections.

{"type": "object", "required": ["summary", "completed_work", "failed_steps", "preserved_artifacts", "recommendation"], "properties": {"recommendation": {"enum": ["RESUME", "ROLLBACK", "ESCALATE"]}}}

Must be valid JSON Schema. Required fields must include summary, completed_work, failed_steps, preserved_artifacts, and recommendation. Reject if recommendation enum is missing or does not include RESUME, ROLLBACK, and ESCALATE.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Partial Failure Status Update Prompt into an agent runtime or monitoring harness.

The Partial Failure Status Update Prompt is designed to be called by an agent orchestrator or monitoring service immediately after a step or sub-plan returns a non-success status. It is not a continuous monitoring prompt; it is a point-in-time diagnostic that consumes the plan definition, the execution trace for the failed scope, and any partial artifacts produced. The prompt's primary job is to produce a structured status object that distinguishes completed work from failed steps, preserves partial results, and recommends a recovery action. This structured output should be consumed programmatically by the orchestrator to decide whether to resume, rollback, or escalate.

To integrate this prompt, the calling system must assemble three input blocks: the original plan with step IDs and expected outputs, the execution log showing which steps succeeded and which failed with error details, and an artifact inventory mapping completed steps to their output locations or payloads. The prompt template uses the placeholders [PLAN_DEFINITION], [EXECUTION_LOG], and [ARTIFACT_INVENTORY]. The orchestrator should inject these as structured JSON or formatted text blocks. The model response must conform to a strict [OUTPUT_SCHEMA] that includes completed_steps, failed_steps, partial_results_preserved, recovery_recommendation (enum: resume, rollback, escalate), and escalation_reasoning. Implement a post-generation validation layer that checks for schema compliance, valid enum values, and cross-referencing between completed_steps and failed_steps to ensure no step appears in both lists. If validation fails, retry once with the validation error injected into [CONSTRAINTS]. Log every invocation, including the input plan version, the raw model output, and the validation result, for audit and debugging.

Model choice matters here. Use a model with strong instruction-following and structured output capabilities, such as GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro. Avoid smaller or older models that may collapse the recovery recommendation into a generic 'escalate' or fail to preserve partial results accurately. Set temperature to 0 or a very low value (0.1) to maximize deterministic, schema-compliant output. The prompt should run with a timeout appropriate for the size of the execution log; if the log is large, consider summarizing or truncating it before injection, but always preserve error messages and step IDs. For high-risk workflows where the recovery recommendation triggers irreversible actions (e.g., database rollback, customer-facing notification), route the output to a human review queue before execution. The escalation_reasoning field is designed to be displayed directly in that review interface. Do not use this prompt for real-time streaming status; it is a batch diagnostic meant for transition points between execution phases.

IMPLEMENTATION TABLE

Expected Output Contract

Each field the Partial Failure Status Update Prompt must return, with its type, whether it is required, and the validation rule to apply before the output is accepted by downstream systems.

Field or ElementType or FormatRequiredValidation Rule

status_summary

string

Must be exactly one of: 'partial_success', 'partial_failure', 'mixed_completion'. Reject any other value.

overall_completion_ratio

float

Must be a number between 0.0 and 1.0 inclusive. Parse as float and verify range. Reject if null or non-numeric.

completed_steps

array of objects

Array must not be empty. Each object must contain 'step_id' (string), 'step_name' (string), and 'completion_status' (string equal to 'completed').

failed_steps

array of objects

Array must not be empty. Each object must contain 'step_id' (string), 'step_name' (string), 'failure_reason' (string, non-empty), and 'error_code' (string or null).

artifact_inventory

array of objects

Each object must contain 'step_id' (string matching a completed step), 'artifact_type' (string), 'artifact_location' (string or null), and 'artifact_summary' (string). Null allowed for location when artifact is inline.

recommended_action

string

Must be exactly one of: 'resume', 'rollback', 'escalate', 'abort'. Reject any other value. If 'escalate', the 'escalation_target' field must be non-null.

escalation_target

string or null

Required when recommended_action is 'escalate'. Must be a non-empty string identifying a role, queue, or system. Null allowed otherwise.

resumption_plan

array of strings

Required when recommended_action is 'resume'. Must contain at least one step ID string matching a failed step. Null allowed when action is not 'resume'.

PRACTICAL GUARDRAILS

Common Failure Modes

Partial failure status updates are brittle because they must correctly distinguish success from failure, preserve partial results without corruption, and recommend a safe next action. These are the most common failure modes and how to guard against them.

01

Silent Success Masking

What to watch: The model reports all steps as 'completed' when some actually failed or produced empty results. This happens when the prompt emphasizes completion over accuracy, or when the model confuses 'step executed' with 'step succeeded.' Guardrail: Require explicit per-step evidence of success (output artifacts, return codes, or assertions) before marking a step complete. Include a 'status_confidence' field and validate that completed steps have associated artifacts.

02

Partial Result Corruption

What to watch: The model overwrites or drops successful step outputs when summarizing failures, or mixes artifacts from different steps into the wrong step entries. This is common when the prompt asks for a single flat summary instead of a step-indexed artifact inventory. Guardrail: Use a strict output schema with a per-step artifact map keyed by step ID. Validate that each artifact belongs to exactly one step and that successful step outputs are preserved verbatim, not summarized.

03

Wrong Resume vs. Rollback Decision

What to watch: The model recommends resuming from a failed step when dependencies are corrupted, or recommends full rollback when only one independent step failed. This wastes tokens, destroys valid work, or creates cascading failures. Guardrail: Include explicit dependency information in the input context. Require the model to check whether failed steps have downstream dependents before recommending resume or rollback. Add a 'blocked_steps' field listing steps that cannot proceed.

04

Escalation Avoidance

What to watch: The model recommends retry or skip for failures that require human judgment, such as authorization errors, data quality issues, or ambiguous outputs. This delays resolution and can compound errors across retries. Guardrail: Define explicit escalation triggers in the prompt: authentication failures, schema violations, confidence below threshold, or repeated failures on the same step. Require the model to justify any non-escalation decision when these triggers are present.

05

Artifact Inventory Drift

What to watch: The model invents artifact references (file paths, IDs, URLs) for completed steps instead of using the actual outputs provided in context. This creates broken references that downstream steps cannot resolve. Guardrail: Require the model to only reference artifacts that appear in the input context. Add a post-processing validation that checks every artifact reference against the input artifact list and flags any reference without a match.

06

Failure Reason Omission

What to watch: The model marks a step as failed but provides no actionable failure reason, only a generic label like 'error occurred.' This prevents operators from diagnosing the root cause or deciding whether retry is safe. Guardrail: Require a structured failure reason with at minimum: error type, error message from the tool or system, and whether the failure is transient or permanent. Validate that every failed step has a non-empty, specific failure reason before accepting the output.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test whether the Partial Failure Status Update Prompt produces safe, complete, and actionable output before deploying it into a production agent harness.

CriterionPass StandardFailure SignalTest Method

Completed Step Inventory

Every step marked 'completed' in the input plan appears in the output with a corresponding artifact reference or null.

A completed step is missing from the output, or an artifact reference is present for a step that was not completed.

Parse output JSON. Compare the set of completed step IDs against the input plan. Assert set equality.

Failed Step Diagnosis

Every failed step includes a specific error category, a non-empty failure reason, and a recovery recommendation.

A failed step is listed with a generic reason like 'error' or 'failed', or the recovery recommendation field is missing or empty.

Validate output schema. Assert that for each failed step, the error category is from the allowed enum and the recommendation string length is greater than 10 characters.

Partial Result Preservation

All artifacts, outputs, or side effects from completed steps are included in the output payload and are not lost.

An artifact from a completed step is missing, truncated, or replaced with a placeholder like 'output available'.

Diff the artifact inventory from the agent's execution trace against the output's artifact list. Assert no missing keys.

Resume vs. Rollback Decision

The output contains a single, unambiguous top-level recommendation: RESUME, ROLLBACK, or ESCALATE.

The recommendation is missing, contains multiple conflicting suggestions, or defaults to ESCALATE without justification.

Validate the top-level field against the allowed enum. If ESCALATE, assert that the escalation reason field is populated and specific.

Escalation Readiness

If the recommendation is ESCALATE, the output includes a pre-formatted handoff summary suitable for a human reviewer.

The escalation summary is missing, contains only internal error codes, or requires the operator to read full traces to understand the state.

Simulate an ESCALATE output. Present the handoff summary to a test operator. Assert they can describe the failure and next step in under 60 seconds.

Schema Compliance

The output is valid JSON matching the expected schema with all required fields present and correctly typed.

The output is malformed JSON, missing required fields, or contains fields with incorrect types.

Run a JSON Schema validator against the output. Assert zero validation errors.

No Hallucinated State

The output does not invent steps, artifacts, or error details that are not present in the execution trace.

The output references a step ID not in the original plan, or describes an error that does not appear in the tool call logs.

Extract all step IDs and error codes from the output. Assert each is a subset of the input plan and trace data.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a simple JSON schema. Use a single model call without retry logic. Accept the first valid response that parses.

code
You are analyzing a partial workflow execution. Some steps succeeded, some failed.

[EXECUTION_LOG]

Return JSON with:
- completed_steps: list of step IDs and their outputs
- failed_steps: list of step IDs, error messages, and failure types
- partial_artifacts: any usable outputs from completed steps
- recommendation: one of "resume", "rollback", "escalate"

Watch for

  • Missing failure type classification (transient vs. permanent)
  • Recommendation that ignores partial artifact value
  • Schema that doesn't distinguish between step-level and workflow-level failure
Prasad Kumkar

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.