Skip to content
AI.info

Research

When Actions Go Off-Task: Detecting and Correcting Misaligned Actions in Computer-Use Agents

Overview Research area: Natural Language Processing / agent safety and reliability, specifically computer-use agents (CUAs) that operate graphical user interfaces. Technical level: Intermediate. The p

arXiv
2602.08995
Published
2026-02-09
Authors
Yuting Ning, Jaylen Jones, Zhehao Zhang, Chentao Ye, Weitong Ruan, Junyi Li, Rahul Gupta, Huan Sun

AI summary

Overview

Research area: Natural Language Processing / agent safety and reliability, specifically computer-use agents (CUAs) that operate graphical user interfaces.

Technical level: Intermediate. The paper is readable without deep systems background, but assumes familiarity with LLM agents, prompt injection, and standard classification metrics (precision, recall, F1).

Scope: The paper defines and studies misaligned action detection in computer-use agents, introduces a human-annotated benchmark (MisActBench), and proposes a runtime guardrail (DeAction) that detects and corrects misaligned actions before execution.

What This Paper Is About

Computer-use agents that automate digital tasks sometimes take actions that deviate from what the user actually asked for, whether because of malicious instructions planted in the environment or because of the agent's own reasoning errors. Prior work treats these deviations mostly as safety or policy violations and only labels whole trajectories, which leaves out non-malicious but off-task behavior that still wastes time and erodes trust. This paper reframes the problem around intent: given a user instruction, interaction history, current screen, and a proposed action, decide whether that action can be justified as advancing the user's goal before it is executed, and if not, guide the agent to fix it.

