arXiv:2611.04142cs.AINov 2026

Manuscript Offprint

arXiv:2611.04142

Interpretable Early Termination of Web Navigation Agents via Closed Sequential Pattern Mining

Sergio Talavera, Magdalini Eirinaki

Abstract

Web navigation agents built on open-weight language models fail often and fail late, with most of the tokens spent after the trajectory has become unrecoverable. Recent work has shown that early termination is a viable cost-reduction strategy, but existing approaches produce opaque termination decisions that do not support diagnosis or human oversight. In this work we apply closed sequential pattern mining (BIDE+) to K-step prefixes of agent execution traces to produce a small, human-reviewable failure-signature library that organizes into a four-category failure taxonomy with associated repair recommendations. We use a multi-variant evaluation protocol that explicitly removes contamination artifacts (zero-step crashes and trivially separable single-step successes) so that reported detection accuracy reflects behavioral discrimination rather than trace-length distributions. We evaluate our methodology on 1,544 MiniWoB++ traces collected from three open-weight language models, achieving the best F1 at K=3K=3 on the Exclude-errors configuration across eight methods (0.717), recovering 88% of test-set failures within three steps, and supporting an early-termination policy that saves 26.3% of tokens at 92% precision.

1 Introduction

Large language models have made it practical to build autonomous agents that execute multi-step tasks on the web. Architectures such as ReAct [1] interleave a natural-language reasoning trace with each action, producing structured execution traces. Despite progress, current agents fail often: Zhou et al. [2] report 14.4% task success on WebArena for GPT-4 against 78.24% for human evaluators, and open-weight models in the 3–7B parameter range, the setting evaluated here, perform substantially worse.

Most of the cost of a failing run is incurred late in the trace. Xiao et al. [3] observe that approximately 99% of token consumption in agent workflows comes from accumulated input tokens replayed at each step, so per-step cost grows as the trace proceeds. When an agent commits to an unrecoverable trajectory early, most of its tokens are spent after failure has become inevitable.

Two recent systems address this cost directly. AgentDiet [3] compresses the trajectory during execution; EET [4] retrieves structured experience to terminate software-engineering agents when patch generation looks unlikely to succeed. Both establish early intervention as a viable cost-reduction strategy, but neither produces an interpretable account of why a particular run is being terminated; the decision reduces to a scalar score or retrieval similarity. This is insufficient for deployment settings where operators audit behavior, attribute failures to architectural defects, or reuse the signal for diagnostic workflows.

AI Agents for Discovery in the Wild (AID-Wild), Workshop at ACM CAIS 2026.

In this work we try to address this by proposing an explainable methodology that enables early stops. We mine closed sequential patterns from K-step prefixes of labeled agent traces. The result is a small library of failure-predictive subsequences (32 patterns, organized into four behavioral categories) that supports both an early-termination policy and a diagnostic readout. Each termination decision is justified by the specific patterns that matched, their positions in the trace, and the failure category they encode.

This paper makes four contributions. First, a pattern-mining approach to early failure detection for LLM-based web navigation agents, evaluated against seven baselines. Second, a multi-level symbolization scheme that converts heterogeneous reasoning–action–observation traces into discrete sequences with controllable abstraction. Third, a multi-variant evaluation protocol that progressively removes contamination categories (zero-step error traces, single-step successes), isolating behavioral discrimination from trace-length artifacts. Fourth, a four-category failure taxonomy with repair recommendations derived from the mined library, and an operating-point analysis showing 26.3% token savings at 92% precision in the deployment configuration.