- Rating
- 2(+1)
- Confidence
- 4(+1)
- Informativeness
- 1
- Presentation
- 2(+1)
- Soundness
- 2
Read review
Paper summary
This paper studies indirect prompt injection through context compaction in LLM agents, focusing on how summaries transform instructions embedded in untrusted external content into apparent task requirements. The authors evaluate ten models using injected tool outputs across coding, web-search, and AgentDojo tasks, measuring how summaries represent these instructions and whether agents subsequently follow them. The results show that agents are more likely to follow injected instructions when summaries present them as goals, constraints, decisions, or next steps. A controlled experiment further demonstrates that presenting the same instruction as remaining work rather than untrusted evidence increases attack success. The authors also evaluate defenses based on summary delivery roles and compaction prompts. Lowering the summary’s message authority provides little benefit, whereas separating user-authorized goals from external observations reduces attack success from 24% to 5% in a four-model tool-enabled evaluation. The authors argue that compaction should preserve source attribution and authorization boundaries, rather than merely retain task-relevant information.
Critical strengths
- The paper introduces a realistic attack scenario: compaction attacks.
- The evaluation results show that compaction attacks persist in some widely used models.
Critical weaknesses
Weaknesses:
- This paper claims that compacting a poisoned conversation history can preserve an indirect prompt injection attack. This is not surprising and I believe the proposed compaction attack is simply a subset of indirect prompt injection attacks. To claim that compaction introduces a new attack surface, the paper should provide experiments demonstrating additional threats compared with conventional indirect prompt injection, such as amplifying attacks or bypassing more defenses. However, Appendix E.7 reports 115 successful attacks with the full history, compared with 109 after compaction. This suggests that compaction attacks are no more threatening than conventional indirect prompt injection attacks, weakening their significance and novelty.
- The paper’s intended takeaway is unclear. My understanding is that the paper aims to show that compaction can transform external malicious content into tasks recognized by agents, making them more vulnerable to attacks. However, I do not see experiments supporting this claim, and I am unsure whether my interpretation is correct.
- The experiments are conducted on AgentDojo, an existing security benchmark for tool-using agents that does not natively support the evaluated harnesses and compactor. Several benchmarks, such as DTap [1], support current harnesses, including OpenClaw, Codex, and Claude Code. Evaluation using these real-world harnesses would make the results more convincing.
References:
[1] DecodingTrust-Agent Platform (DTap): A Controllable and Interactive Red-Teaming Platform for AI Agents
Questions for authors
Please refer to Weaknesses.
6 comments
Response to Reviewer WZMm (2/4): W1 continued, amplification and defenses
W1, continued. Amplifying attacks and bypassing more defenses.
Amplifying attacks. For some cases, the attack succeeds when the agent resumes from a compacted summary and fails in a separate run with the full history.
-
A real-world harness. In Codex CLI on DTap's legal tasks, the agent filed the injected line in 39% of full-history runs and 52% of runs when configured to compact during the task. The increase was concentrated in tasks where the agent usually resisted the line with full history. The held-out comparison is under W3 (App. I.3.3).
-
An agent that resists the injection. In 110 runs over 55 AgentDojo histories, the attack never succeeds when Claude Sonnet 5 continues from the full history, which contains the injected tool result. However, when it continues from GPT-5.6 Luna's summary of that history, the attack succeeds in 16% of runs (new; App. I.4). GPT-5.6 Sol shows the same in the submission (7% and 33%; Appendix E.8). Existing harnesses do allow a smaller model to write the summary, as in Aider and LangChain's summarization middleware (Aider, 2026; LangChain, 2026).
Bypassing defenses. Compaction changes which defenses work.
- A defense that relies on the agent seeing the source is lost after compaction. In our delegation test (Appendix F.3), the user tells the agent to use a source only as background, not as instructions, and the source also asks for every output to be copied to an external address. With the full history, GPT-5.6 Luna never makes the copy (0 of 36 runs), because it can see that the request came from the source the user restricted. After Luna compacts the history with Codex's prompt, it makes the copy in 24 of 36 runs, even though the user's restriction is kept word for word in the summary because the summary records the copy as part of the task, so the restriction no longer applies to it.
References
-
Aider (2026). Options reference: --weak-model. aider.chat/docs/config/options.html.
-
Chen et al. (2026). DecodingTrust-Agent Platform (DTap): A Controllable and Interactive Red-Teaming Platform for AI Agents. arXiv:2605.04808.
-
LangChain (2026). Built-in middleware: Summarization. docs.langchain.com.
Response to Reviewer WZMm (3/4): W2, takeaway and supporting experiments
W2. Is the takeaway that compaction transforms external malicious content into tasks, and which experiments support it?
Yes, that is the takeaway. Compaction can turn an instruction in external content into a requirement the agent recognizes as part of its task, and the agent is then more likely to act on it. The submission tested the first two steps below (Sections 4.1 and 4.3). The revision states it in the introduction and adds the last two experiments.
-
Compaction turns injected instructions into tasks. Summaries from all ten models present the injected instruction as a goal, constraint, decision, or next step in 18–45% of cases (Section 4.1).
-
Presenting an instruction as a task causes the agent to act on it. We append the same sentence to one summary either as remaining work or as untrusted evidence from a tool. GPT-5.6 Luna follows it in 31% of runs in the first case and never in the second (Section 4.3). Three more models now show the same pattern, following it in 31–50% of runs against 0–6% (new; Appendix E.5).
-
This makes the agent more vulnerable than the original injection. On 78 AgentDojo cases where compaction had presented the instruction as part of the task, five models followed the same instruction in 75% of runs when it sat in a summary and in 29% when it sat in the original tool output. Both were delivered as tool messages, so the difference does not come from the message role (new; App. I.2).
-
The same holds in a real-world harness. In Codex CLI on DTap legal tasks (W3), the agent prepares a court filing from a client's case file, and one document contains an injected line asking it to include a statement against the client. We rewrote only what Codex's own summary said about that line, choosing the version at random within each task. The agent put the line in its filing in 26 of 32 runs when the summary presented it as a filing requirement, and in 7 of 32 when the summary added that neither the user nor the supervising attorney had supplied or confirmed it (App. I.3.3).
Response to Reviewer WZMm (1/4): W1, additional threat
Thank you for your review, and for suggesting DTap (Chen et al., 2026), whose tasks and attack goals we ran in two real-world harnesses, Codex CLI and the pi coding agent (W3). We answer in four comments:
W1here and in the second,W2in the third, andW3in the fourth.W1.Is the compaction attack a subset of indirect prompt injection, with no additional threat (109 versus 115)?Compaction gives the same injection a second route to the agent, and attacks succeed through it that fail when the agent reads the injection directly. When the agent sees the tool result directly, it encounters the instruction as something an external source said. The compactor only has to record it as part of the task for the continuing agent to encounter it as assigned work. In a live session where the agent gets a turn with the original result before compaction, an instruction it initially ignores can influence a later action through the summary. Our AgentDojo comparison tests the two routes from the same checkpoint immediately after the injected read.
Why the AgentDojo totals are similar (109 versus 115). The totals match because compaction removes some attacks and adds others. We resumed each case from the same checkpoint right after the injected read, once with the full history and once from a summary. In 43 cases the attack succeeded only with the full history, and in 37 it succeeded only after compaction. In 36 of those 37, the summary presented the instruction as part of the task (Appendix E.7). To check that these differences were not chance, we resumed all 80 cases five more times per condition (new; App. I.4):
This comparison treats the two routes as alternatives, but a live agent goes through both. It reads the tool result first and resumes from a summary only later, when compaction triggers. The 37 are instructions the agent mostly ignores in the tool result and then follows once the summary presents them as its task. An injection the agent has already resisted can still succeed after compaction, so this risk adds to direct injection rather than replacing it. Section 4.4 now reports this breakdown alongside the totals.
References