# Summary: 2026-10-17_19-13-56Z_TeachingCodeAgentstoAskWithoutLeakingPrivateCode.md Saved: 2026-10-19 21:09 Source: 2026-10-17_19-13-56Z_TeachingCodeAgentstoAskWithoutLeakingPrivateCode.md Model: None --- ## Summary This paper addresses the privacy risks associated with local coding agents consulting stronger cloud models for assistance, specifically focusing on the leakage of private identifiers, file paths, and source code. The authors propose a novel technique called Utility-Verified Abstraction (UVA) to teach agents how to formulate questions that describe private entities by their role and type rather than exposing raw code. By training on rewritten queries from solved repair trajectories, the method ensures that questions remain technically precise enough for experts to answer while significantly reducing data disclosure. The approach demonstrates that agents can be trained to consult external models more frequently and effectively without compromising repository privacy. ## Key Contributions - **Introduction of Utility-Verified Abstraction (UVA):** The paper introduces a training methodology that rewrites agent queries to abstract private entities into role-based descriptions, ensuring technical utility is preserved while minimizing privacy leakage. - **Improved Consultation Frequency and Success Rate:** The trained agent consults the cloud model more often than untrained agents and achieves a higher success rate in repository-level issue repair (37.6% vs. 25.3% for the model working alone). - **Significant Reduction in Privacy Leakage:** The UVA-trained agent discloses 3.7-fold fewer private entities and 1.4-fold less verbatim code compared to untrained agents when consulting the same expert model. ## Methodology The authors approach the problem by leveraging existing solved repair trajectories to create a training dataset for privacy-preserving consultation. The core methodology involves rewriting each original question from a successful repair trajectory into an abstracted form that describes private entities by their role and type. Crucially, these rewritten questions are only retained if they meet two strict criteria: they must disclose fewer private entities than the original question, and the resulting repair must still be successful when replayed from the same execution state. This "utility-verified" step ensures that the abstraction does not degrade the agent's ability to solve problems. The training process teaches the agent to generate these abstracted queries, balancing the need for technical detail with the requirement for privacy protection. ## Results Experimental evaluations across two benchmarks demonstrate the effectiveness of the UVA approach. On repository-level issue repair tasks, the UVA-trained agent solved 37.6% of issues, significantly outperforming the same model operating in isolation, which solved only 25.3%. This indicates that the performance gain is derived from the trained ability to consult effectively, not just from the act of consulting itself. Furthermore, the analysis of the generated questions shows a substantial reduction in privacy leakage: the UVA agent’s queries disclosed 3.7 times fewer private entities and 1.4 times less verbatim code compared to queries generated by untrained agents. The results also show that the trained agent consulted the cloud model more frequently, suggesting that the abstraction technique lowers the barrier to seeking help without sacrificing privacy. ## Significance This work is significant because it resolves a critical tension in AI-assisted software development: the trade-off between leveraging powerful external models for complex tasks and protecting proprietary code. Traditional masking techniques are often insufficient, and naive training for privacy can lead to vague, unanswerable questions. UVA provides a practical solution that allows developers to use local agents safely in enterprise environments where code privacy is paramount. By proving that agents can be trained to ask precise, privacy-preserving questions, this research enables broader adoption of hybrid local-cloud coding workflows, enhancing productivity without compromising data security. ## Related Concepts - Utility-Verified Abstraction (UVA) - Privacy-Preserving AI - Code Agent Consultation - Repository-Level Issue Repair - Data Leakage in LLMs - Role-Based Entity Description - Hybrid Local-Cloud Computing ## Original research paper [Canonical original paper: http://arxiv.org/abs/2610.24824v1](http://arxiv.org/abs/2610.24824v1)