Useful but Unwieldy: How Software Engineers Perceive the Design of Chain-of-Thought Explanations in Coding Agents
Abstract
Coding agents (CAs) powered by Large Language Models (LLMs) are increasingly integrated into software engineering (SE) workflows. As these CAs take up more tasks and responsibilities, it is imperative for software engineers to understand the CA's rationale behind its' decisions, also known as the chain-of-thought (CoT). During the interaction, some CAs are capable of showing this CoT as a separate message to users with the goal of providing transparency and explainability. However, its effectiveness as an explainable AI (XAI) mechanism for end-users in software engineering has not yet been established in the literature. This motivates us to understand their experiences with the CoT message as an XAI tool through a survey and semi-structured follow-up interviews with 36 software engineers. Through thematic analysis of the survey responses and interview transcripts, we found that CoT message is an indispensable tool for software engineers in terms of transparency, scrutability, and trust towards the CA. However, various instances of CoT messages being overly verbose, containing technical information that does not match the users' expertise, or being perceived by the users as ``detached'' from the conversation because the ``agent is talking to itself'', lead to comprehension difficulties and selective use or abandonment of the tool. We synthesize these insights to inform the design of CoT messages that support software engineers in their explainability needs.