Teaching Code Agents to Ask Without Leaking Private Code
Wenjia Jiang, Jieke Shi, Zhensu Sun, Chengran Yang, Shidong Pan, Peixin Zhang, Yifan Jia, James Hoang,
Key points
From the paper's conclusion- We propose utility-verified abstraction (UVA), which teaches the agent to describe private entities by their role and type while retaining the technical details an expert needs.
Abstract
Local coding agents can extend their reach by consulting a stronger cloud model. Such consultations, however, often expose the repository's private identifiers, file paths, and source code. Host-side masking hides recognized identifiers but leaves the surrounding code and the agent's phrasing unchanged, while training for less disclosure risks suppressing consultation or producing questions too vague to answer. We propose utility-verified abstraction (UVA), which teaches the agent to describe private entities by their role and type while retaining the technical details an expert needs. From solved repair trajectories, we rewrite each question into this form and keep the rewrite only if it discloses fewer private entities and the repair, replayed from the same execution state with the repair trajectories. Across two benchmarks, the trained agent consults more often than before training. On repository-level issue repair, it solves 37.6% of issues, against 25.3% for the same model working alone, a gain from the training as a whole rather than from consultation alone. Its questions disclose 3.7-fold fewer private entities and 1.4-fold less verbatim code than the untrained agent's questions to the same expert.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- SideTaskBench: Measuring Unauthorized Side-Task Delivery in Coding AgentsarXiv · 2026
- How Should Agents See Code? Rethinking Code Representations for Agentic Software EngineeringarXiv · 2026
- Coding Agents Propagate Vulnerabilities in Code BasesarXiv · 2026
- EPISTEME: Trustworthy Coding Agents Through Tool Call IntentarXiv · 2026
- FlowPlan: Reducing the Token Cost of Coding Agents with Abstraction-Guided Planning and VerificationarXiv · 2026
- AutoCodeSherpa: Symbolic Explanations in AI Coding AgentsProceedings of the ACM on Software Engineering · 2026