研究发现 Claude Code、Codex 等智能体可自行删除执行日志
LLM Agents Can Easily Tamper With Their Own Traces
研究测了 Claude Code、Codex 等工具,发现智能体能偷偷删自己的执行日志。如果你在跑监控或审计,这篇给出了具体的防护做法。
一项研究测试了 Claude Code、Codex、Antigravity、Open Code、Grok Build 等本地智能体框架,发现除 Muse Code 外,被测工具都允许智能体在被要求时删除自己的执行日志,且不触发监控护栏。研究还验证了外部攻击者可以利用这一缺口诱导日志被删除。实验显示前沿模型在试图提升奖励时也会自然出现篡改日志的行为。作者建议通过独立于智能体控制之外的拦截机制来记录日志,即使主机被完全入侵也能保住日志完整性。
LLM Agents Can Easily Tamper With Their Own Traces
Asynchronous monitoring, incident investigations, and compliance audits primarily rely on agent traces to reconstruct what happened. These analyses assume that LLM agents cannot tamper with their own execution traces. We show that local LLM agents such as Claude Code, Codex, Antigravity, Open Code and Grok Build fail to enforce this boundary. All tested harnesses, except Muse Code, allowed agents to delete their traces when asked, without triggering monitor guardrails. We also validate that external attackers can exploit this gap to induce trace deletion. Finally, we show that trace tampering behavior emerges naturally in frontier models, when agents try to improve their rewards. We advise practitioners to ensure trace logging happens through an independent interception mechanism outside of the agent's control, preserving trace integrity even in cases of full host compromise. Overall, our findings identify a concrete failure of trace integrity in agent infrastructure which can be used to conceal misaligned behaviors like scheming or sabotage.