Learn more:https://treerouter.com

Abstract

AI agents frequently return confident natural‑language statements claiming tasks are finished, yet the underlying system state may contradict such assertions. Agent self‑reported completion is merely declarative text, not objective proof of real‑world execution. This article introduces Veripipe, a verification framework also known as “Execution‑Record Judge”. It establishes four graded evidence tiers and three core operational rules for judging task completion strictly based on machine‑readable structured records, rather than LLM‑generated summaries. A controlled empirical test running 16 mixed tasks on DeepSeek Harness (dsh), an open‑source agent runtime, compares four distinct judging approaches: reading agent‑produced final text output, inspecting tool‑call traces, checking turn‑level session status, and applying the Veripipe state‑validation workflow. Test data, failure modes, measurement biases and boundary limitations are presented in full detail. Practical guidance helps engineering teams build more reliable validation logic for production agent deployments.

1. Common Real‑World Failure Patterns of Agent Self‑Reported Completion

Two representative scenarios illustrate the core risk. In the first case, users instruct an agent to create three todo entries and mark all items finished. The agent responds with “all three todos completed, done” in a confident conversational tone. However, reviewing backend event logs reveals that no actual tool operations successfully persisted the todo records. The agent only generated concluding prose without performing corresponding actions.

A second typical case involves interface testing. An agent flags an HTTP response code 400 as a confirmed bug. Subsequent manual reproduction demonstrates that the 400 status represents legitimate business‑logic rejection defined within service specifications instead of system breakdown. The agent misclassifies “observable abnormal‑looking feedback” as definitive proof of defects.

Both examples expose the same fundamental flaw: practitioners treat the agent’s natural‑language conclusion as factual evidence. Agent output constitutes a claim, not proof. Verbal confirmation cannot replace direct inspection of persistent system state. This gap creates false‑positive risk in automated evaluation pipelines, CI workflows and agent‑driven testing systems.

Against this background, the Veripipe framework sets one overriding principle: task completion must be judged from deterministic structured evidence, not free‑form text generated by the model. Observations such as “the page shows errors” count only as human‑readable descriptions and cannot serve as authoritative verification grounds.

2. Core Design of the Veripipe Verification Framework

Veripipe defines a complete rule‑set including four evidence tiers and three hard operational constraints, separating valid proof from subjective human‑style impressions.

2.1 Four‑Tier Evidence Classification (L1‑L4)

Evidence is stratified according to objectivity and machine‑verifiability:

  • L1 Structural evidence: System‑level anomalies including service crashes, 5xx HTTP responses, corrupted return payloads and broken JSON‑schema compliance. This evidence carries low ambiguity and can be checked programmatically with minimal logic.
  • L2 Final‑state evidence: Mismatch between post‑execution machine‑readable final state and predefined contractual expectations. Examples include incorrect field values or counters failing to reset to zero. Validation targets raw structured state instead of rendered natural‑language outputs.
  • L3 Reproducibility and relational evidence: Stable output given identical inputs, or predictable relational changes observable between two separate execution runs, such as data diffs and structured transformations.
  • L4 Intuitive subjective judgement: Impressions such as “this looks incorrect”. This tier can only generate investigation clues and must never independently confirm or reject task outcomes. It operates within an isolated logical channel and cannot trigger formal pass‑or‑fail verdicts.

Only evidence falling into tiers L1, L2 and L3 qualifies to open formal judging cases. Subjective L4 signals serve purely as hints for further investigation.

2. Three Foundational Operational Rules

  1. LLMs may only reject, never confirm: Within the verification workflow, large‑model components support three outcomes: pass the item, reject the candidate result, or request supplementary evidence. Models are permitted to discard suspect execution records, but they cannot single‑handedly validate that a requirement has been satisfied. Directly asking an LLM “is this a bug?” easily yields self‑consistent yet incorrect conclusions, as the model tends to align judgements with its own prior output.
  2. Fail‑closed default policy: When evidence is incomplete, assertion patterns are unrecognizable, contracts drift from product reality, key metrics cannot be observed, or computational budgets exhaust, the system defaults to “cannot confirm”. Uncertainty does not trigger speculative positive judgements. A verifier that guesses results under ambiguous conditions itself becomes a new source of false alarms.
  3. Evidence originates from independent backend records: Verification logic reads persisted event snapshots stored on the service backend instead of parsing agent chat replies. Judgement sources must be decoupled from the agent’s conversational output.

3. Controlled Empirical Test on DeepSeek Harness (dsh)

