An agent with long-term memory can be poisoned in one session and exploited in a later one. A common defense is to record where each memory came from and to stop untrusted memories from driving consequential actions. Prior work shows that such defenses block attacks; much less is known about what they cost, or how much of the protection comes from the model and how much from the runtime. We run six current language models from four vendors as the agent in one 60-session synthetic back-office workload with 150 planted memory items per model, under three conditions: no defense, provenance labels that are shown to the model but not enforced, and the same labels enforced by the runtime. With no defense, planted items later caused a wrong action in 2% to 93% of cases depending on the model. Showing labels alone reduced this to 0-1% for four models but left 15% and 67% for the other two. With enforcement no planted item succeeded on any model unless a simulated user approved a bad confirmation. The defense is not free. With no attacker present, the share of requests completed correctly without involving the user fell to 86% for every model, a drop of 3 to 14 points: each legitimate fact that arrived from outside cost one exchange with the user, after which it was remembered as the user's own. The form of that exchange depends on the model. Models that respect labels ask the user; a model that ignores labels triggers runtime confirmation prompts. Labels without enforcement cost the label-respecting models more, up to 30 points, because merging let the user's answers inherit the untrusted label and expire. The planted texts are simple and do not adapt to the defense, the tasks are synthetic, and the user is simulated, so these results are a lower bound on attacks and a first measurement of cost, not a ranking of models. Code, workload and every model reply are released.
翻译:暂无翻译