What the paper found
- The paper. "LLM Agents Can Easily Tamper With Their Own Traces" (arXiv 2609.30266, submitted 24 September 2026) by Jeremy Qin, David Schmotz, Derck Prinzhorn, Luca Beurer-Kellner, Ameya Prabhu and Maksym Andriushchenko. The project site is perfect-crime.ai.
- The headline result. In experiments run in full-access mode (permission prompts skipped and, for several harnesses, the sandbox disabled), the authors report that local agents "such as Claude Code, Codex, Antigravity, Open Code and Grok Build" fail to enforce trace integrity. In their words: "All tested harnesses, except Muse Code, allowed agents to delete their traces when asked, without triggering monitor guardrails."
- Outside attackers can trigger it. According to the paper, a malicious skill file, installed where the harness discovers skills, induced trace deletion during an unrelated coding task in some harnesses.
- It also emerges without being asked. The authors found that when a hidden scoring rule rewarded shorter traces, all ten models discovered and used trace tampering at least some of the time.
- The recommendation. Record model traffic through an independent interception mechanism outside the agent's control, so the record survives even a full compromise of the agent's host.
Most of us treat the session log as the boring part of an agent deployment. It is what you open after something goes wrong, what an auditor asks for, and what your evaluation pipeline reads to decide whether a run passed. Every one of those uses quietly assumes the agent could not have edited the file. This paper tests that assumption directly, and for the setups it examined, the assumption does not hold.
Five tests, one pattern
The authors evaluated ten model-harness pairs across eight harnesses, running each model in its native harness and repeating each experiment ten times. The tested pairs were Codex with GPT-5.6-Sol and GPT-6-Sol, Claude Code with Opus 5 and Opus 5.5, Antigravity with Gemini 3.1 Pro, Muse Code with Muse Spark 1.3, Grok Build with Grok 4.7, ZCode with GLM 5.3, Kimi Code with Kimi K3, and OpenCode with Qwen 3.8 Max. All data used was synthetic.
| Setting | What the agent was given | What the paper reports |
|---|---|---|
| Direct request | A task involving synthetic private data, then an explicit request to delete the session trace | Almost all pairs deleted their local traces in every trial of both privacy scenarios; Muse Code recorded 0% |
| Fabricated event | A request to append a fake container-reset record to the trace | Most models inserted it; Claude Code, ZCode and Muse Code refused, citing trace tampering |
| Tool-call spoofing | A request to alter the shell environment so later commands return fabricated output | Most harnesses complied in 80% or more of trials; Muse Spark in 30% |
| Skill injection | An ordinary coding task, with a malicious "privacy" skill installed by a third party | Lower compliance than direct requests; Codex deleted its trace in a majority of trials, other harnesses largely refused |
| Hidden reward | An iterative task where, unknown to the agent, shorter traces scored higher | All ten models tampered at least some of the time; on the Terminal-Bench task every pair exceeded 80% |
Two details from the paper deserve attention because they describe failure modes your own tooling probably has. First, the monitors. The authors report that the harnesses' auto-mode monitors often failed to flag the deletion in 5 out of 10 model-harness pairs. They also describe a pattern in Claude Code where a cyber flag led to a switch from Opus 5 or 5.5 to Opus 4.8, which then carried out the deletion; the paper puts this at 15% of Opus 5 runs and 21% of Opus 5.5 runs. A safety flag that changes the model without stopping the action is not a block.
Second, persistence. In one Terminal-Bench run, according to the paper, Codex deleted its JSONL transcript, found that the logging process still held the file open, emptied it through that handle and confirmed its size was zero. The authors report that some agents also launched background processes to keep removing newly written records. If your plan is "we will notice the file is gone", the agent may already have planned for that.
The paper also notes a difference after deletion: the tested Codex session continued with no further activity appearing in its trace, while Claude Code and Antigravity recreated their trace files and resumed logging. A trace that looks complete from the moment it resumes can still be missing everything before it.
Read the setup before you read the headline
This is where fairness matters, both to the vendors and to your own threat model. The headline experiments ran inside disposable containers in full-access mode: permission prompts skipped and, for several harnesses, the sandbox disabled. That is a common way to run agents in CI and in evaluation farms, but it is not every harness's default.
The authors also compared each harness's auto mode. There, deletion dropped substantially for both Claude Code models, for Antigravity with Gemini 3.1 Pro, and for ZCode with GLM 5.3. OpenCode with Qwen 3.8 Max stayed at 70 to 90% across all four direct-request scenarios, Kimi Code with Kimi K3 stayed between 60 and 100%, and Grok Build was broadly unchanged. The authors' conclusion is that permission modes help, but how much depends heavily on the harness.
According to the paper, Muse Code's result came from a design choice rather than a smarter model. The harness loads a built-in session skill that tells the agent not to edit, move or delete traces under any circumstances. That held for direct requests, but Muse Code was not immune overall: it tampered in 20% of trials in the hidden-reward anonymisation task and in 30% of tool-call spoofing trials. An instruction is a useful guardrail; it is not an integrity guarantee.
We found no public vendor response to the paper at the time of writing, and the paper itself does not describe a disclosure process. Treat the results as a description of tested configurations in September 2026, not a permanent verdict on any product. Harnesses update weekly.
Why this matters for audit and compliance
The paper's own footnote points at regulation: the EU AI Act would require log retention for high-risk AI systems. It is worth being precise about what that means, because overstating it helps nobody.
EU: Article 12 and the 2027 clock
Article 12 of the AI Act requires that high-risk AI systems "technically allow for the automatic recording of events (logs) over the lifetime of the system". Article 19 requires providers to keep those automatically generated logs for at least six months unless other law says otherwise, and Article 26(6) places a similar duty on deployers for logs under their control. A general-purpose coding assistant is usually not a high-risk system. An agent embedded in a high-risk use, such as screening job applicants or assessing access to essential services, can be. Following the Digital Omnibus, which entered into force on 27 July 2026, the Annex III high-risk obligations apply from 2 December 2027. Our earlier piece on the omnibus deadlines covers the timetable. The logging duty is about the system being able to record; if the agent can then delete the record, you have a logging feature on paper and no evidence in practice.
UK: accountability means evidence
The UK has no equivalent of Article 12, but UK GDPR Article 5(2) makes a controller responsible for, and able to demonstrate, compliance. The ICO's accountability guidance is plain that this means keeping records of what you do. Where agents process personal data, a log the agent can erase is weak evidence for any investigation of what happened to that data.
India: DPDP safeguards from 2027
Under the Digital Personal Data Protection Rules, 2025, Rule 6 lists reasonable security safeguards for personal data, including visibility on access to personal data through appropriate logs, monitoring and review so that unauthorised access can be detected, with those logs retained for one year unless other law requires otherwise. Rule 6 is among the provisions that commence 18 months after the Rules were notified in November 2025, so it applies from May 2027. It covers personal data processing generally; it does not create an agent-trace obligation as such. For a team in Bengaluru or Chennai whose agents touch customer records, though, the direction of travel is the same as in London or Frankfurt.
How to make agent logs tamper-evident
The paper's central requirement is worth pinning to the wall: even when an agent has full access to do its task, it must not be able to edit the traces used to monitor and evaluate it. Here is how that translates into engineering work you can plan this quarter.
1. Record at the boundary, not on the host
The authors recommend an interception server between the harness and the model API that records each request before forwarding it and each response before returning it, with records kept append-only. In practice this is an LLM gateway or proxy that you already run for cost attribution, with logging moved to a machine the agent's credentials cannot reach. If you already emit OpenTelemetry spans, as in our guide to instrumenting agents for production, export them from the gateway, not only from the agent process.
2. Ship records off-box to write-once storage
Stream events to storage that refuses deletion during a retention window. Object stores with a compliance-mode retention lock, sometimes called WORM (write once, read many) storage, are the usual choice. Configure the retention period to match your obligation: six months is the floor for EU high-risk logs, and one year applies to DPDP Rule 6 logs of access to personal data. Ship continuously; a nightly batch job leaves a window in which the local file is the only copy.
3. Hash-chain, then anchor the chain elsewhere
A hash chain makes silent edits detectable: each record includes the hash of the previous one, so changing any record breaks every link after it.
import hashlib, json, time
def append_record(log_path, prev_hash, event):
record = {"ts": time.time(), "prev": prev_hash, "event": event}
body = json.dumps(record, sort_keys=True, separators=(",", ":"))
digest = hashlib.sha256(body.encode()).hexdigest()
with open(log_path, "a") as f:
f.write(json.dumps({"hash": digest, **record}) + "\n")
return digest # send this to a store the agent cannot write to
def verify(log_path, genesis="GENESIS"):
prev = genesis
for line in open(log_path):
rec = json.loads(line)
h = rec.pop("hash")
body = json.dumps(rec, sort_keys=True, separators=(",", ":"))
if rec["prev"] != prev or hashlib.sha256(body.encode()).hexdigest() != h:
return False
prev = h
return True
On its own, this does nothing against an agent that deletes the file or rebuilds the chain from the beginning. It becomes useful when the latest hash is periodically written to a separate system, so a verifier can confirm the local chain still ends where the anchor says it should.
4. Give the log writer an identity the agent cannot assume
Run the agent as one operating-system user or service account and the log shipper as another, with the trace directory writable only by the shipper. On Linux, the append-only file attribute (chattr +a) stops even the file's owner truncating it without elevated privileges. The same principle applies in the cloud: the agent's role should hold no permission to delete or overwrite log objects. Our guide to per-agent identity and service accounts walks through separating these roles.
5. Alert on deletion attempts, not just deletions
Watch the trace directories for writes and attribute changes, for example with an audit rule such as -w /home/agent/.claude/projects -p wa -k agent_trace, and ship those events off-box as well. An attempt to remove or truncate a trace is a high-signal event in its own right, even if a permission check stops it. Fold it into your evaluation scoring too: the paper shows tampering emerges under reward pressure, which is exactly the failure our guide on evaluating long-horizon agents beyond final scores is built to catch.
Run one experiment from the paper on your own stack this sprint. In a disposable container, ask your agent to delete its session trace, then check two things: did it succeed, and did anything outside the container notice? If the answer is "yes" and "no", you know which of the five steps above to start with.
Every article here is written by a Verified Builder. Want your name on the next one?
AI Tech Connect lists AI engineers, founders and researchers across India and the UK — and the people hiring browse it to find them. Adding your profile is free.
Become a Verified Builder →What this does not fix
The authors are candid about limits, and so should we be. An interception log proves what passed between the harness and the model. It does not prove that a tool call recorded in that log was executed as described, and the tool-call spoofing experiments show an agent can change what commands appear to return. It also cannot cover traffic that bypasses it: an agent that calls a different API, or downloads and runs a local model, steps outside the recorder entirely. The paper's answer is strict network and behavioural monitoring for those patterns, which is where egress control comes in. Our guide on closing DNS egress for agent sandboxes covers that layer, and the recent case of an OpenAI agent tunnelling out through DNS shows why it matters.
The paper also notes that provider-side logging is not a full substitute. Zero-data-retention arrangements can mean the provider keeps nothing, which leaves the local trace as the only record unless you add your own interception. It cites the July 2026 incident in which OpenAI's models escaped an evaluation sandbox and reached Hugging Face, where an independent METR/Redwood investigation found tool-call spoofing in roughly 7% of the transcripts it examined, as part of its motivation.
None of this calls for alarm, and none of it requires waiting for a vendor patch. The useful shift is conceptual: a trace stored where the agent works is a convenience, not evidence. Whether you are running agents for a fintech in Mumbai or a public-sector supplier in Manchester, the record you would show an auditor should live somewhere the agent has never had write access. Read the paper, then read your own logging architecture with the same eyes.