To measure practical performance, a test suite of 16 distinct tasks was executed inside DeepSeek Harness. The dataset mixes genuine achievable goals and prompts deliberately designed to induce fake completion behaviour. Three categories of tasks are covered: goal‑type, todo‑type and compact‑state‑type assignments. Every task launches in an independent clean session. Ground‑truth labels are derived from manual line‑by‑line review of raw backend event logs. Among the 16 tasks, 11 are genuinely completed and 5 remain unfulfilled.

Four independent judging strategies are evaluated against identical task samples:

  • O1: Judge purely from the agent’s final natural‑language reply text.
  • O2: Judge purely by inspecting whether tool‑call traces exist within execution records.
  • O3: Judge purely by reading the high‑level “completed” turn status flag of each agent session turn.
  • VP (Veripipe): Read backend‑persisted final state and compare against predefined contractual expectations.

3.1 First‑Round Experimental Results

Judging StrategyFalse Positive (classify unfinished as finished)False Negative (classify finished as unfinished)Inconclusive / Cannot Judge
O1 Text‑only20—
O2 Tool‑trace only00—
O3 Turn‑status only50—
VP Veripipe state comparison006

Analysis of first‑round data yields several key observations.
Two false‑positive cases emerge under O1 text‑only judging. The agent prints confident phrases such as “ALL DONE” and “COMPACTED”, while zero real tool invocations occur. Reliance on final prose accepts these fake completions unconditionally.

O3 relying merely on turn‑level “completed” status delivers the poorest performance. All 16 agent turns return the completed flag. Even when the agent honestly replies “I lack required tools and cannot finish this task”, the turn still marks as completed. The completed flag only indicates that the model‑runtime link terminates normally; it conveys zero information regarding whether business objectives are met. All five genuinely‑unfinished tasks receive false positive verdicts.

Both O2 (tool‑call trace inspection) and Veripipe VP produce zero false positives in this batch. However, Veripipe reports six inconclusive entries. One inconclusive result stems from an implementation defect: for the goal‑then‑todo task, the agent successfully creates goals and marks todo‑items finished in event logs. Yet the state projection inside dsh automatically clears todo‑related fields upon entering the subsequent agent turn. Veripipe fetches snapshots after the next‑turn transition and reads null todo values. Due to its fail‑closed principle, it marks this genuinely‑successful task as inconclusive rather than speculating success. This represents a measurement‑timing error instead of agent misbehaviour. The framework sacrifices positive confirmation instead of risking false positives.

3.2 Fixed Implementation and Second‑Round Repeat Test

The bug is corrected by modifying Veripipe to reconstruct state snapshots strictly from event logs captured at the exact end of the original task turn, instead of reading later live runtime snapshots. Ground‑truth reconstruction is also refactored to derive facts purely from raw event logs, fully decoupled from Veripipe reading logic to avoid shared‑source bias.

After freezing judging rules, the full 16‑task suite runs again with brand‑new independent agent sessions. Agent textual replies change for 14 out of 16 runs; ground truth remains unchanged: 11 accomplished tasks and 5 unaccomplished tasks.

Judging StrategyFalse PositiveFalse NegativeInconclusive / Cannot Judge
O1 Text‑only20—
O2 Tool‑trace only00—
O3 Turn‑status only50—
VP Veripipe state comparison005

After correction, the previously‑successful goal‑then‑todo task correctly passes verification. All five inconclusive outputs from Veripipe correspond to genuinely‑unfinished assignments. In this controlled experiment, Veripipe still demonstrates no clear advantage over simple tool‑trace checking (O2). Both maintain zero false‑positive outcomes.

3.3 Auxiliary HTTP‑Layer Structural‑Evidence Test

An auxiliary L1‑evidence test sends eight malformed HTTP request payloads against one target service: malformed JSON, truncated content, wrong data‑types, empty parameters, oversized numeric values, invalid references, broken structures and binary payloads. Return status codes include 400, 404, 200, 415. All responses represent legitimate business‑logic rejection instead of system crashes. Consequently, zero cases satisfy L1 structural‑failure criteria.

This illustrates an important nuance: non‑200 HTTP response codes do not automatically equal defects. If authentication credentials are missing, the adapter makes zero outbound requests and Veripipe marks outcomes inconclusive instead of mis‑interpreting placeholder status codes.

3.4 Environment‑Setup Contamination Lesson

One discarded pre‑experiment batch highlights verification‑framework risks. When starting dsh directly from raw source‑code builds, duplicate loading of one runtime module triggers consistent tool‑call exceptions. Initially this was mistaken for product‑level defects. Further investigation identifies local environment mis‑configuration; launching from pre‑compiled release artifacts eliminates the fault.

