A blob with no speakers
A long coding session gets summarised, and the summariser squeezes the transcript into a single block of text that the agent then reads back as its memory of what happened. That is the hole. A forged approval line planted in a fetched page therefore arrived as the user's own instruction, and in the five harnesses with that design no jailbreak was needed to deliver it.
A role-typed summary keeps a marker on every line, so the agent can still tell a tool result from a user instruction while it reads back its own history. Flattening removes it. Pixee's Arshan Dabirsiaghi calls the result provenance destruction, and the attack a compaction laundering, because the permission survives the summary while the speaker who granted it does not.
Nine harnesses, two designs
The five flattening harnesses were pi, opencode, Cline, Aider and OpenHands, and in each one a forged approval survived compaction in 87 to 100 per cent of runs. The forged line kept working from anywhere in the transcript, out to a window of roughly 908,000 tokens. It did not fade.
The four role-typed harnesses were Codex, Gemini CLI, Qwen Code and Continue, and across the same trials they carried the forged line zero per cent of the time. None carried it. The difference sits in the serialiser rather than the model, because every harness in that group kept the role label attached all the way through compaction, so there was no label to forge.
End to end in a live pi terminal, the poisoned sessions ran an attacker-supplied curl-to-shell command in three of six takes, while the paired clean arm ran it in none of five. Before compaction the same session audited the planted line and refused it every time. After compaction it obeyed. The insert arrived as a summary line, and the agent acted on it as a standing instruction from the user.
What the fix costs
A code-level provenance check that tests the summary against the real user turns caught 77 per cent of laundering attempts while demoting 2 per cent of legitimate summary content. The cheaper fix goes in the serialiser: escape the role labels in untrusted content before flattening, so a line inside a tool result cannot pass for something the human typed. The role-typed harnesses already work this way. Their number was zero.
Log take: The harness knew who said what. Compaction threw that record away, and a permission that survives the summary without its speaker survives as permission. (Interpretation; vendor self-published, single preprint, authors' own harnesses.)
Sources
Research
Thread
- Relates to: A note to its next self
Both turn on compaction: that piece counted instructions an agent wrote into its own summary, this one counts a label the summariser threw away.
- Relates to: The agent read straight past the blocker
That entry covers prompt injection reaching an agent through fetched content; this one shows why the same content survives compaction as if the user had typed it.
Semantic neighbors
- Saved notes made a broken safeguard easier to hide79% similar
- Delete your own trace79% similar
- A notepad left open in a room79% similar
