Evaluating and Governing Delivery Quality for Long-Running Agent Tasks
Long-running AI agent tasks demand more than a final-answer check: they require visibility into progress, sound help-seeking behavior, traceable deliverables, readable output, and accurate cost accounting. This article breaks down five core evaluation problems—from invisible execution status and poor escalation decisions to untraceable artifacts and high retry costs—and offers practical governance measures, including explicit task state tracking, delivery manifests, reply templates, per-task cost formulas, and a staged rollout plan for production deployment.
Why Long-Running Tasks Need Separate Evaluation
Single-turn question answering is evaluated primarily on whether the answer is correct. Long-running tasks are different. A single task may last tens of minutes or even hours, involving multiple tool calls, file reads and writes, and conditional branches. Users care not only about the final result, but also about whether the process was controllable, whether the system could recover from mid-run failures, and whether deliverables can be located and audited afterward.
For this reason, evaluating long-running tasks should treat the entire execution process as an auditable chain, rather than only examining the final message.
Problem 1: Execution Progress Is Invisible
Many agents simply output “processing” during long tasks, leaving users unable to tell whether the system is making progress, spinning idle, or stuck. This causes two types of losses: users hesitate to interrupt, and they cannot correct course in time when the direction is wrong.
The solution is to design explicit states for each task. Every stage should have four states—pending, running, done, and failed—and record start time, end time, and a result note. The following example shows a minimal task record structure:
from dataclasses import dataclass, fieldfrom datetime import datetimefrom enum import Enumclass StepStatus(Enum):PENDING = "pending"RUNNING = "running"DONE = "done"FAILED = "failed"@dataclassclass Step:name: strstatus: StepStatus = StepStatus.PENDINGstarted_at: datetime | None = Nonefinished_at: datetime | None = Nonenote: str = ""@dataclassclass TaskRun:goal: strsteps: list[Step] = field(default_factory=list)def start(self, name: str) -> Step:step = Step(name=name, status=StepStatus.RUNNING, started_at=datetime.now())self.steps.append(step)return stepdef finish(self, step: Step, ok: bool, note: str = "") -> None:step.status = StepStatus.DONE if ok else StepStatus.FAILEDstep.finished_at = datetime.now()step.note = notedef summary(self) -> str:lines = [f"Goal: {self.goal}"]for s in self.steps:lines.append(f"[{s.status.value}] {s.name} {s.note}")return "\n".join(lines)
One important implementation detail: the note for each step should state concrete results, such as “Read three data files, 1,280 rows in total,” rather than a vague “Completed.” Only then can users judge whether the task is actually progressing.
Problem 2: The Agent Does Not Ask for Help, or Asks Improperly
In real-world execution, missing information is the norm. The ideal behavior is to first attempt a reasonable default approach, exhaust all self-verifiable options, and then present only the essential decision points to the user with the fewest possible questions.
Two behaviors are problematic. The first is prolonged silence followed by a complete stop. The second is offloading information the agent should look up itself—such as where a file was saved or where an internal process configuration lives—directly onto the user. The latter may look cautious, but it essentially transfers the debugging burden to a human.
Evaluation should include two sets of test cases. The first set covers “gaps the agent can resolve on its own,” such as a required configuration file already present in the working directory—observe whether the model reads the directory and logs first instead of asking the user. The second set covers “decision points that must be confirmed,” such as overwriting existing data, deleting files, or sending content externally—observe whether the model pauses to confirm before executing. Together, these two sets reveal whether the model’s help-seeking boundary is reasonable.
Problem 3: Deliverables Are Hard to Trace
After a long task finishes, users often need to ask: Where is the output? Is it complete? Has it been overwritten by a later step? If the execution process never recorded a deliverable list, these questions can only be answered by manually searching through files.
It is recommended to generate a delivery manifest at the end of each task, with each entry including the following fields:
- Full path or access URL—vague statements like “saved in the default directory” are not acceptable.
- Generation timestamp and checksum—to confirm the file has not been altered after transfer or archiving.
- The step number that produced the file—for locating the point of failure.
- Version number or timestamp—to prevent silent overwrites of files with the same name.
The manifest can be stored in an object storage bucket or a fixed location in the file system. The final reply only needs to include a link to the manifest; repeating descriptions of each file in the body text is unnecessary and reduces reading effort.
Problem 4: Output Readability and Communication Cost
Some model replies contain long paragraphs filled with explanatory filler and self-justification, forcing readers to dig through the text to find the conclusion. In technical communication, this is costly because readers may make incorrect decisions based on ambiguous output.
The following writing standards can help:
- Put the conclusion in the first paragraph, followed by supporting evidence and next steps.
- Each paragraph should express one idea and stay within three to four sentences.
- Mark uncertain points explicitly and state what information is needed to confirm them.
- Remove pleasantries and repetitive statements that carry no actual information.
A fixed reply template can be used to validate output quality. The template should include four sections: conclusion, completed items, pending items, and questions requiring user decisions. If any section is missing, the output is considered unqualified and must be regenerated or supplemented.
Problem 5: Per-Task Cost vs. Effective Output
A lower unit price does not necessarily mean a lower task cost. If a task requires multiple retries, repeated revisions, or significant manual rework, the total cost can exceed that of a more expensive solution that succeeds on the first attempt. Therefore, cost accounting should be based on “the total cost to complete one deliverable task.”
The calculation can be expressed as:
Per-task cost = (Total token consumption × unit price + tool call fees + manual review hours × labor cost) ÷ number of successfully delivered tasks
Tokens and tool fees consumed by failed tasks must also be included in the numerator. Counting only successful tasks’ consumption underestimates the true cost.
How to Read Comprehensive Benchmarks
Comprehensive leaderboards and multi-step evaluations reflect a model’s approximate capability range, but they remain distant from real business scenarios. Benchmark tasks are typically standardized, with clean inputs and fixed scoring rules. Real tasks involve ambiguous requirements, incomplete data, and constantly shifting context.
The recommended approach is:
- Use benchmarks to shortlist candidate models, and use a business task set for the final decision.
- The business task set should cover common tasks, edge cases, and historical failure instances.
- Each evaluation should record five metrics: success rate, average duration, retry count, manual revision volume, and per-task cost.
- After model updates, re-run the same task set—do not rely on old results.
Implementation Plan
- Before launch: Build a regression set of 30–50 real tasks, covering report generation, spreadsheet processing, code modification, and document organization.
- Gray release: Route a small portion of tasks through the agent pipeline while the rest are still handled manually, and compare quality and turnaround time across both paths.
- Runtime monitoring: Collect progress events, exception events, help-seeking events, and delivery manifests. Set up alerts for stages that produce no new output beyond the expected duration, and notify the on-call engineer.
- Review cycle: Sample failed tasks weekly and classify root causes into model capability issues, prompt design issues, or runtime environment issues, then address each category accordingly.
Summary
The delivery quality of long-running tasks depends on five aspects: process visibility, the reasonableness of help-seeking behavior, traceability of deliverables, readability of output, and accurate cost accounting.
