# Measures Against Context Degradation and Prompt Injection Attacks in LLM Agents (November 2026)

- Author: Shuichiro Ogawa (Design Researcher / Design Consultant), https://jamjet-iqbal.com/
- Published: 2026-11-23; updated: 2026-11-23
- Canonical (HTML): https://jamjet-iqbal.com/en/notes/llm-context-protection-2026-11/
- Japanese version: https://jamjet-iqbal.com/notes/llm-context-protection-2026-11/ (Markdown: https://jamjet-iqbal.com/notes/llm-context-protection-2026-11.md)
- Language: en
- Keywords: llm, agents, context-engineering, context-rot, long-context, compaction, memory, subagents, prompt-injection, indirect-prompt-injection, tool-poisoning, memory-poisoning, mcp, security, defense-in-depth, ai-frontier, industry, academic

> This note sorts what goes wrong in the context that an LLM agent reads at one time into three kinds of problem: degradation that occurs even without an attacker, loss that occurs when the history is summarized or compressed, and contamination and injection by an attacker. In the degradation studies, performance fell by 13.9% to 85% with longer input even when all needed information was retrieved, and splitting instructions across several turns lowered performance by 39% on average over six generation tasks. In a study that applied the Claude Code summarization prompt to 20 production configurations, only 53% of safety rules survived one compaction and 10% survived five. Model training and detectors have been studied as defenses against injection, but adaptive attacks broke most of 12 recent defenses with success rates above 90%. Many vendors and public bodies therefore recommend layering deterministic limits on permissions and information flow instead of relying on the model layer alone.

This note organizes the ways of protecting the context of an LLM agent.
Here, the context means all the information that enters the window the model reads at one time.
It includes the following.

- Instructions from the system and the user
- The conversation history
- Results returned by external tools
- Documents brought in for reference
- Memory carried over from earlier work

The sources were checked on 23 November 2026.
The material consists of first-party information from vendors and developers, documents from public bodies, and academic research.

The problems that occur in the context are treated here as three kinds.

- Degradation that occurs even without an attacker
- Loss that occurs when the history is summarized or compressed
- Contamination and injection by an attacker

Degradation refers to a fall in model performance that depends on input length, on where information is placed, on irrelevant content, and on the number of conversation turns.
Loss refers to the disappearance of the original instructions, safety rules, or details of the work when the history is summarized to fit the window.
Contamination and injection refer to an attacker planting malicious instructions in documents, tool descriptions, or memory that enter from outside.
Prompt injection, indirect prompt injection, tool poisoning, and memory poisoning belong to this third kind.

