arXiv:2608.24099cs.AIAug 2026

Manuscript Offprint

arXiv:2608.24099

Are Android GUI Agents Robust Against Runtime Anomalies? AnTrap: Evaluating Agents in Dynamic Adversarial Environments

Guo Gan, Yilun Zhao, Cong Chen, Jinbiao Wei, Tingyu Song, Zheyuan Yang, Lin Fu, Hong Zhou

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

GUI agents often encounter dynamic anomalies when deployed on Android devices, from unexpected pop-ups to action misuse, yet existing benchmarks lack systematic evaluation of agent robustness against runtime anomalies. We introduce ANTRAP, a comprehensive benchmark that injects dynamic perturbations into agent execution trajectories. We propose a taxonomy organizing real-world anomalies into four layers (State, Thinking, Action and Round) with ten fine-grained subcategories, and develop a construction pipeline that preserves task solvability while introducing realistic adversarial conditions. Evaluating 16 leading GUI models, we reveal universal vulnerability to dynamic anomalies, with even the strongest models suffering significant performance degradation. Furthermore, we conduct GRPO training in both original and adversarial environments to validate our benchmark, separating environment-learnable anomalies from reasoning-bottlenecked ones. Our findings show that while single-step traps at state and action layers are largely addressable through adversarial reinforcement learning, deep contextual traps, like state deadlock, expose intrinsic limitations that cannot be resolved by training in environments with traps alone.

1 Introduction

Android agents aim to accomplish complex device operation tasks given instructions from human users (Bai et al., 2024; Chen et al., 2025a; Wang et al., 2025; Gan et al., 2026). Recently-released agentic models have shown remarkable long-sequence planning and execution performance on dynamic benchmarks, including AndroidLab (Xu et al., 2025), AndroidWorld (Rawles et al., 2025), and MobileWorld (Kong et al., 2025).

Despite these contributions, the robustness of agents against Android runtime anomalies remains largely unexplored. This gap is critical since GUI agents frequently encounter runtime anomalies from two sources that require recovery in real-world mobile execution. First, agents face external environment perturbations such as application ad pop-ups, system glitches and rendering delays that often disrupt correct task execution (Xu et al., 2026c; Zhang et al., 2025; Xu et al., 2026b). Second, agents make internal errors themselves during operation, such as hallucinating GUI elements in reasoning, grounding inaccurately or misusing actions, yet they consistently struggle to recover independently (Yuan et al., 2025; Wu et al., 2025a). Consequently, the ability to recover from both types of anomalies is essential for the real-world deployment of Android agents (Zhang et al., 2026; Zhai et al., 2026; Wu et al., 2025b). However, existing benchmarks either use predefined adversarial static trajectories for single-step testing (Xu et al., 2026c; Wei et al., 2026b), or lack systematic anomaly injection in dynamic settings, thus failing to cover the full spectrum of real-world runtime challenges we discussed (Sun et al., 2026; Gong et al., 2026).

To bridge this gap, we propose ANTRAP, a novel benchmark suite designed with challenging dynamic Android TRAPs to assess agent recovery capabilities against external environmental perturbations and internal errors. We construct an original set of 236 tasks within a dynamic environment extended from AndroidWorld (Rawles et al., 2025). To systematically test the robustness of agents against runtime anomalies, we conduct a pilot study in real-world scenarios and introduce a comprehensive taxonomy for granular adversarial evaluation on Android. As detailed in Figure 1, it consists of four primary layers containing state, thinking, action, and round based on the execution loop principle, along with ten specific subcategories for constructing adversarial tasks.

Corresponding author: Hong Zhou zhouhong_zju@zju.edu.cn. Our code will be available at https://github.com/gguogan/AnTrap.

Scenario I: Full screen pop-up occurs in screen.

Figure

While booking a hotel, the agent is misled by a full-screen pop-up which appeared on the screen.

Scenario II: Visual interpretation error in reasoning.

Figure

When adding a work phone number, the reasoning failed to recognize the current setting was still mobile rather than work, which misled the action.

Scenario III: Error occurs in agent action.

Figure

When trying to adjust the alarm volume via the slider, agent keeps missing the target due to a grounding error.

Scenario IV: Accident occurs in a long sequence.

When entering a health app, a shake-to-jump ad redirects to a food delivery app, causing the agent to lose direction in the task.

Can GUI agents recover from these anomalies?

Figure 1: Four scenarios of runtime anomalies in Android agent tasks from our pilot study, including pop-ups, reasoning errors, grounding errors, and long-sequence accidents. ANTRAP taxonomy organizes such anomalies into four layers (State, Thinking, Action, Round) and ten subcategories.

On ANTRAP, we conduct extensive experiments, evaluating 16 agentic models from 7 organizations known for their leading performance in GUI tasks. Our experiment results reveal that current agents generally exhibit performance drops when facing adversarial perturbations under dynamic traps. We attribute this to the agents' inadequate integration of historical trajectory context, and a scarcity of adversarial training environments and data.

Consequently, to analyze the unique challenges presented by ANTRAP, we conduct online Group Relative Policy Optimization (GRPO) in both the original and adversarial environments. The resulting performance separates environment-learnable challenges from reasoning-bottlenecked ones: state and action perturbations are largely recovered through adversarial training, whereas multi-step contextual traps such as execution loops resist improvement even under dedicated training.

The contributions are summarized as follows:

• We introduce a comprehensive taxonomy of runtime anomalies for Android GUI agents, categorizing real-world deployment challenges into four layers and ten subcategories.

• We design the ANTRAP suite, which includes an online environment and a benchmark with dynamic traps to evaluate agent performance under runtime anomalies.

• We analyze current agents using ANTRAP, revealing their vulnerability to runtime anomalies.

• We conduct GRPO experiments that provide insights for future agent development by distinguishing between environment-learnable challenges and reasoning-bottlenecked issues.

References (68)