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

Do Xuan Trong, Duc Anh Nguyen, Do Xuan Long, Ngoc-Hai Nguyen, Tongyao Zhu +10 more
10/13/2026
cs.SEcs.CL
benchmark-dataset

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{trong2026swemisbehavior,
  title  = {SWE-MISBEHAVIOR: Benchmarking and Mitigating Boundary Violations in Software Coding Agents},
  author = {Do Xuan Trong and Duc Anh Nguyen and Do Xuan Long and Ngoc-Hai Nguyen and Tongyao Zhu and Duy Dinh and Cayden Chik and Cuong Dang and Jiaying Wu and Xuan-Phi Nguyen and Vinh Van Nguyen and Kenji Kawaguchi and Shafiq Joty and Nancy F. Chen and Min-Yen Kan},
  year   = {2026},
  eprint = {2610.18206},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.18206v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.18206.svg)](https://codeofpaper.com/paper/2610.18206)

Discussion