Two existing notes cover neighboring ground.
Retrieval-augmented generation (RAG), which retrieves related documents to support an answer, is treated in [Has RAG Fallen Out of Use? What Replaced It, and What Remains](https://jamjet-iqbal.com/en/notes/rag-grounding-2026-ai-frontier/).
The lineage of methods for storing and managing knowledge is summarized in [Knowledge Management Methods for the LLM Era (Mid-2026 Status Report)](https://jamjet-iqbal.com/en/notes/llm-knowledge-management-2026/).
This note limits itself to the protective side.

One overlap of terms needs care.
On his personal blog, Breunig named four ways in which a context fails: poisoning, distraction, confusion, and clash (Breunig 2025).
In his usage, context poisoning means that the model's own hallucination enters the context, not an attack from outside (Breunig 2025).
It should therefore be read separately from contamination by an attacker, which is the sense used in this note.

## Overview of the measures

The table sorts the measures taken by vendors, developers, and researchers into eight.
For each measure, it gives the problem it addresses, the main sources, and the known limits.

| Measure | Protects against | Main sources | Limits |
| --- | --- | --- | --- |
| Put less in and read on demand | Degradation | Anthropic, Cursor, Cline | Slower; a poor search tool wastes the window |
| Clear or mask old tool results | Degradation | Anthropic; Lindenbauer et al. | Invalidates the cache |
| Summarize and continue | Degradation | Anthropic; OpenAI | Instructions, safety rules, and the work trail are lost (Zerhoudi et al.; Chen; Factory) |
| Write to files or memory outside the window | Degradation and loss | Manus; Anthropic | Memory becomes a route for contamination (Dong et al.; Microsoft) |
| Split into subagents or fresh windows | Degradation and injection | Anthropic, Cognition, Meta | More tokens; separate writers produce inconsistencies |
| Model training and detectors | Injection | Wallace et al.; Chen et al.; Anthropic | Broken by adaptive attacks (Nasr et al.; Zhan et al.) |
| Narrow permissions and information flow | Injection | Willison; Meta; Debenedetti et al.; NVIDIA | Narrows the work that can be done; data can leak through allowed destinations |
| Human confirmation and monitoring | Injection | MCP specification; Supabase | Approval fatigue; classifiers still miss cases |

The upper five rows mainly address degradation and loss, and the lower three address injection.
Splitting the window, however, serves both.
Writing to memory eases degradation but also opens a new route for contamination.

## How far degradation has been measured

Within what has been measured, performance often falls at lengths well below the advertised window size.
Academic studies have measured degradation along separate axes: position, length, and the number of conversation turns.

The first axis is position.
Liu et al. reported a U-shaped curve in which performance was high when the relevant information was at the beginning or the end of the context and fell sharply when it was in the middle (Liu et al. 2024).
The same pattern held for models built explicitly for long contexts (Liu et al. 2024).

The second axis is length added by irrelevant text.
Levy et al. presented at ACL an experiment that varied length by padding the same task with irrelevant text (Levy et al. 2024).
Reasoning performance had already fallen at around 3,000 tokens (Levy et al. 2024).
A token is the unit of text, a fragment of a character string or word, that the model processes.
Reasoning performance had thus fallen at lengths far below the advertised technical maximum (Levy et al. 2024).

An evaluation that asks the model to find a specific piece of information inside a long document is called a needle-in-a-haystack (NIAH) test.
Hsieh et al. built the RULER benchmark, measured 17 long-context models, and presented the work at COLM (Hsieh et al. 2024).
Although the models scored nearly perfectly on the vanilla NIAH test, almost all of them dropped sharply on the more complex RULER tasks as the length grew (Hsieh et al. 2024).
Of the models that claimed 32K tokens or more, only half kept satisfactory performance at 32K (Hsieh et al. 2024).

Scores also fall on tasks in which surface word matching does not help.
Modarressi et al. built NoLiMa, a needle-in-a-haystack test whose answers cannot be found by literal matching, and presented it at ICML (Modarressi et al. 2025).
At 32K tokens, 11 of 13 models fell below half of their performance at short lengths (Modarressi et al. 2025).

The same tendency appeared when reasoning tasks were embedded in long text.
Kuratov et al. presented BABILong in the NeurIPS Datasets and Benchmarks Track (Kuratov et al. 2024).
They reported that popular LLMs effectively use only about 10% to 20% of the context and that performance declines sharply as reasoning becomes harder (Kuratov et al. 2024).

Degradation is not only a failure to find the needed information.
Du et al. reported in Findings of EMNLP that, even when all relevant information was retrieved correctly, performance fell by 13.9% to 85% merely because the input was longer (Du et al. 2025).
The fall occurred even when the irrelevant parts were replaced with whitespace and even when they were masked so that the model could not attend to them (Du et al. 2025).
As a mitigation, the authors prompted the model to recite the retrieved evidence before answering, which turns a long-context task into a short-context one (Du et al. 2025).

Degradation also occurs when instructions are given over several turns.
Laban et al. presented at ICLR experiments in which instructions were split across several turns (Laban et al. 2026).
Every top model tested performed worse than when the instructions were given in one turn, with an average drop of 39% across six generation tasks (Laban et al. 2026).
In an analysis of more than 200,000 simulated conversations, the drop decomposed into a small loss in aptitude and a large increase in unreliability (Laban et al. 2026).
The authors observed that assumptions were made in early turns and that premature final answers were relied on (Laban et al. 2026).

Drifting away from the initial instructions over a dialogue is called instruction drift.
Li et al. presented at COLM experiments in which two chatbots conversed with each other (Li et al. 2024).
For both LLaMA2-chat-70B and GPT-3.5, adherence to the system prompt drifted within eight rounds (Li et al. 2024).
The system prompt is the top-level instruction that sets the model's basic role and constraints.
The authors attributed part of the drift to attention decay (Li et al. 2024).

There is also a test that includes recent commercial models.
Hong, Troynikov, and Huber of Chroma, a company that sells a retrieval product, measured 18 models including GPT-4.1, Claude 4, Gemini 2.5, and Qwen3 (Hong et al. 2025).
Even on simple tasks, performance fell as the input grew, and the fall was not uniform (Hong et al. 2025).
For all models, a haystack of shuffled sentences gave better scores than a coherent text (Hong et al. 2025).
Chroma sells a retrieval product, however, and the authors themselves state that the tasks are simpler than real use (Hong et al. 2025).

Among the documents of public bodies checked here, one touched on this problem.
In the initial public draft of SP 2400-102 E2026, released in November 2026, NIST wrote that long-running agents may be susceptible to instruction drift (NIST 2026).
The explanation is that, as the context fills with operational data, early instructions and constraints may become less salient (NIST 2026).
Among the public documents checked for this note, this section of the draft was the only one that mentioned context degradation.

Vendors also publish their own long-context figures.
In the Gemini API guide, Google explains that a single query can reach about 99% when looking for a single needle, but that performance drops and varies with the context when there are several needles (Google n.d.).
The long-context figures published by vendors are measured differently from one company to another, are all self-reported, and lack third-party verification.
They are not compared across companies here.

## Putting less into the context

Vendors and developers limit what goes in at the start and design agents to fetch what they need when they need it.

In its guide to context management, Anthropic calls context rot the phenomenon in which the ability to recall information accurately from the context falls as tokens increase (Anthropic 2025-09-29).
Instead of loading the full content of documents at the start, the company recommends keeping lightweight references such as file paths in the window and reading the content with tools when needed (Anthropic 2025-09-29).
The cost is that processing becomes slower because a tool is called each time something is needed (Anthropic 2025-09-29).

The same idea is used in Agent Skills, which package procedures and knowledge.
Anthropic adopted progressive disclosure, in which only the name and description of each skill are placed in the system prompt at startup and the body is read only when it becomes relevant (Anthropic 2025-10-16).

Cursor, a company that makes a development tool, also reduces what is packed in beforehand (Cursor 2026-01-06).
Its policy is to let the agent fetch the information it needs instead of assembling the context in advance (Cursor 2026-01-06).
Long tool outputs are written to files instead of being placed directly in the window (Cursor 2026-01-06).
The agent checks the end with the `tail` command and later reads only the parts it needs (Cursor 2026-01-06).
After the conversation is summarized, the history file remains available for reference (Cursor 2026-01-06).

Cline, another development tool, chose not to index the codebase with vector embeddings for search (Cline 2025-05-27).
An embedding converts text or code into a sequence of numbers so that items can be searched by closeness of meaning.
Cline gives three reasons for not using embeddings (Cline 2025-05-27).

- Cutting files into small chunks tears apart the logic of the code
- An index becomes stale over time
- Building embeddings creates one more copy of confidential code

Some of this advice on restricting the context has also been revised.
In the Claude Code best practices available on 23 November 2026, Anthropic wrote that the old advice to manage the context window aggressively because it is the main constraint can be dropped (Anthropic n.d.-e).
The reason given is that most current models have a 1M-token window and automatic compaction (Anthropic n.d.-e).
The company adds that clearing the history with `/clear` between topics is still worth doing (Anthropic n.d.-e).
Its judgement is that a focused context gives better answers (Anthropic n.d.-e).

## Clearing old tool results

As work proceeds, the raw results of earlier tool calls accumulate in the window.
Before rewriting the conversation itself, a common step is to clear or mask only the old tool results.

In its guide, Anthropic describes tool result clearing, which removes the raw result of a tool once called, as the safest and lightest form of compaction (Anthropic 2025-09-29).
The reason given is that, once a tool has been called deep in the history, the agent has little need to see the raw result again (Anthropic 2025-09-29).

In practice, however, computational cost is involved.
The context editing documentation of the Claude API warns that clearing old tool results invalidates the cached prompt prefix (Anthropic n.d.-a).
LLM inference reduces cost and latency by caching and reusing the computation for the part of the input that matches from the beginning.
Because clearing part of the history forces the cache after that point to be rebuilt, enough content should be cleared at once to make rebuilding the cache worthwhile (Anthropic n.d.-a).

There is also an experiment in which a simple masking method matched summarization.
Lindenbauer et al. tried observation masking, which hides old observations, in SWE-agent on software repair tasks and presented the work at a NeurIPS 2025 workshop (Lindenbauer et al. 2025).
Compared with summarization by an LLM, masking alone matched, and sometimes slightly exceeded, the solve rate (Lindenbauer et al. 2025).
It also halved the cost relative to doing nothing (Lindenbauer et al. 2025).

LangChain, a development framework, implements threshold-based offloading and truncation in Deep Agents (LangChain 2026-01-28).
When a tool response exceeds 20,000 tokens, it is offloaded to a file, and only the path and the first 10 lines remain in the window (LangChain 2026-01-28).
When the context exceeds 85% of the window, older tool calls are truncated (LangChain 2026-01-28).

## What is lost when the history is summarized

Even with old results cleared, long work eventually approaches the window limit.
Many products therefore include compaction, which summarizes the past conversation and carries it into a new window.
Developer reports and academic studies both show, however, that summarization can drop the original instructions, safety rules, and details of the work.

The vendor implementations come first.
Anthropic summarizes the conversation near the limit and continues in a new window; in addition to the summary, Claude Code rereads the five most recently accessed files (Anthropic 2025-09-29).
According to the Claude Code documentation on the context window, the project-root CLAUDE.md, auto memory, and skill descriptions are re-injected from disk after compaction (Anthropic n.d.-d).
In the Claude API, the default threshold for automatic compaction is 150,000 input tokens, and the lowest value that can be set is 50,000 (Anthropic n.d.-b).
The OpenAI Responses API also compacts when the threshold is crossed, and the resulting compaction item is encrypted and passed to the next call in a form that people cannot read (OpenAI n.d.).

For long-running agents, compaction alone is sometimes not enough.
In its guide to long-running agents, Anthropic reported cases in which compaction was insufficient (Anthropic 2025-11-26).
When Opus 4.5 was asked to build an app, it tried to build everything at once and ran out of window in the middle (Anthropic 2025-11-26).
In another run, the job was declared complete partway through (Anthropic 2025-11-26).
The company then had a first agent write a feature list and a progress file and changed the procedure so that each later session advanced one feature (Anthropic 2025-11-26).

Another failure arises from attention to the remaining window.
Cognition, which makes the development tool Devin, reported that Sonnet 4.5, when it judged the end of the window to be near, summarized early and closed out tasks with shortcuts even when room remained (Cognition 2025-09-29).
Cognition named this context anxiety (Cognition 2025-09-29).
With the 1M-token beta enabled and usage capped at 200k, the behavior became normal (Cognition 2025-09-29).
In the notes the model wrote for itself, the task was sometimes paraphrased and important details were left out (Cognition 2025-09-29).
Cognition kept its own compaction system (Cognition 2025-09-29).

One developer removed compaction from its product.
Amp removed compaction and replaced it with Handoff (Amp 2025-10-23).
Its reasons are that compaction is lossy and that it encourages long, meandering threads in which summaries are stacked on summaries (Amp 2025-10-23).
In Handoff, a person writes the goal of the new thread. Amp then analyzes the current thread and generates a starting prompt for the new thread, along with a list of relevant files, and the person can review and edit this draft before sending it (Amp 2025-10-23).

One report measured how much of the work trail survives compaction.
Factory asked, after compaction, which files had been changed, and compared three methods: Factory's, Anthropic's, and OpenAI's (Factory 2025-12-16).
On a scale of 0 to 5, all three stayed between 2.19 and 2.45 (Factory 2025-12-16).
Factory's claim that its own method ranked first overall is a self-evaluation within its own evaluation framework (Factory 2025-12-16).

An academic study confirmed that repeated rewriting can shrink the context abruptly.
Zhang et al. presented ACE at ICLR and reported context collapse, in which iterative rewriting shortens the context and erodes details (Zhang et al. 2026).
In one experiment, a context of 18,282 tokens with an accuracy of 66.7 at step 60 shrank to 122 tokens at the next step (Zhang et al. 2026).
Accuracy fell to 57.1, below the 63.7 obtained without adaptation (Zhang et al. 2026).

Safety rules and operating policies are also lost in compaction.
Zerhoudi et al. presented at CIKM the results of applying the Claude Code `/compact` prompt with Sonnet 4.6 to 20 production agent configurations (Zerhoudi et al. 2026).
Only 53% of the safety rules remained after one compaction and 10% after five (Zerhoudi et al. 2026).

In a preprint, Chen measured the loss of policies over 1,323 episodes of a purpose-built benchmark (Chen 2026).
The violation rate was 0% when the policy was fully in the context and rose to 30% after compaction, reaching up to 59% for some models (Chen 2026).
When the policy survived in the summary, violations stayed at 0%; when it was dropped, they rose to 38% (Chen 2026).
The author reports that Constraint Pinning, which keeps a policy of about 47 tokens outside the summary, restored violations to 0% (Chen 2026).
This is a preprint, and the result holds within the author's own benchmark (Chen 2026).

On the other hand, a rule can be ignored even while it remains in the summary.
Zha et al. measured rule compliance from actions taken during execution inside pi, an open-source agent harness (Zha et al. 2026).
The cases in this preprint (ARCBench) are 17 English scenarios covering email, file access, software operations, and purchasing (Zha et al. 2026).
Compaction rarely deleted the rule (Zha et al. 2026).
Most violations after compaction occurred while the rule was still in the compacted history (Zha et al. 2026).
They arose because a later request was treated as permission and the rule was ignored (Zha et al. 2026).
How the rule was delivered decided whether it would be broken even without compaction (Zha et al. 2026).
The compaction strategy and budget decided whether the rule survived (Zha et al. 2026).
Even compacted runs that retained the rule violated it more than twice as often as runs with the full history (Zha et al. 2026).
The strongest attack targeted at the compactor corrupted the rule in the summary and more than doubled the violations (Zha et al. 2026).
The authors note that the cases cover a few domains only and may not carry over to clinical, financial, or legal work (Zha et al. 2026).
Read together, Zerhoudi et al. and Chen measured rules dropping out of summaries, whereas Zha et al. also showed that rules can go unobeyed when they remain (Zerhoudi et al. 2026; Chen 2026; Zha et al. 2026).

## Writing outside the window

A common design is to keep information outside the window, in the file system or in external memory.
The aim is to ease both degradation and loss by moving information that should survive compaction out of the window.

The Claude API provides a memory tool (Anthropic n.d.-c).
Memory is written to files on the client side, and for security Anthropic asks that all memory operations be restricted to the `/memories` directory (Anthropic n.d.-c).
The intended use is to place information that should survive compaction in this memory instead of relying on the conversation history (Anthropic n.d.-c).

Ji of Manus described a design that uses the file system as the ultimate context (Ji 2025).
The file system is unlimited in size, persistent, and directly operable by the agent (Ji 2025).
As long as a URL or file path remains, the content itself can be dropped from the context (Ji 2025).

Manus also keeps the goal from being buried in the context.
By repeatedly rewriting a `todo.md` file, it places the current goal at the end of the context and avoids losing it in the middle (Ji 2025).
Failed actions and error outputs are deliberately left in place (Ji 2025).
The reason given is that seeing a failure reduces the chance of repeating the same mistake (Ji 2025).

Manus also gave cache efficiency the highest priority in the design (Ji 2025).
The average ratio of input to output tokens is about 100 to 1, and the KV-cache hit rate, which reflects how much computation is reused across calls, is treated as the most important metric (Ji 2025).
Three rules keep the cache intact (Ji 2025).

- Keep the prompt prefix stable
- Make the context append-only and do not rewrite the past
- Do not add or remove tool definitions midway; constrain the choice of outputs instead

Ji writes that the team rebuilt its framework four times before arriving at this design (Ji 2025).

## Whether to split work into subagents

One way to keep a single window from filling with noise is to split the work among subagents.
Developers appear to differ, however, on whether subagents should be used actively.

In its June 2025 description of its research feature, Anthropic explained how it uses subagents (Anthropic 2025-06-13).
Several subagents search in parallel in separate windows and return only the key points to the lead agent (Anthropic 2025-06-13).
Because the lead agent's window is truncated beyond 200,000 tokens, the plan itself is saved to external memory (Anthropic 2025-06-13).
The cost is that the approach uses about 15 times as many tokens as an ordinary chat (Anthropic 2025-06-13).
The company also states that the approach does not suit tasks such as coding that need a shared context (Anthropic 2025-06-13).

The same company's context guide describes subagents that spend tens of thousands of tokens or more on exploration and return only a summary of about 1,000 to 2,000 tokens to the parent (Anthropic 2025-09-29).
In the Claude Agent SDK, the only content passed from parent to child is the prompt string of the Agent tool; the parent's conversation history is not passed (Anthropic n.d.-f).
In the Claude Code best practices, the guideline to protect the context with subagents also appears in the table of old advice (Anthropic n.d.-e).
The company now lists three situations in which subagents help (Anthropic n.d.-e).

- Work that can proceed in parallel
- Keeping large, noisy output out of the main window
- Review from an independent viewpoint

By contrast, in a June 2025 article Cognition argued against building multi-agent systems (Cognition 2025-06-12).
It set out two principles: share context, and recognize that every action carries implicit decisions (Cognition 2025-06-12).
In an example in which a Flappy Bird game was built, two child agents produced parts in inconsistent styles, and the combining agent had to fix the mismatch (Cognition 2025-06-12).

In an April 2026 follow-up, Cognition stated that its objection to swarms of agents writing in parallel still holds (Cognition 2026-04-22).
The arrangement that worked was one in which writes stay with one agent and the other agents only contribute intelligence (Cognition 2026-04-22).
The company runs the review agent in a fresh context that sees only the diff to avoid the context rot that builds up over long work (Cognition 2026-04-22).

The two companies appear to disagree, but they address different shapes of work.
For work that searches in parallel and brings back only the key points, and for independent review, splitting the window is recommended.
For work that writes one artifact step by step, keeping a single writer is recommended.
Both positions rest on each company's experience with its own products, not on experiments that compare the two under the same conditions.

## Types of injection and contamination

The note now turns to threats in which an attacker deliberately enters the context.
Because agents read external documents, tool descriptions, and memory, there are many entry points for attacks.

Greshake et al. demonstrated the threat of indirect prompt injection (Greshake et al. 2023).
In their AISec paper, they pointed out that in applications that integrate LLMs the line between data and instructions becomes blurred (Greshake et al. 2023).
By planting instructions in external data likely to be retrieved, an attacker can exploit the application remotely without a direct interface to it (Greshake et al. 2023).
The attack was shown to work on systems such as Bing Chat (Greshake et al. 2023).

Attacks that target tool descriptions have also been reported for MCP (Model Context Protocol), the standard through which agents call external tools.
Invariant Labs, which sells MCP security products, used the term tool poisoning for an attack that embeds in a tool description instructions that are invisible to users but visible to the model (Invariant Labs 2025-04-01).
It also reported the rug pull, in which a server changes the tool description after the user has approved the tool (Invariant Labs 2025-04-01).

The following month, Invariant Labs published a demonstration with the official GitHub MCP server (Invariant Labs 2025-05-26).
A malicious issue placed in a public repository led an agent that read the repository to expose data from private repositories (Invariant Labs 2025-05-26).
The company argued that this is not a flaw in the server code but an architectural problem at the level of the agent system, and that GitHub cannot resolve it with server-side patches alone (Invariant Labs 2025-05-26).

Attacks that contaminate the knowledge base used for retrieval have also been measured.
Zou et al. presented PoisonedRAG at USENIX Security (Zou, W. et al. 2025).
Injecting five malicious texts per target question into a knowledge base of millions of documents was enough to reach an attack success rate of 90% (Zou, W. et al. 2025).

Memory poisoning, which rewrites an agent's memory, is another route.
Dong et al. presented at NeurIPS MINJA, which slips malicious records into an agent's memory through queries alone (Dong et al. 2025).
In the experiments, injection of the records succeeded on average 98.2% of the time, and using those records to elicit malicious reasoning succeeded 76.8% of the time (Dong et al. 2025).

The success of memory poisoning depends on its conditions, however.
Sunil et al. re-evaluated MINJA in a preprint using a medical-record agent (Sunil et al. 2026).
They report that MINJA's injection success rate above 95% was obtained under idealized conditions and that the attack became much less effective under realistic conditions with pre-existing legitimate memories (Sunil et al. 2026).

Microsoft has found attempts to write into memory on real websites (Microsoft 2026-02-10).
It observed prompts embedded in "Summarize with AI" buttons and shared links on web pages that tell an assistant to remember a particular company as a trusted source (Microsoft 2026-02-10).
Its investigation identified more than 50 such prompts from 31 companies across 14 industries (Microsoft 2026-02-10).

Attacks through tools of real MCP servers and through skill files have also been measured.
Wang et al. presented at AAAI MCPTox, a benchmark of tool poisoning on real MCP servers (Wang et al. 2026).
The attack success rate against o1-mini reached 72.8% (Wang et al. 2026).
Even Claude-3.7-Sonnet, which refused most often among the models tested, refused less than 3% of the time (Wang et al. 2026).

Skill files, which teach an agent procedures, are another route.
Schmotz et al. presented Skill-Inject, a benchmark of injection through skill files, in the NeurIPS 2026 Evaluations and Datasets Track (Schmotz et al. 2026).
Attack success rates reached up to 80% even with frontier models (Schmotz et al. 2026).

AgentDojo is one environment for measuring attacks on agents.
Debenedetti et al. presented AgentDojo, with 97 realistic tasks and 629 security test cases, in the NeurIPS Datasets and Benchmarks Track (Debenedetti et al. 2024).
In the paper's initial evaluation, fewer than 66% of the tasks were solved even without attacks (Debenedetti et al. 2024).
Attacks succeeded against the best-performing agents in fewer than 25% of cases, and adding an existing detector lowered this to 8% (Debenedetti et al. 2024).
All of these figures were obtained with the initial attacks written by the authors (Debenedetti et al. 2024).

## Public competitions and incidents

Besides laboratory benchmarks, evidence is accumulating from large competitions in which many participants try attacks and from incidents in real products.
This section separates product vulnerabilities (CVEs and fixes), product design decisions, small-sample demonstrations by individual researchers, and aggregations of real-world incidents.

Large public competitions come first.
Zou et al. presented at NeurIPS a competition that targeted 22 frontier agents in 44 scenarios (Zou, A. et al. 2025).
Participants submitted 1.8 million injection attacks, of which more than 60,000 led to policy violations (Zou, A. et al. 2025).
Nearly all agents violated the policy for most behaviors within 10 to 100 queries (Zou, A. et al. 2025).
Robustness was only weakly related to model size, capability, or inference-time compute (Zou, A. et al. 2025).

The results of another public competition were reported in a preprint.
In the report by Dziemian et al., 464 participants submitted 272,000 attacks against 13 frontier models, and 8,648 succeeded (Dziemian et al. 2026).
All models were broken, with attack success rates ranging from 0.5% for Claude Opus 4.5 to 8.5% for Gemini 2.5 Pro (Dziemian et al. 2026).

An international report also points to the weakness that appears when several attempts are allowed.
The International AI Safety Report compiled values self-reported by developers for major models released between April 2024 and July 2025 (International AI Safety Report 2025).
The success rate of injection has fallen slightly over time, but with ten attempts attackers still succeed about half the time (International AI Safety Report 2025).
The two competitions above differ in what counts as an attempt and in how success is judged, so their success rates should not be compared side by side.

Product incidents are sorted next by kind.

The first kind is a product vulnerability that received a CVE number and was fixed.
On 12 August 2025, the security researcher Rehberger reported a vulnerability in GitHub Copilot (Rehberger 2025).
An injection planted in a source file made GitHub Copilot write `"chat.tools.autoApprove": true` into `.vscode/settings.json`, which allowed shell commands to run without user confirmation (Rehberger 2025).
The issue received CVE-2025-53773 and was fixed in the August Patch Tuesday release of the same month (Rehberger 2025).

The second kind is a product design decision in which the limits of a boundary were stated explicitly.
A report published by the security company HiddenLayer on 26 November 2025 quotes a statement from Cursor (HiddenLayer 2025-11-26).
Cursor explained that its allowlist for automatic execution is best-effort and not a security boundary, and it recommended using the sandbox, which isolates the execution environment, on macOS (HiddenLayer 2025-11-26).

The third kind is a small-sample demonstration by a researcher.
On 26 August 2026, Rehberger published a demonstration in which simply asking Claude Code in Auto Mode (Opus 5) to summarize a website led to execution of the attacker's code (Rehberger 2026).
Each attack chain was tried five times and succeeded three or four times, or 60% to 80%, and he states that the sample is small (Rehberger 2026).
Anthropic closed the report as Informative (Rehberger 2026).
The company's position is that Auto Mode is a convenience feature backed by a best-effort classifier, not a security boundary (Rehberger 2026).

The fourth kind is an aggregation of real-world incidents.
In its roundup of 6 November 2026, the AI Incident Database grouped 37 of the 179 incidents added from August to October 2026 under the single heading "AI agents, cybersecurity, and unauthorized actions" (AI Incident Database 2026).
The database itself cautions that such concentrations reflect the available reporting and the material researched, and that they should not be read as measures of how often a harm occurred (AI Incident Database 2026).

## Model-layer defenses and adaptive attacks

Defenses against prompt injection fall broadly into three layers.
The first is the model layer, which distinguishes or refuses attacks through model training, marking of inputs, or classifiers.
This layer behaves probabilistically.
It can score well against fixed attacks and still be broken by adaptive attacks that are rebuilt to fit the defense.

Representative model-layer methods include training to prioritize instructions and structuring the input.
Wallace et al. of OpenAI proposed in a preprint the instruction hierarchy, which trains the model to prioritize instructions in the order system, user, and tool output (Wallace et al. 2024).
They report that robustness rose substantially even against attack types not seen in training, with minimal degradation of standard capabilities (Wallace et al. 2024).

Methods that pass the prompt and the data separately have also been studied.
Chen, Piet, Sitawarin, and Wagner presented StruQ at USENIX Security; it fine-tunes the model to follow only the prompt part (Chen, Piet et al. 2025).
The success rate of every manual attack tested was held below 2% (Chen, Piet et al. 2025).
Chen et al. presented SecAlign, which uses preference optimization, at ACM CCS (Chen, Zharmagambetov et al. 2025).
Attacks without optimization were brought to 0% success, and stronger optimization-based attacks were held mainly below 10% (Chen, Zharmagambetov et al. 2025).

Some methods make the distinction through how the input is written, without retraining.
Hines et al. of Microsoft presented in a preprint Spotlighting, which marks untrusted input so that the model treats it as data (Hines et al. 2024).
With GPT-family models, the success rate on the authors' set of attacks fell from above 50% to below 2%, with little effect on task performance (Hines et al. 2024).

Detectors that look for signs of attack in the model's internal state have also been proposed.
Abdelnabi et al. presented TaskTracker at SaTML; it detects task drift from the difference in internal activations before and after the model processes external data (Abdelnabi et al. 2025).
With a simple linear classifier, it reached a nearly perfect ROC AUC, a measure of discrimination, on an out-of-distribution test set (Abdelnabi et al. 2025).

Commercial vendors also evaluate model-layer defenses in their own products.
For its browser agent, Anthropic trained resistance through reinforcement learning and added classifiers that scan all untrusted content entering the context (Anthropic 2025-11-24).
The evaluation used an internal adaptive attacker with 100 attempts per environment (Anthropic 2025-11-24).
The company writes that even a 1% attack success rate still represents meaningful risk and that no browser agent is immune to prompt injection (Anthropic 2025-11-24).

Anthropic also published the performance of the classifier built into Claude Code's auto mode (Anthropic 2026-03-25).
Across the full pipeline that decides whether to block an action, 17% of 52 real overeager actions were missed (Anthropic 2026-03-25).
The false-positive rate on 10,000 real requests was 0.4% (Anthropic 2026-03-25).
The authors write that the 17% false-negative rate is the honest number (Anthropic 2026-03-25).

The model-layer figures above have an upper bound.
Under adaptive attacks rebuilt with knowledge of how a defense works, many defenses failed.
Nasr, Carlini, and colleagues published a preprint that tested 12 recent defenses with gradient descent, reinforcement learning, random search, and human-guided exploration (Nasr et al. 2025).
They bypassed most of the 12 defenses with success rates above 90% (Nasr et al. 2025).
Most of those defenses had originally reported attack success rates near zero (Nasr et al. 2025).

A study focused on indirect prompt injection reached the same result.
Zhan et al. applied adaptive attacks to eight defenses against indirect injection and presented the work in Findings of NAACL (Zhan et al. 2025).
All eight defenses were bypassed, with attack success rates consistently above 50% (Zhan et al. 2025).

Shi et al. of Google DeepMind also reported in a preprint that many defenses that perform well in static evaluation can be tricked by small adaptations of an attack (Shi et al. 2025).
They also found that more capable models are not necessarily more secure and that models with better instruction following were in some cases easier to attack (Shi et al. 2025).

Detectors that read internal activations are no exception.
Rahman and Alouani presented at IJCNN an attack that evades activation-drift detectors by appending a single optimized suffix (Rahman & Alouani 2026).
The evasion success rate was 93.91% on Phi-3 3.8B and 99.63% on Llama-3 8B (Rahman & Alouani 2026).

Detector performance also falls when the evaluation changes.
According to Liu's preprint, the ranking of detectors does not hold across benchmarks (Liu, Z. 2026).
At a 1% false-positive rate, the detector that performed best on BIPIA caught only 2% of the AgentDojo injections (Liu, Z. 2026).
Conversely, a detector that caught 72% on AgentDojo caught only 15% on τ-bench (Liu, Z. 2026).

In the draft of SP 2400-102 E2026, NIST wrote that model-layer defenses do not establish a strict boundary between benign and malicious content (NIST 2026).
As support, it cites the study in which adaptive attacks bypassed 12 defenses (NIST 2026).

## Narrowing permissions and information flow

Since model-layer defenses do not reach 100%, a deterministic layer that narrows what the system can do becomes central.
Vendors and researchers also recommend designs that cut the routes for exfiltration and restrict permissions.

The developer Willison organized this idea under the name lethal trifecta (Willison 2025).
Data can be stolen when the following three conditions are present together (Willison 2025).

- Access to private data
- Exposure to untrusted content
- A means of external communication

Willison argued that the only way for users who mix and match tools to stay safe is to avoid this combination entirely (Willison 2025).
He is skeptical of guardrails that claim to catch 95% of attacks and writes that in web application security 95% is a failing grade (Willison 2025).

Meta published a similar principle as the Agents Rule of Two (Meta 2025-10-31).
Until research provides a way to reliably detect and refuse prompt injection, an agent should satisfy no more than two of the following three properties within a session (Meta 2025-10-31).

- [A] Process untrustworthy inputs
- [B] Access sensitive systems or private data
- [C] Change state or communicate externally

When all three are needed, the work is started in a new session with a fresh context window or is supervised, for example through human approval (Meta 2025-10-31).

In academic work, deterministic constraints have also been organized as design patterns.
In a preprint, Beurer-Kellner et al. set out a shared principle: once an agent has ingested untrusted input, it must be constrained so that the input cannot trigger consequential actions (Beurer-Kellner et al. 2025).
The authors state that these patterns deliberately limit what the agent can do (Beurer-Kellner et al. 2025).

As an implementation that separates control flow from data flow and enforces policies, Debenedetti et al. presented CaMeL at SaTML (Debenedetti et al. 2026).
CaMeL extracts the control and data flow from the trusted user request in advance and enforces policies when tools are called (Debenedetti et al. 2026).
On AgentDojo, 77% of the tasks were solved with provable security (Debenedetti et al. 2026).
This figure comes from the arXiv version and has not been checked against the SaTML version.
The undefended system solved 84% (Debenedetti et al. 2026).
The 77% is the share of tasks solved, not the share of attacks blocked (Debenedetti et al. 2026).

Costa et al. of Microsoft proposed FIDES, a planner that tracks confidentiality and integrity labels (Costa et al. 2025).
They report that on AgentDojo it completed a broad range of tasks with security guarantees (Costa et al. 2025).

Commercial products have also adopted constraints outside the model and separation of roles.
Google introduced the User Alignment Critic for the agent in Chrome (Google 2025-12-08).
A separate model, isolated from untrusted content, vets each action, and the design is partly inspired by the dual LLM pattern and by CaMeL (Google 2025-12-08).
The dual LLM pattern assigns reading untrusted data and acting with privileges to separate models.

In its November 2026 explanation of Gemini's defense in depth, Google also stated that prompt injection cannot be solved by system prompts alone (Google 2026-11-17).
The company checks incoming content, the model, and outgoing requests independently, and because no detector catches every injection attempt, it applies deterministic rules outside the model to outbound links (Google 2026-11-17).
Each layer is built on the assumption that another layer could miss an edge case (Google 2026-11-17).

In a March 2026 article, OpenAI stated that real-world prompt injection has come to resemble social engineering more than simple instruction overrides (OpenAI 2026-03-11).
Its view is that fully developed attacks are usually not caught by AI firewalling, which classifies inputs as malicious or benign, and that detecting a malicious input is as hard as detecting a lie or misinformation (OpenAI 2026-03-11).
The company therefore introduced Safe Url, which detects when information learned in the conversation would be sent to a third party and either shows it to the user or blocks it, instead of relying only on stopping input at the entrance (OpenAI 2026-03-11).

Guidance also exists for narrowing the execution environment of coding agents at the operating-system level.
The NVIDIA AI Red Team identifies indirect prompt injection as the main threat to coding agents and lists three mandatory OS-level controls (NVIDIA 2026-01-30).

- Block network egress to unknown destinations
- Block file writes outside the active workspace
- Block all writes to agent configuration files and extensions

Even with a sandbox that isolates execution, information can still leak through allowed routes.
In a May 2026 article, Anthropic wrote that any probabilistic defense has a non-zero miss rate and that protection in the model layer will never be 100% effective, so it cannot stand alone (Anthropic 2026-05-25).
It then described an internal test in which the sandbox worked perfectly and yet data was exfiltrated through an allowed destination, `api.anthropic.com` (Anthropic 2026-05-25).

The Microsoft Security Response Center (MSRC) also sets out a defense in depth of prevention, detection, and impact mitigation (Microsoft 2025-07-29).
Each stage contains both probabilistic and deterministic mechanisms (Microsoft 2025-07-29).
Concretely, Spotlighting and Prompt Shields are combined with deterministic blocking of known exfiltration methods and user consent (Microsoft 2025-07-29).

## Human confirmation and monitoring

After system permissions are narrowed, the last layer is human confirmation and monitoring.
Confirmation has its own limits, however: human fatigue and gaps in what tools inspect.

The 28 July 2026 version of the MCP specification, the standard for connecting tools, states at the SHOULD level that, for safety, there should always be a human in the loop with the ability to deny tool invocations (Model Context Protocol 2026-07-28).

Supabase, which provides a database service, reported that prompt injection remains the top concern even in read-only mode (Supabase 2025-09-16).
Adding warnings and classifiers reduced the risk but did not eliminate it (Supabase 2025-09-16).
The company notes that many MCP clients require human approval for each call but that approval fatigue will happen (Supabase 2025-09-16).
It concluded that the safest measure is never to connect AI agents directly to production data (Supabase 2025-09-16).

In an article on agents in VS Code, GitHub also reported that even Claude Sonnet 4, the model it found most thoroughly trained to resist such attacks, could be reliably tricked (GitHub 2025-08-25).
It explains that, for now, confirmation is the main protection (GitHub 2025-08-25).

When ready-made safety filters are used, their coverage needs attention.
According to the documentation of the prompt attack filter in AWS Bedrock Guardrails, tool results and tool definitions are not evaluated (AWS n.d.).
Indirect injection that arrives through tool results can therefore be read as lying outside this filter.

## Where degradation and injection meet

The sections above treated degradation, loss, and injection separately, but in real agents they are intertwined.
Summaries and memory, which are used against degradation, can also become routes for attack.

The first point is that summarization itself becomes an attack surface.
Liu, Zhang, Xie, and She presented at ASE 2026 an attack that targets settings in which trusted and untrusted inputs share one compression budget (Liu, Zhang et al. 2025).
By perturbing the untrusted side, the attacker makes the compressor drop task-critical evidence or safety guardrails (Liu, Zhang et al. 2025).
Over three tasks and six compressors, the average success rate was 0.71, above the 0.21 of the strongest existing attack used for comparison (Liu, Zhang et al. 2025).
The preprint by Chen mentioned above also presents an attack that biases compaction so that a policy is deleted (Chen 2026).

Dabirsiaghi, who works at the security product company Pixee, also showed in a preprint that the provenance of a message, that is, who said it, can be destroyed in code before the summarizer runs (Dabirsiaghi 2026).
This happens in harnesses that flatten the conversation into a single plain string and mark each message with a text label such as [User]: (Dabirsiaghi 2026).
If an attacker controls anything the agent reads, the attacker can forge a user turn (Dabirsiaghi 2026).
The forged approval then survives compaction as a genuine instruction in the agent's memory (Dabirsiaghi 2026).
In five flattening harnesses (pi, opencode, Cline, Aider, and OpenHands), the forged approval survived in memory 87% to 100% of the time (Dabirsiaghi 2026).
In four role-typed harnesses (Codex, Gemini CLI, Qwen Code, and Continue), the same attack succeeded 0% of the time (Dabirsiaghi 2026).
The author writes that because provenance is destroyed deterministically in harness code, no prompt-level defense can restore it (Dabirsiaghi 2026).

The second point is that the model itself writes the summary that enters the next window.
In an OpenAI report that Willison quoted on 17 September 2026, an additional instruction that did not exist was written into a summary during training (Willison 2026).
OpenAI states that it observed no behavioral differences in that rollout (Willison 2026).
The case shows that instructions absent from the original context can enter at the summarization stage.

The third point is that long-running agents carry contamination forward.
In the draft of SP 2400-102 E2026, NIST wrote that memory poisoning, once introduced, affects many later tasks (NIST 2026).
It also notes that an attacker may exploit the instruction drift of long-running agents to steer them gradually away from their original goal (NIST 2026).

The fourth point is that splitting windows or agents cuts both ways.
Meta, in the Rule of Two, lists starting a new session with a fresh context window as one option when all three properties are needed, and Anthropic and Cognition describe the benefits of doing exploration or review in a fresh context (Meta 2025-10-31; Anthropic 2025-09-29; Cognition 2026-04-22).
Splitting the window helps both to prevent degradation and to contain the effects of injection.
Some configurations, such as the Claude Agent SDK, pass only the prompt string from parent to child.
Even in such configurations, malicious content that the child has read may reach the parent's window through the summary returned to the parent.
Lee and Tiwari showed, in Prompt Infection, an attack in which a malicious prompt replicates itself and spreads across connected agents (Lee & Tiwari 2026).
Multi-agent systems were highly susceptible even when agents did not share all communications (Lee & Tiwari 2026).
The authors proposed a defense called LLM Tagging and report that, combined with existing safeguards, it greatly reduced the spread (Lee & Tiwari 2026).
That injection can spread between agents has therefore been shown.
No study found in this survey, however, measured directly whether contamination travels through summaries returned from a subagent to its parent.
This point therefore remains a conjecture.

## Positions of public bodies and standards

Public bodies and organizations that write practical guidance share the position that the model layer alone cannot fully prevent injection.

In AI 100-2 E2025, published in March 2025, NIST stated that current-generation models remain highly vulnerable to direct prompt injection (NIST 2025).
Because current mitigations do not protect against all attacker techniques, it asks that systems be designed on the assumption that the model can produce malicious output (NIST 2025).

In its view of 8 December 2025, the UK National Cyber Security Centre (NCSC) wrote that, since there is no inherent distinction between data and instructions, prompt injection may never be mitigated as completely as SQL injection can be (NCSC 2025).
LLMs should be treated as inherently confusable deputies, and designs should aim to reduce the risk and its impact (NCSC 2025).
The NCSC states that if a system cannot tolerate the remaining risk, it may not be a good use case for LLMs (NCSC 2025).

OWASP, a non-profit organization that writes practical guidance on web security, also wrote in LLM01:2025 that, given the stochastic nature of models, it is unclear whether there are fool-proof methods of preventing prompt injection (OWASP 2025).
It lists measures that reduce the impact, such as least-privilege access and human approval of high-risk actions (OWASP 2025).

Evaluation practice itself is also being revisited.
In a report published in January 2025 and updated in December of the same year, NIST CAISI reported that on AgentDojo the attack success rate rose from 11% for the strongest existing attack to 81% for a newly built attack (NIST CAISI 2025).
It holds that security should be evaluated with adaptive attacks rather than fixed ones, including multiple attempts (NIST CAISI 2025).

Definitions differ across public documents and standards.
NIST treats jailbreaking, which removes a model's safety restrictions, separately from prompt injection (NIST 2025).
OWASP includes jailbreaking within prompt injection (OWASP 2025).
Figures and definitions are therefore not compared directly across documents.

## What is not yet known

Five points remain without sufficient evidence.

- No study was found that compared whether the type of summarization raises or lowers resistance to injection
- No peer-reviewed study was found that measured contamination of rule files such as AGENTS.md or CLAUDE.md themselves; the closest is Skill-Inject, which deals with skill files
- No source was found that independently measured how often injection occurs in real-world use
- No source was found in which a third party compared the long-context figures published by vendors under the same conditions
- No study was found that measured whether contamination travels when a subagent returns only a summary to its parent (Lee and Tiwari showed attacks that spread between agents)

## Related notes

- [Has RAG Fallen Out of Use? What Replaced It, and What Remains](https://jamjet-iqbal.com/en/notes/rag-grounding-2026-ai-frontier/): how RAG is used and how retrieval methods have changed
- [Knowledge Management Methods for the LLM Era (Mid-2026 Status Report)](https://jamjet-iqbal.com/en/notes/llm-knowledge-management-2026/): the lineage of methods for giving knowledge to LLMs
- [Agentic Coding: The Current State of Orchestration Patterns (2026)](https://jamjet-iqbal.com/en/notes/agentic-coding-orchestration-patterns/): orchestration patterns for coding agents
- [Measures Against the Uniform Look of LLM-Generated UI (November 2026)](https://jamjet-iqbal.com/en/notes/llm-design-best-practices-2026-11/): measures against the uniform look of LLM-generated UI

## Unverified items

- The 77% and 84% for CaMeL are values from the second arXiv version and have not been checked against the SaTML 2026 version `[要確認: 未試行 SaTML の版の本文を取得していない（周辺の注記のため）]`
- The undated vendor documents (Anthropic n.d.-a to n.d.-f, AWS n.d., Google n.d., OpenAI n.d.) are described as retrieved on 23 November 2026 `[要確認: 記載なし 各ページに更新日が無い]`
- The OpenAI report on summaries during training is described within the extent of Willison's quotation `[要一次検証: 本文未到達 OpenAI の原報告を取得していない]`
- The 60% to 80% in Rehberger (2026) are his own values from five attempts per attack chain; third-party reproduction has not been checked `[要確認: 未試行 第三者の再現の報告を探していない（周辺の事例のため）]`

## References

### Academic literature

- Abdelnabi, S., Fay, A., Cherubin, G., Salem, A., Fritz, M., & Paverd, A. (2025). Get my drift? Catching LLM Task Drift with Activation Deltas. SaTML 2025. https://arxiv.org/abs/2406.00799
- Beurer-Kellner, L., Buesser, B., Creţu, A.-M., Debenedetti, E., et al. (2025). Design Patterns for Securing LLM Agents against Prompt Injections. arXiv preprint. https://arxiv.org/abs/2506.08837
- Chen, S., Piet, J., Sitawarin, C., & Wagner, D. (2025). StruQ: Defending Against Prompt Injection with Structured Queries. USENIX Security 2025. https://arxiv.org/abs/2402.06363
- Chen, S., Zharmagambetov, A., Mahloujifar, S., Chaudhuri, K., Wagner, D., & Guo, C. (2025). SecAlign: Defending Against Prompt Injection with Preference Optimization. ACM CCS 2025. https://arxiv.org/abs/2410.05451
- Chen, S. (Shiyang) (2026). Governance Decay: How Context Compaction Silently Erases Safety Constraints in Long-Horizon LLM Agents. arXiv preprint. https://arxiv.org/abs/2606.22528
- Costa, M., Köpf, B., Kolluri, A., Paverd, A., Russinovich, M., Salem, A., Tople, S., Wutschitz, L., & Zanella-Béguelin, S. (2025). Securing AI Agents with Information-Flow Control. NeurIPS 2026 (poster). https://arxiv.org/abs/2505.23643
- Dabirsiaghi, A. (2026). Compaction Laundering: Provenance Destruction in Context-Compacting Coding Agents. arXiv preprint. https://arxiv.org/abs/2610.29869
- Debenedetti, E., Shumailov, I., Fan, T., Hayes, J., Carlini, N., Fabian, D., Kern, C., Shi, C., Terzis, A., & Tramèr, F. (2026). Defeating Prompt Injections by Design. 2026 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML), 587–618 (figures from arXiv v2). https://arxiv.org/abs/2503.18813
- Debenedetti, E., Zhang, J., Balunović, M., Beurer-Kellner, L., Fischer, M., & Tramèr, F. (2024). AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents. NeurIPS 2024 Datasets and Benchmarks. https://arxiv.org/abs/2406.13352
- Dong, S., Xu, S., He, P., et al. (2025). Memory Injection Attacks on LLM Agents via Query-Only Interaction. NeurIPS 2025. https://arxiv.org/abs/2503.03704
- Du, Y., Tian, M., Ronanki, S., et al. (2025). Context Length Alone Hurts LLM Performance Despite Perfect Retrieval. Findings of EMNLP 2025. https://doi.org/10.18653/v1/2025.findings-emnlp.1264
- Dziemian, M., Lin, M., Fu, X., et al. (2026). How Vulnerable Are AI Agents to Indirect Prompt Injections? Insights from a Large-Scale Public Competition. arXiv preprint. https://arxiv.org/abs/2603.15714
- Greshake, K., Abdelnabi, S., Mishra, S., Endres, C., Holz, T., & Fritz, M. (2023). Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection. AISec 2023. https://doi.org/10.1145/3605764.3623985
- Hines, K., Lopez, G., Hall, M., Zarfati, F., Zunger, Y., & Kiciman, E. (2024). Defending Against Indirect Prompt Injection Attacks With Spotlighting. arXiv preprint. https://arxiv.org/abs/2403.14720
- Hsieh, C.-P., Sun, S., Kriman, S., et al. (2024). RULER: What's the Real Context Size of Your Long-Context Language Models? COLM 2024. https://arxiv.org/abs/2404.06654
- Kuratov, Y., Bulatov, A., Anokhin, P., Rodkin, I., Sorokin, D., Sorokin, A., & Burtsev, M. (2024). BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack. NeurIPS 2024 Datasets and Benchmarks. https://arxiv.org/abs/2406.10149
- Laban, P., Hayashi, H., Zhou, Y., & Neville, J. (2026). LLMs Get Lost In Multi-Turn Conversation. ICLR 2026. https://arxiv.org/abs/2505.06120
- Lee, D., & Tiwari, M. (2026). Prompt Infection: LLM-to-LLM Prompt Injection within Multi-agent Systems. Lecture Notes in Computer Science, 511–520 (arXiv 2024). https://arxiv.org/abs/2410.07283
- Levy, M., Jacoby, A., & Goldberg, Y. (2024). Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Models. ACL 2024. https://doi.org/10.18653/v1/2024.acl-long.818
- Li, K., Liu, T., Bashkansky, N., Bau, D., Viégas, F., Pfister, H., & Wattenberg, M. (2024). Measuring and Controlling Instruction (In)Stability in Language Model Dialogs. COLM 2024. https://arxiv.org/abs/2402.10962
- Lindenbauer, T., Slinko, I., Felder, L., Bogomolov, E., & Zharov, Y. (2025). The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Management. NeurIPS 2025 Workshop on Deep Learning for Code. https://arxiv.org/abs/2508.21433
- Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2024). Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 12, 157–173. https://doi.org/10.1162/tacl_a_00638
- Liu, Z. (Zesen), Zhang, Z., Xie, Y., & She, D. (2025). When Compression Becomes an Attack Surface: Black-Box Attacks on Prompt-Compressed LLM Agents. Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering (ASE 2026), 803–814. https://arxiv.org/abs/2510.22963
- Liu, Z. (Zhuowen) (2026). Passing the Test You Trained On: Re-evaluating Prompt-Injection Detectors for LLM Agents. arXiv preprint. https://arxiv.org/abs/2610.03448
- Modarressi, A., et al. (2025). NoLiMa: Long-Context Evaluation Beyond Literal Matching. ICML 2025. https://arxiv.org/abs/2502.05167
- Nasr, M., Carlini, N., Sitawarin, C., Schulhoff, S., et al. (2025). The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks and Prompt Injections. arXiv preprint. https://arxiv.org/abs/2510.09023
- Rahman, M. J., & Alouani, I. (2026). Bypassing Prompt Injection Detectors through Evasive Injections. 2026 International Joint Conference on Neural Networks (IJCNN). https://arxiv.org/abs/2602.00750
- Schmotz, D., Beurer-Kellner, L., Abdelnabi, S., & Andriushchenko, M. (2026). Skill-Inject: Measuring Agent Vulnerability to Skill File Attacks. NeurIPS 2026 Evaluations and Datasets Track (poster). https://arxiv.org/abs/2602.20156
- Shi, C., Lin, S., Song, S., Hayes, J., Shumailov, I., et al. (2025). Lessons from Defending Gemini Against Indirect Prompt Injections. arXiv preprint. https://arxiv.org/abs/2505.14534
- Sunil, B. D., Sinha, I., Maheshwari, P., Todmal, S., Mallik, S., & Mishra, S. (2026). Memory Poisoning Attack and Defense on Memory Based LLM-Agents. arXiv preprint. https://arxiv.org/abs/2601.05504
- Wallace, E., Xiao, K., Leike, R., Weng, L., Heidecke, J., & Beutel, A. (2024). The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions. arXiv preprint. https://arxiv.org/abs/2404.13208
- Wang, Z., Gao, Y., Wang, Y., et al. (2026). MCPTox: A Benchmark for Tool Poisoning Attack on Real-World MCP Servers. AAAI 2026. https://arxiv.org/abs/2508.14925
- Zerhoudi, S., Mitrovic, M., & Granitzer, M. (2026). The Compaction Cliff in Long-Running AI Agent Memory. CIKM 2026. https://arxiv.org/abs/2608.22752
- Zha, Y., Meng, Q., et al. (2026). Do Agents Still Follow the Rules? Benchmarking Rule Compliance under Agent Context Compaction. arXiv preprint. https://arxiv.org/abs/2611.03223
- Zhan, Q., Fang, R., Panchal, H. S., & Kang, D. (2025). Adaptive Attacks Break Defenses Against Indirect Prompt Injection Attacks on LLM Agents. Findings of NAACL 2025. https://doi.org/10.18653/v1/2025.findings-naacl.395
- Zhang, Q., Hu, C., Upasani, S., et al. (2026). Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models. ICLR 2026. https://arxiv.org/abs/2510.04618
- Zou, A., Lin, M., Jones, E., et al. (2025). Security Challenges in AI Agent Deployment: Insights from a Large Scale Public Competition. NeurIPS 2025. https://arxiv.org/abs/2507.20526
- Zou, W., Geng, R., Wang, B., & Jia, J. (2025). PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models. USENIX Security 2025. https://arxiv.org/abs/2402.07867

### Vendor first-party sources

- Anthropic (2025-06-13). How we built our multi-agent research system. https://www.anthropic.com/engineering/multi-agent-research-system
- Anthropic (2025-09-29). Effective context engineering for AI agents. https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
- Anthropic (2025-10-16). Equipping agents with Agent Skills. https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills
- Anthropic (2025-11-24). Mitigating prompt injections in browser use. https://www.anthropic.com/research/prompt-injection-defenses
- Anthropic (2025-11-26). Effective harnesses for long-running agents. https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
- Anthropic (2026-03-25). How we built Claude Code auto mode. https://anthropic.com/engineering/claude-code-auto-mode
- Anthropic (2026-05-25). How we contain Claude across products. https://anthropic.com/engineering/how-we-contain-claude
- Anthropic (n.d.-a). Context editing. https://platform.claude.com/docs/en/build-with-claude/context-editing
- Anthropic (n.d.-b). Compaction at a token threshold. https://platform.claude.com/docs/en/build-with-claude/compaction-threshold
- Anthropic (n.d.-c). Memory tool. https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool
- Anthropic (n.d.-d). Explore the context window (Claude Code). https://code.claude.com/docs/en/context-window
- Anthropic (n.d.-e). Best practices for Claude Code. https://code.claude.com/docs/en/best-practices
- Anthropic (n.d.-f). Subagents in the SDK. https://code.claude.com/docs/en/agent-sdk/subagents
- AWS (n.d.). Detect prompt attacks with Amazon Bedrock Guardrails. https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-prompt-attack.html
- GitHub (2025-08-25). Safeguarding VS Code against prompt injections. https://github.blog/security/vulnerability-research/safeguarding-vs-code-against-prompt-injections/
- Google (2025-12-08). Architecting security for agentic capabilities in Chrome. https://blog.google/security/architecting-security-for-agentic/
- Google (2026-11-17). How Gemini's defense-in-depth approach works. https://blog.google/security/how-geminis-defense-in-depth-approach-works/
- Google (n.d.). Long context (Gemini API). https://aistudio.google.com/docs/long-context
- Meta (2025-10-31). Agents Rule of Two: A Practical Approach to AI Agent Security. https://ai.meta.com/blog/practical-ai-agent-security/
- Microsoft (2025-07-29). How Microsoft defends against indirect prompt injection attacks. https://www.microsoft.com/msrc/blog/2025/07/how-microsoft-defends-against-indirect-prompt-injection-attacks
- Microsoft (2026-02-10). Manipulating AI memory for profit: The rise of AI Recommendation Poisoning. https://www.microsoft.com/en-us/security/blog/2026/02/10/ai-recommendation-poisoning/
- Model Context Protocol (2026-07-28). Specification: Tools. https://modelcontextprotocol.io/specification/2026-07-28/server/tools
- NVIDIA (2026-01-30). Practical Security Guidance for Sandboxing Agentic Workflows and Managing Execution Risk. https://developer.nvidia.com/blog/practical-security-guidance-for-sandboxing-agentic-workflows-and-managing-execution-risk
- OpenAI (2026-03-11). Designing agents to resist prompt injection. https://openai.com/index/designing-agents-to-resist-prompt-injection/
- OpenAI (n.d.). Compaction (Responses API). https://developers.openai.com/api/docs/guides/compaction

### Developer and security-company reports

- Amp (2025-10-23). Handoff (No More Compaction). https://ampcode.com/news/handoff
- Cline (2025-05-27). Why Cline Doesn't Index Your Codebase (And Why That's a Good Thing). https://cline.bot/blog/why-cline-doesnt-index-your-codebase-and-why-thats-a-good-thing
- Cognition (2025-06-12). Don't Build Multi-Agents. https://cognition.com/blog/dont-build-multi-agents
- Cognition (2025-09-29). Rebuilding Devin for Claude Sonnet 4.5: Lessons and Challenges. https://cognition.com/blog/devin-sonnet-4-5-lessons-and-challenges
- Cognition (2026-04-22). Multi-Agents: What's Actually Working. https://cognition.com/blog/multi-agents-working
- Cursor (2026-01-06). Dynamic context discovery. https://cursor.com/blog/dynamic-context-discovery
- Factory (2025-12-16). Evaluating Context Compression for AI Agents. https://factory.com/news/evaluating-compression
- HiddenLayer (2025-11-26). Cursor Vulnerability Report. https://hiddenlayer.com/sai_security_advisor/2025-11-cursor/
- Hong, K., Troynikov, A., & Huber, J. (2025). Context Rot: How Increasing Input Tokens Impacts LLM Performance. Chroma. https://www.trychroma.com/research/context-rot
- Invariant Labs (2025-04-01). MCP Security Notification: Tool Poisoning Attacks. https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks
- Invariant Labs (2025-05-26). GitHub MCP Exploited: Accessing private repositories via MCP. https://invariantlabs.ai/blog/mcp-github-vulnerability
- Ji, Y. (2025). Context Engineering for AI Agents: Lessons from Building Manus. Manus. https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus
- LangChain (2026-01-28). Context Management for Deep Agents. https://www.langchain.com/blog/context-management-for-deepagents
- Supabase (2025-09-16). Defense in Depth for MCP Servers. https://supabase.com/blog/defense-in-depth-mcp

### Views of individuals with verified expertise

- Breunig, D. (2025). How Long Contexts Fail. https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html
- Rehberger, J. (2025). GitHub Copilot: Remote Code Execution via Prompt Injection (CVE-2025-53773). Embrace The Red. https://embracethered.com/blog/posts/2025/github-copilot-remote-code-execution-via-prompt-injection/
- Rehberger, J. (2026). Breaking Claude Code Opus 5 Auto Mode. Embrace The Red. https://embracethered.com/blog/posts/2026/breaking-claude-code-opus-5-and-automode/
- Willison, S. (2025). The lethal trifecta for AI agents. https://simonwillison.net/2025/Jun/16/the-lethal-trifecta/
- Willison, S. (2026). Self-generated prompt injections in compaction summaries. https://simonwillison.net/2026/Sep/17/compaction-summaries/

### Public bodies and standards

- NIST (2025). Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations (NIST AI 100-2 E2025). https://doi.org/10.6028/NIST.AI.100-2e2025
- NIST (2026). Adversarial Machine Learning: A Taxonomy and Terminology (NIST SP 2400-102 E2026, initial public draft). https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.2400-102e2026.ipd.pdf
- NIST CAISI (2025). Technical Blog: Strengthening AI Agent Hijacking Evaluations. https://www.nist.gov/news-events/news/2025/01/technical-blog-strengthening-ai-agent-hijacking-evaluations
- OWASP (GenAI Security Project) (2025). LLM01:2025 Prompt Injection. https://genai.owasp.org/llmrisk/llm01-prompt-injection/
- NCSC (UK National Cyber Security Centre) (2025-12-08). Prompt injection is not SQL injection (it may be worse). https://www.ncsc.gov.uk/blog-post/prompt-injection-is-not-sql-injection

### Surveys and aggregations

- AI Incident Database (2026). AI Incident Roundup – August, September, and October 2026. https://incidentdatabase.ai/blog/incident-report-2026-august-september-october/
- International AI Safety Report (2025). Second Key Update: Technical Safeguards and Risk Management. https://internationalaisafetyreport.org/publication/second-key-update-technical-safeguards-and-risk-management
