arXiv:2610.31712cs.SEOct 2026

Manuscript Offprint

arXiv:2610.31712

Reuse, Rewrite, or Reject: Evidence-Constrained Trace Reuse for Repeated Mobile GUI Control

Bingyu Bai, Cheng Zhang, Erhu Feng

ABSTRACT

Mobile GUI agents frequently perform repetitive tasks with similar interaction procedures. Reusing previous executions can reduce redundant LLM inference and execution overhead, but variations in user instructions and execution environments may invalidate previously successful actions. We systematically characterize these variations into six representative categories and observe that such changes do not necessarily invalidate entire procedures: individual transitions can remain reusable when validated against the current task context and interface state. Based on this insight, we propose graph-text templates for selective execution-trace reuse. The graph captures UI states and action transitions, while the text encodes task intent, procedural structure, and typed slots for variable content. A record-template-replay framework constructs templates from verified executions and leverages the current instruction and live UI state to reuse, adapt, or discard individual transitions. Given an execution trace, our framework reduces LLM inference token consumption by approximately 80% on average across five base agents on AndroidWorld, with most agents achieving at least 1.5×1.5 \times execution speedup over LLM-only execution. In real-device evaluations on Android and HarmonyOS, our framework achieves action reuse ratios of 70.7–79.8% while maintaining over 2×2 \times execution speedup in most evaluated configurations.

1 INTRODUCTION

A central goal for mobile GUI agents is to become faster as they accumulate experience. In everyday use, an agent repeatedly encounters familiar tasks and interaction patterns, creating opportunities to reuse what it has already learned from execution. An agent that invokes a large language model (LLM) before every action continues to pay for decisions it has successfully made before. Turning previous executions into reusable experience can reduce these repeated model calls and user waiting time. The question is how to sustain this benefit as task conditions change.

Two obstacles remain: changes in the environment and instruction. Even when the request remains the same, the application may be in a different state, its interface may have changed, or a dialog may interrupt the expected workflow. Conversely, a familiar interface may receive a request with a different value, target, or wording. These changes can make a previously successful action unnecessary, inappropriate, or insufficient for the current task. Repeated use therefore requires an agent to determine which parts of its experience remain useful under the current conditions. Addressing these two sources of variation is central to making experience translate into faster execution.

We organize these obstacles into six main categories. Environment changes comprise background-state changes, layout and workflow changes, and modal interruptions; instruction changes comprise parameter changes, entity substitutions, and goal-expression changes. This categorization guides our analysis of when historical steps can be retained, need adaptation, or should be abandoned. We introduce their implications for reuse in Section 3 and develop the detailed case analysis in Section 4.

∗^{*}Corresponding author.

Figure

Figure 1: A recorded transition links an action to checked before-and-after UI evidence. The illustrative add-to-cart action connects the selected jasmine milk tea and quantity to the resulting cart state. The lower panels organize evidence into a graph and text template for reuse decisions.

MobiMem regenerates variable-step actions when parameters change, while SkillDroid and PreAct execute parameterized skills or programs (Liu et al., 2025; Chen et al., 2026b; Li, 2026). We instead organize reuse around candidate transitions in a unified graph-text template: semantic descriptions retrieve executable structure, local annotations expose replaceable content, and live evidence determines whether each transition is reused, rewritten, or rejected. Each admitted transition is further guarded by pre- and post-action evidence checks, with rejected or failed steps falling back to the base agent.

We propose an evidence-constrained record–template–replay framework. During recording, the agent stores each action with its target and checked before-and-after states (Figure 1). The add-to-cart example links the selected item and quantity to the resulting cart state. Template extraction then preserves reusable procedure structure, exposes variable content as typed slots, and retains incompatible paths as separate branches. The resulting graph–text template integrates a capability description for semantic retrieval with executable UI transitions. Within the same template, local annotations mark entities and values that can be rebound to the current request, allowing applicable parts of a recorded procedure to be reused while changed steps are rewritten. During replay, the current instruction and live interface determine whether a candidate transition can be reused, rewritten with an explicitly supplied value, or rejected. Each admitted transition undergoes a pre-check, one-step execution, and a post-check; insufficient evidence or a failed check returns control to the same base agent. The controller thus reuses applicable steps while adapting to or recovering from changes elsewhere.

We first evaluate the framework on AndroidWorld, which provides reproducible mobile tasks with parameterized initialization and programmatic outcome checks (Rawles et al., 2025). Across five base agents, we measure task success, executed reuse, token consumption, LLM calls, and execution time. Given a verified execution record, our framework achieves 82.0–87.5% executed reuse and 1.2–1.9× execution-time speedup. These tests establish a basis for assessing repeated execution, while comparison with practical phone use highlights differences in devices, operating systems, interface languages, and operating conditions. Although AndroidWorld supports variation in task parameters and initial states, its benchmark setting alone cannot establish how reuse performs across these real-use conditions. This motivates extending the evaluation to physical devices.

We therefore conduct real-device evaluations on OnePlus 13, OPPO Find X8, Redmi K50, and Huawei Pura 80, spanning Android and HarmonyOS. Building on the six-category analysis, the quantitative studies focus on three representative conditions: background-state changes, parameter changes, and paraphrased instructions. These conditions examine whether the controller can account for a changed state, bind a newly requested value, and retrieve a familiar procedure under different wording. We report task success and execution efficiency, with component ablations examining state rechecking, value binding, and semantic retrieval. Across these conditions, our framework achieves 1.8–3.9×1.8–3.9\times execution-time speedup. Together, these studies examine repeated-execution efficiency and the mechanisms needed to reuse experience under environment and instruction changes.

Our contributions are threefold. First, we analyze environment and instruction changes as two central obstacles to faster repeated GUI execution and organize them into six main categories of variation. Second, we develop graph–text transition templates and evidence-constrained selective replay to retain applicable actions, adapt explicitly bound values, and return control to the base agent when reuse is unsupported. Third, we combine AndroidWorld evaluation with experiments on four phone models spanning Android and HarmonyOS, measuring execution efficiency and task outcomes and using targeted ablations to examine adaptation to state, parameter, and wording changes.