# TRACE：将用户修正编译为运行时约束以改善编码智能体

- 来源：HuggingFace Daily Papers（社区热门论文）
- 发布时间：2026-06-11 08:00
- AIHOT 分数：66
- AIHOT 链接：https://aihot.virxact.com/items/cmqbalwd5012nslru339x0vtj
- 原文链接：https://arxiv.org/abs/2606.13174

## AI 摘要

交互式LLM智能体的用户偏好修正常被遗忘，Mem0记忆仍有57.5%相关偏好检查被违反。研究提出TRACE，一种即插即用的技能层管道，从用户聊天修正中挖掘原子规则并编译为运行时检查。在ClawArena上，分布内违规从100.0%降至37.6%，分布外从100.0%降至2.0%；在MemoryArena上，分布内从100.0%降至60.5%，任务通过率匹配或超越最强记忆基线。实验代码已开源。

## 正文

Interactive LLM agents are becoming part of daily work, but they do not reliably become easier to work with over time: a correction remembered in one session may still be violated in the next. We study this gap between preference access and preference compliance. In tasks derived from anonymized real-user friction cases, Mem0 memory still leaves 57.5% of applicable preference checks violated. We introduce Test-time Rule Acquisition and Compiled Enforcement (TRACE), a drop-in skill-layer pipeline for coding-agent runtimes that mines user corrections, rewrites them as atomic rules, and compiles them into runtime checks that must pass before an agent completes future tasks. Unlike runtime checks written ahead of time by developers, TRACE skills come from the user's own chat corrections. We evaluate TRACE with simulated user-in-the-loop experiments on ClawArena coding-agent tasks and MemoryArena-derived memory-intensive tasks. On ClawArena, TRACE reduces held-out preference violation from 100.0% to 37.6% on in-distribution tasks and from 100.0% to 2.0% on out-of-distribution tasks. On MemoryArena-derived tasks, TRACE reduces in-distribution violation from 100.0% to 60.5% while matching or exceeding the strongest memory baseline on task pass. These results suggest that compiling corrections into runtime enforcement can address a repeated-friction failure mode that memory alone does not reliably solve, reducing the need for users to restate the same correction across future sessions. Experiment code is available at https://github.com/YujunZhou/TRACE_exp, and the deployable skill is available at https://github.com/YujunZhou/tellonce.
