TOM-SWE: User Mental Modeling For Software Engineering Agents

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhou, Xuhui, Chen, Valerie, Wang, Zora Zhiruo, Neubig, Graham, Sap, Maarten, Wang, Xingyao
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908798855151616
author Zhou, Xuhui
Chen, Valerie
Wang, Zora Zhiruo
Neubig, Graham
Sap, Maarten
Wang, Xingyao
author_facet Zhou, Xuhui
Chen, Valerie
Wang, Zora Zhiruo
Neubig, Graham
Sap, Maarten
Wang, Xingyao
contents Recent advances in coding agents have made them capable of planning, editing, running, and testing complex code bases. Despite their growing ability in coding tasks, these systems still struggle to infer and track user intent, especially when instructions are underspecified or context-dependent. To bridge this gap, we introduce ToM-SWE, a dual-agent architecture that pairs a primary software-engineering (SWE) agent with a lightweight theory-of-mind (ToM) partner agent dedicated to modeling the user's mental state. The ToM agent infers user goals, constraints, and preferences from instructions and interaction history, maintains a \textbf{persistent memory} of the user, and provides user-related suggestions to the SWE agent. In two software engineering benchmarks (ambiguous SWE-bench and stateful SWE-bench), ToM-SWE improves task success rates and user satisfaction. Notably, on the stateful SWE benchmark, a newly introduced evaluation that provides agents with a user simulator along with previous interaction histories, ToM-SWE achieves a substantially higher task success rate of 59.7\% compared to 18.1\% for OpenHands, a state-of-the-art SWE agent. Furthermore, in a three-week study with professional developers using ToM-SWE in their daily work, participants found it useful 86\% of the time, underscoring the value of stateful user modeling for practical coding agents.
format Preprint
id arxiv_https___arxiv_org_abs_2510_21903
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle TOM-SWE: User Mental Modeling For Software Engineering Agents
Zhou, Xuhui
Chen, Valerie
Wang, Zora Zhiruo
Neubig, Graham
Sap, Maarten
Wang, Xingyao
Software Engineering
Artificial Intelligence
Recent advances in coding agents have made them capable of planning, editing, running, and testing complex code bases. Despite their growing ability in coding tasks, these systems still struggle to infer and track user intent, especially when instructions are underspecified or context-dependent. To bridge this gap, we introduce ToM-SWE, a dual-agent architecture that pairs a primary software-engineering (SWE) agent with a lightweight theory-of-mind (ToM) partner agent dedicated to modeling the user's mental state. The ToM agent infers user goals, constraints, and preferences from instructions and interaction history, maintains a \textbf{persistent memory} of the user, and provides user-related suggestions to the SWE agent. In two software engineering benchmarks (ambiguous SWE-bench and stateful SWE-bench), ToM-SWE improves task success rates and user satisfaction. Notably, on the stateful SWE benchmark, a newly introduced evaluation that provides agents with a user simulator along with previous interaction histories, ToM-SWE achieves a substantially higher task success rate of 59.7\% compared to 18.1\% for OpenHands, a state-of-the-art SWE agent. Furthermore, in a three-week study with professional developers using ToM-SWE in their daily work, participants found it useful 86\% of the time, underscoring the value of stateful user modeling for practical coding agents.
title TOM-SWE: User Mental Modeling For Software Engineering Agents
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2510.21903