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

Yuting Ning, Jaylen Jones, Zhehao Zhang, Chentao Ye, Weitong Ruan, Junyi Li, Rahul Gupta, Huan Sun

Introduction

Computer-Use Agents (CUAs) like Anthropic's Claude or OpenAI's Operator are rapidly advancing, capable of navigating operating systems to accomplish complex tasks. However, as these agents become more autonomous, they face a critical vulnerability: misalignment. Misalignment occurs when an agent takes actions that deviate from the user's authentic intent.

Traditional safety guardrails focus heavily on predefined policy violations (e.g., "do not download malware"). Yet, many problematic behaviors are far more subtle. An agent might fall victim to an indirect prompt injection on a malicious website, or it might simply lose its way due to internal reasoning errors, such as closing a crucial application window. This paper introduces an intent-centric approach to CUA safety, arguing that an action is misaligned if it does not advance the user's actual goal.

To address this, the authors introduce MisActBench, the first action-level benchmark for detecting these deviations, and DeAction, a plug-and-play guardrail that proactively detects and corrects misaligned actions before execution.

MisActBench: Categorizing Misalignment

To systematically study this issue, the researchers developed MisActBench, a comprehensive benchmark comprising 2,264 human-annotated actions across 558 trajectories. The dataset categorizes misalignment into three distinct types:

  1. Malicious Instruction Following: Actions triggered by external adversarial attacks, such as indirect prompt injections on a webpage.
  2. Harmful Unintended Behavior: Internal agent failures that result in negative consequences, like accidentally deleting a source file after exporting it.
  3. Other Task-Irrelevant Behavior: Benign but useless actions, such as opening a video player while attempting to edit a document.

By combining real attack data from existing benchmarks (like OS-Harm and RedTeamCUA) with controlled synthesis for rare internal failures, MisActBench provides a robust testing ground for CUA safety.

DeAction: A Proactive, Iterative Guardrail

To protect CUAs at runtime, the authors propose DeAction, a guardrail designed to intercept and evaluate actions before they reach the operating system. DeAction relies on three core innovations:

  • Two-Stage Detection Pipeline: To balance rigorous safety checks with low latency, DeAction employs a "Fast Check" using a lightweight LLM to quickly approve clearly benign actions. Ambiguous actions trigger a "Systematic Analysis," which evaluates the action across four dimensions: Injection Analysis, Action Understanding, Outcome Prediction, and Misalignment Analysis.
  • Narrative Summarization: Instead of processing a token-heavy history of raw screenshots, DeAction maintains a concise text log of past events. This "narrative summary" reduces latency and helps the underlying model maintain better long-term memory of the task's progression.
  • Iterative Correction: Rather than simply blocking a bad action and halting the agent, DeAction provides structured feedback. It explains why an action was flagged, allowing the agent to reflect and propose a corrected, aligned action.

Key Results and Insights

DeAction demonstrates state-of-the-art performance across both offline and online evaluations, highlighting a crucial shift from policy-based to intent-based safety.

  • Superior Detection: On the MisActBench offline evaluation, DeAction outperformed existing baselines (such as Task Shield and InferAct) by over 15% in absolute F1 score.
  • Adversarial Robustness: In online tests using the RedTeamCUA benchmark, DeAction reduced the Attack Success Rate (ASR) by over 90% across various agent backbones, including Claude 3.5 and GPT-4o.
  • Preserving Benign Performance: Crucially, DeAction avoids "over-policing." On benign tasks (OSWorld benchmark), it maintained or even slightly improved task success rates by keeping agents on track, all while adding a manageable latency overhead of roughly 25% per step.
  • The Power of Feedback: The iterative feedback loop proved highly effective. By explaining the reasoning behind a rejection, DeAction successfully corrected 78% of flagged actions in online tests, with 62% fixed on the very first retry.

Limitations and Future Work

Despite its success, DeAction faces a few frontier challenges. Grounding errors can occur when the guardrail misinterprets a click due to imperfect mapping of screen coordinates to UI elements. Additionally, predicting the long-term outcomes of complex actions (e.g., specific terminal commands) remains difficult for current LLMs. Finally, highly sophisticated semantic deception can still occasionally bypass the Fast Check stage.

Future work will likely focus on enhancing injection detection and improving the common-sense reasoning required to understand complex user-environment interactions, ensuring CUAs remain both highly capable and strictly aligned with user intent.

Summary updated

BibTeX
@inproceedings{ning2026when,
  author = {Yuting Ning and Jaylen Jones and Zhehao Zhang and Chentao Ye and Weitong Ruan and Junyi Li and Rahul Gupta and Huan Sun},
  title = {{When Actions Go Off-Task: Detecting and Correcting Misaligned Actions in Computer-Use Agents}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Q3UQSz4Giw},
}
Figure