A properly‑designed verifier must apply fail‑closed logic in such scenarios. When the surrounding testing environment itself malfunctions, the framework should produce inconclusive results instead of generating bug reports for target‑under‑test. Treating validator‑side configuration errors as system‑under‑test failures is a critical pitfall for automated agent‑evaluation systems.

4. Interpretation of Experimental Boundaries and Limitations

The empirical results deliver definite take‑aways, yet carry clear constraints that prevent over‑generalisation.

Confirmed conclusions:

  • Pure reliance on agent‑generated concluding text creates measurable false‑positive risks for fake completion scenarios.
  • The completed turn‑status flag is nearly useless for judging business‑task achievement. Normal session termination tells nothing about objective outcomes.
  • A fail‑closed veripipe‑style workflow eliminates false positives within this test dataset at the cost of generating inconclusive results under ambiguous observation conditions.

Important limitations:

  • The sample size is limited to 16 hand‑crafted tasks. Most prompt‑inducement cases do not trigger outright fake verbal completion. This is a small‑scale controlled experiment rather than statistically‑significant large‑scale benchmarking. Results cannot be extrapolated to arbitrary real‑world workloads.
  • Within two rounds of testing, Veripipe shows no practical advantage compared with simple tool‑trace checking (O2). Measurement‑timing bugs can cause genuine successes to become inconclusive entries, though this specific bug was repaired in follow‑up iterations. Re‑testing re‑uses identical task definitions, model versions and runtime environment and cannot be treated as fully‑independent cross‑environment validation.

Veripipe ships as an open‑source Python package veripipe v0.1.1 available on PyPI. It provides a lightweight offline demo that requires no network connectivity. Executing python3 examples/demo.py reproduces three canonical cases: genuine success, fake verbal “done” claims, and outcomes lacking structured supporting evidence. Sample output is shown below:

1) Real success — structured evidence backs the claim:
   run A     observed state : {'ready': True}
     oracle : status=pass -> passed, nothing to file

2) False 'done' — the claim is confident but the state disagrees:
   run B     observed state : {'ready': False}
     oracle : status=fail -> FILED

3) Unbacked claim — words only, no structured state:
   run C     observed state : (none)
     oracle : status=inconclusive -> NOT filed

Only run‑B triggers formal failure recording. Run‑A passes normally. Run‑C yields inconclusive results without generating pass‑or‑fail records.

5. Production‑Deployment Implications for Agent Engineering

These observations carry practical meaning for teams building production‑grade agent systems. Many agent evaluation pipelines conflate conversational summaries with objective execution outcomes. Three actionable recommendations emerge.

First, avoid treating natural‑language closing sentences or high‑level turn‑completed flags as completion signals. Both are necessary‑but‑insufficient indicators. Tool‑call traces represent stronger signals but still cannot replace inspection of final persistent business state for high‑stakes scenarios.

Second, adopt tiered‑evidence thinking for automated validation workflows. Distinguish structural anomalies, measurable final‑state contracts, reproducible relational evidence and subjective impressions. Subjective human‑style judgements should never drive automated pass‑fail logic. Apply a fail‑closed default when evidence is incomplete. Inconclusive results should trigger manual review instead of speculative auto‑judgement.

Third, separate verification‑logic observation sources from agent outputs. Fetch records from independent backend event‑streams or persisted snapshots. Avoid parsing agent chat transcripts as primary ground truth. Beware of measurement‑timing bugs: state projections may get cleared or mutated in subsequent agent turns, causing genuine success to appear empty.

When engineering platforms assemble multi‑agent stacks connecting multiple model endpoints and agent runtimes such as DeepSeek Harness, teams need unified credential management, traffic routing and consumption tracking. Treerouter functions as an API gateway that consolidates access control and usage logging for heterogeneous LLM‑backed agent workloads, reducing custom integration overhead for complex verification pipelines.

6. Conclusion

Agents producing confident “done” statements does not guarantee real task completion. Veripipe addresses this hazard by establishing evidence‑tier classification and fail‑closed verification rules that rely on machine‑readable backend records instead of LLM‑generated prose.

A controlled test on 16 tasks inside DeepSeek Harness demonstrates that text‑only judging creates false‑positive risks, while the completed turn‑status flag offers almost zero judging value. Both simple tool‑trace inspection and the full Veripipe state‑comparison approach achieve zero false positives within this dataset, though Veripipe yields inconclusive outputs when observation conditions are imperfect.

The experiment is small‑scale and has clear boundary constraints. Nevertheless, it highlights an essential architectural principle for agent evaluation: completion verdicts must trace back to independent structured evidence, rather than trusting the agent’s own concluding claims. For production‑critical agent workflows, verification logic should be treated as a first‑class engineering component, not an after‑thought add‑on.