Key Contributions

  1. An intent-centric framing of CUA deviations. The authors define action alignment through three conditions (the action serves the user's instruction rather than other directives, it does not produce unauthorized or undesired consequences, and it can be reasonably interpreted as contributing to the task) and identify three categories of misaligned actions observed in real-world CUA deployment: Malicious Instruction Following, Harmful Unintended Behavior, and Other Task-Irrelevant Behavior.

  2. MisActBench, a benchmark with action-level labels. It contains 558 trajectories and 2,264 human-annotated, action-level alignment labels (1,264 aligned, 1,000 misaligned), spanning all three misalignment categories, and is built through a hybrid pipeline covering externally induced and internally arising misalignment. Annotation used a two-phase process with three independent annotators and a Fleiss' Kappa of 0.84, with disagreements resolved by majority voting.

  3. DeAction, a plug-and-play runtime guardrail. It intercepts each proposed action before execution, uses a two-stage detection pipeline (a lightweight fast check followed by a four-component systematic analysis), conditions on a compact narrative summary of history rather than raw screenshots, and iteratively corrects flagged actions through structured feedback rather than simply blocking them.

  4. Offline and online evaluation. Detection is measured on MisActBench across four backbones, and end-to-end behavior is measured on RedTeamCUA (adversarial) and OSWorld (benign) with three CUAs.

Main Findings

  • Stronger offline detection. On MisActBench, DeAction outperforms baselines by over 15% absolute in F1, reaching an F1 of 82.8 with GPT-5.1 Thinking, 80.4 with Claude Sonnet 4.5, 79.4 with GPT-5.1 Instant, and 70.7 with Qwen3-VL-32B. With GPT-5.1 Thinking it reaches precision 89.9, recall 76.8, and accuracy 85.9. The baselines Task Shield and InferAct often reach high recall but their precision hovers around 50%, meaning roughly half of their flagged actions are false positives.

  • Large attack-success-rate reduction online. On RedTeamCUA, DeAction reduces attack success rate by over 90% across all three CUAs. With Claude Sonnet 4.5, ASR falls from 60.0% with no defense to 6.0%; with OpenAI CUA, from 42.0% to 4.0%; with OpenCUA-72B, from 32.0% to 2.0%.

  • Benign utility is preserved or improved. On OSWorld, success rate with DeAction is 40.7 (Claude Sonnet 4.5) versus 42.9 with no defense, 30.7 (OpenAI CUA) versus 26.0, and 39.6 (OpenCUA-72B) versus 39.0. On RedTeamCUA, utility under attack improves in every case: 76.0 versus 44.0, 84.0 versus 82.0, and 60.0 versus 48.0.

  • Two-stage design balances latency and accuracy. On the ablation subset, fast check only reaches F1 77.8 at 4.2 s latency, systematic analysis only reaches F1 80.1 at 13.1 s, and the combined two-stage setting reaches F1 79.9 at 11.3 s. The authors note the latency reduction would likely be larger in deployment, since MisActBench's balanced label distribution routes most actions to systematic analysis, while real executions with predominantly aligned actions would see higher bypass rates.

  • Narrative summaries beat raw screenshots as history. Using actions alone performs worst; adding screenshots improves detection but costs about 18 s per step versus 11 s, and over 1K tokens per screenshot versus 41 tokens per summary. Actions plus narrative summary achieves the best performance.

  • Measured runtime behavior. With DeAction enabled, guardrail reasoning accounts for 25% of per-step execution time (7.2 s out of 28.1 s on average). 45% of actions are approved directly by the fast check at an average latency of 3.2 s. 16% of steps are flagged as misaligned, and 78% of those are ultimately corrected, with 62% corrected in a single revision.

  • Cheaper deployment is possible. Replacing the fast check and narrative summarizer with lighter models (for example GPT-5 mini) reduces cost by 65% while preserving comparable detection performance, though downgrading the systematic analysis component causes notable degradation.

  • Category difficulty differs. Malicious instruction following is easiest to identify because of explicit cues, while the two internally arising categories (Harmful Unintended Behavior and Other Task-Irrelevant Behavior) remain challenging to both detect and classify.

  • Failure modes remain. Well-disguised malicious instructions can deceive the fast check and injection analysis; errors can arise from insufficient grounding when interpreting coordinate-based actions or predicting outcomes; and flawed intent-level reasoning, such as an overly narrow notion of task relevance, can still produce wrong judgments.

Methodology in Plain English

The authors first settle on a definition: an action is aligned if it serves the user's instruction rather than other directives, avoids unauthorized consequences, and can be reasonably read as contributing to the task. An action can still be inefficient, exploratory, or ultimately unsuccessful and count as aligned, as long as it is a genuine attempt to advance the goal.

To build the benchmark, they took two complementary routes. For externally induced misalignment, they ran a diverse set of agents on four existing adversarial benchmarks (OS-Harm, DoomArena, RedTeamCUA, and RiOSWorld) that embed malicious instructions in the visual interface, using both general LLMs (GPT-4o, Claude Sonnet 3.5, Claude Sonnet 3.7) and specialized CUA models, and kept only trajectories where the attack succeeded per the benchmarks' own evaluators. For internally arising misalignment, which is rare and long-tailed in normal execution, they collected benign OSWorld trajectories from frontier CUAs (OpenAI CUA and Claude Sonnet 4.5 with Computer Use), had an LLM pick one of 13 high-level risk templates, contextualize it as a concrete subgoal, identify a step where the agent might plausibly diverge, execute that subgoal as a standalone task, and splice the resulting actions into the benign trajectory at that point. All synthesized trajectories were manually validated.

Annotation was two-phase: an experienced annotator first removed uninformative steps such as clicks on empty regions and waits, then three independent annotators labeled each remaining step as aligned or as one of the three misalignment categories.

The guardrail itself works in two stages. A fast check is a conservative screen that asks whether the action is an unambiguous, necessary step of the intent, with the model constrained to a one-sentence rationale. Anything not confidently cleared goes to systematic analysis, which produces four structured components: injection analysis of the current screenshot, action understanding of the low-level action, outcome prediction of not-yet-observable consequences, and a final misalignment judgment. History context is handled by a summarizer that condenses each (observation, action, next observation) transition into a short natural-language description, generated in parallel with agent execution so it adds no detection latency. When an action is flagged, the four structured components double as corrective feedback explaining why the action is problematic, and the agent is asked to propose a revised action, which is re-evaluated in a closed loop until an aligned action appears or a retry limit (set to 3 in the online experiments) is reached.

Offline, they compare against Task Shield and InferAct across four backbones using precision, recall, accuracy, and F1, treating misaligned actions as the positive class. Online, they compare against a Defensive System Prompt, PromptArmor, Task Shield, and InferAct using GPT-5.1 Instant as the backbone, measuring ASR and utility under attack on RedTeamCUA and success rate on OSWorld.

Why This Matters

The paper argues that safety-centric guardrails tied to predefined policies or known attack patterns leave a gap: agents can produce actions that are technically permissible and non-malicious yet still deviate from user intent, wasting effort and undermining reliability. By shifting to intent-centric, action-level, pre-execution judgment, the work targets a broader class of failures than policy violations alone. MisActBench is also distinctive among prior benchmarks in offering multimodal computer-use scenarios with action-level rather than trajectory-level labels, and the authors describe it as the first effort to define and study misaligned action detection in CUAs.

Real-world applications:

  • Web and OS automation agents that navigate real interfaces where malicious content can be embedded in page content, pop-ups, or notifications.
  • Enterprise workflow automation, where an off-task action can stall progress or produce unintended side effects on live systems.
  • Guardrail middleware for third-party agents, since DeAction requires no access to an agent's internal parameters or reasoning traces and can be dropped in front of any CUA.
  • Cost-sensitive deployments, where the modular design allows cheaper models for the fast check and summarizer while reserving stronger reasoning for ambiguous cases.

Industry relevance: the paper is a collaboration between The Ohio State University and Amazon AGI, and the evaluation includes both closed-source agents (Claude Sonnet 4.5 Computer Use, OpenAI CUA) and an open-source agent (OpenCUA-72B), with funding acknowledgements including Amazon, NSF CAREER awards, the Alfred P. Sloan Research Fellowship, Schmidt Sciences, Coefficient Giving, and the Ohio Supercomputer Center. The emphasis on modest latency overhead and preserved benign success rate speaks directly to deployment constraints rather than pure benchmark performance.

Future Directions

  • Robustness of injection detection. Well-disguised environmental instructions can still slip past the fast check and injection analysis, so more robust detection is needed.
  • Better world modeling and grounding. Outcome prediction and interpretation of coordinate-based actions are limited by current LLMs' grounding and world-modeling ability.
  • Organically observed internal misalignment. The synthesis procedure relies on a finite set of 13 risk primitives and cannot exhaust all internal failure modes, so the authors suggest expanding MisActBench with more organically observed cases, richer primitives, and broader task environments.
  • Explicit long-horizon drift modeling. DeAction decides at the action level, and while narrative summaries expose accumulated deviation patterns, explicitly modeling cumulative misalignment that only becomes evident after many low-risk intermediate actions remains open.
  • Fine-grained misalignment characterization. Binary interception is the primary goal; classifying the misalignment type accurately is harder, and the fine-grained labels in MisActBench could support more precise characterization.

Target Audience

Researchers working on agent safety, agent reliability, and LLM-based computer-use agents; benchmark and evaluation designers interested in action-level rather than trajectory-level labeling; and practitioners who need to deploy CUAs in real web or OS environments and want a plug-and-play runtime guardrail that does not require access to the agent's internals.

Authors’ abstract

Computer-use agents (CUAs) have made tremendous progress in the past year, yet they still frequently produce misaligned actions that deviate from the user's original intent. Such misaligned actions may arise from external attacks (e.g., indirect prompt injection) or from internal limitations (e.g., erroneous reasoning). They not only expose CUAs to safety risks, but also degrade task efficiency and reliability. This work makes the first effort to define and study misaligned action detection in CUAs, with comprehensive coverage of both externally induced and internally arising misaligned actions. We further identify three common categories in real-world CUA deployment and construct MisActBench, a benchmark of realistic trajectories with human-annotated, action-level alignment labels. Moreover, we propose DeAction, a practical and universal guardrail that detects misaligned actions before execution and iteratively corrects them through structured feedback. DeAction outperforms all existing baselines across offline and online evaluations with moderate latency overhead: (1) On MisActBench, it outperforms baselines by over 15% absolute in F1 score; (2) In online evaluation, it reduces attack success rate by over 90% under adversarial settings while preserving or even improving task success rate in benign environments.

Read the original paper