cs.SEOct 13, 2026

SWE-MISBEHAVIOR: Benchmarking and Mitigating Boundary Violations in Software Coding Agents

Authors: Do Xuan Trong, Duc Anh Nguyen, Do Xuan Long, Ngoc-Hai Nguyen, Tongyao Zhu, Duy Dinh, Cayden Chik, Cuong Dang, 

Organizations: National University of Singapore · Vietnam National University, Hanoi · University of Virginia, USA · Agency for Science, Technology and Research (A*STAR), Singapore · 

Abstract

We present SWE-MISBEHAVIOR, the first taxonomy and evaluation framework for diagnosing boundary-violating misbehaviors in coding agents. It contains 7.4K human-in-the-loop synthesized samples spanning three layers of agent action space: (i) Code Generation, (ii) File Management, and (iii) System Interaction. Across these categories, SWE-MISBEHAVIOR covers 11 distinct misbehaviors with a fully automated evaluation protocol, including coding-action violations, Create/Read/Update/Delete (CRUD) file misbehaviors, system integrity and abuse violations, and task-goal misalignment. Experiments on state-of-the-art open-source coding agents (e.g., OpenHands, smolagents) reveal substantial misaligned behaviors, including dependency misinterpretation (up to 98.5% of cases), unintended modification of user inputs (50.5%), and silent compromise of environment integrity (53%). Motivated by these findings, we further propose CODE-KIT, a lightweight adaptive framework that combines misbehavior-aware guidelines with novel tools to help agents avoid such failures. CODE-KIT reduces misbehaviors by 52% for smolagents and 34% for OpenHands, while simultaneously improving task completion performance.

Figures & tables

Appendix figures & tables24 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Wink: Recovering from Misbehaviors in Coding Agents

    Feb 19, 2026Rahul Nanda, Chandra Maddila, Smriti Jha +3LLM Agent ReliabilityAgent Reliability

  2. AgentSWE: Can Coding Agents Build the Agent You Actually Want?

    Oct 9, 2026Jiahao Wang, Hongjin Qian, Yuyang Hu +2Coding AgentsSoftware Engineering Agents

  3. ClayBuddy: A Framework, Evaluation, & Mitigation of Coding Agent Failures

    Jun 13, 2026Kenneth Ge, Andre AssisAgent Failure AnalysisAI Coding Agents