Agent swarms show prompt injection in tool output is not solved

A Google DeepMind paper posted on 9 November 2026 used swarms of cooperating attacker agents to make frontier and open weights models follow instructions planted in tool output. Here is what the numbers say and how we would design around them.

Written by
Baraqix Engineering
Published
Read
5 min
Abstract diagram of many small clusters of light points sending thin lines toward one central node, which passes a single bright line to a node that sits outside its normal path.

On 9 November 2026 a Google DeepMind team posted Scaling Adaptive Prompt Injection Attacks with Agent Swarms to arXiv. The argument is simple and uncomfortable. Static prompt injection benchmarks stopped telling us much once frontier models saturated them, and the authors say human red teaming on the GraySwan Arena is close to saturation too, especially on Gemini models. Yet an attacker that adapts, built as a swarm of cooperating agents, still gets models to follow instructions planted in tool output. The most resistant model in the study held out in 66 of 100 scenarios at the full attack budget.

01

What the paper tested

The authors built 100 synthetic tool use scenarios from 249 tools across 53 domains. Each scenario gives the model tools from two unrelated domains, a user goal that needs only one of them, and an attacker goal that is a single call to a tool from the other domain. The payload sits in the response of the final tool call. In their worked example, a model booking a tutoring session is pushed into calling log_vital_signs from a health tracking domain.

The attacker goal is deliberately non malicious. The authors say this separates the ability to respect the instruction hierarchy from the model's knowledge of security practices, and they note that a sequence of benign looking calls can be chained into a malicious action. The attacker, called Agentic Optimizer, runs 8 teams of 2 agents that evaluate candidate payloads, read shared leaderboards and post notes to a team whiteboard. Each agent gets at most 20 evaluation calls, so 320 in total. An attempt only counts as a success if the model calls the exact target tool with every argument key present, numeric and boolean values matching exactly, and string values matching almost exactly.

TAB/01Attack resistance rate against the strongest attacker, Gemini 4 Argon, from Table 1 of the paper. Higher is better for the defender.
Defender modelResisted within 150 queries (%)Resisted at full budget (%)
Gemini 4 Argon8766
Gemini 3.8 Flash3410
Gemini 3.7 Flash316
Gemini 3.6 Flash31
Kimi K351
GLM-5.311
DeepSeek-V4.1-Flash11
02

Four findings that matter more than the headline

  • Attacker strength drives the result. Mean resistance within 150 queries across all defenders fell from 42.1 percent with Gemini 3.6 Flash as the attacker to 23.1 percent with Gemini 4 Argon. A red team result expires when attacker models improve, even if your own model stays the same.
  • Visible reasoning helps the attacker. With a Gemini 3.8 Flash attacker, every Gemini defender resisted fewer attacks within 150 queries when its chain of thought was visible. Gemini 4 Argon went from 100 percent with hidden reasoning to 92 percent with visible reasoning.
  • Attackers that learn across scenarios get much stronger. With Gemini 3.8 Flash defending and Gemini 4 Argon attacking, resistance within 150 queries was 34 percent with a strategy database populated in advance and then frozen, and 5 percent when the database started empty and was updated after every success.
  • The winning payloads look like data dependencies. The authors found the strongest attacker was better at making the target call look like a data dependency for the legitimate call. That is the normal shape of an agent workflow: one tool returns a value and the next tool consumes it.

The open weights rows deserve a direct sentence. If you run GLM-5.3, Kimi K3 or DeepSeek-V4.1-Flash to cut inference cost, this paper measured close to no resistance from those models in this setup, at 1 percent at the full budget. Those models can still be the right choice, as long as model behaviour is never counted as a control.

03

What we would do

The paper concludes that defenses should perhaps not rely on model hardening alone and should involve defense in depth. We would put it more bluntly for a team shipping an agent: assume the injection succeeds and ask what the next tool call is able to do. In a RAG system, a retrieved PDF chunk sits in exactly the position of the poisoned tool response in this study, so the same reasoning applies to retrieval.

  1. Scope tools per task. The attack here needs the target tool to be available in that turn. A tutoring flow that never sees log_vital_signs cannot be steered into calling it. Build the tool list from the task and leave out the rest of what an MCP server exposes.
  2. Check argument provenance in code. Because successful payloads impersonate data dependencies, require that arguments to write tools come from the user request or from typed fields of a named earlier tool response, never from free text inside a response.
  3. Gate side effects outside the model. Writes, payments, outbound messages and deletes go through a policy layer with its own allowlist, and through user confirmation where the cost of a mistake is real.
  4. Keep reasoning away from untrusted parties. Log chain of thought and refusal detail for your own team. Do not return it to whoever can influence the content your agent reads.
  5. Red team adaptively and on a schedule. A static injection suite run once is the kind of test this paper calls saturated. Rerun with a stronger attacker model whenever one ships, and let the attacker carry lessons between scenarios, because in this paper that alone took resistance within 150 queries from 34 percent to 5 percent.

The first two items fit in a small authorisation function that runs before any tool executes. This is a sketch of the idea.

LST/01TypeScript
type ToolCall = { name: string; args: Record<string, unknown> };

const TASK_TOOLS: Record<string, Set<string>> = {
  book_tutoring: new Set(["search_tutors", "schedule_tutoring_session"]),
};

// trusted holds values taken from the user request and from typed
// fields of earlier tool responses, never from free text in a response
export function authorize(task: string, call: ToolCall, trusted: Set<string>): boolean {
  const allowed = TASK_TOOLS[task];
  if (!allowed || !allowed.has(call.name)) return false;
  return Object.values(call.args).every((v) => trusted.has(String(v)));
}

None of this makes a model resist injection better. It makes a successful injection boring, which is the result you want. If you are moving an agent or RAG pipeline toward production and want the tool surface, permissions and adaptive tests designed in from the start, that is the work our AI integration team does, and it begins with a fixed price Discovery Sprint.

Baraqix Engineering. Written by the engineers who did the work.

NOTE/14. First published .

Where this work fits

The services behind this note.

  • SVC/AI-01

    AI integration

    RAG, agents, MCP servers and voice, built into the product you already have.

  • ENG/SPRINT

    Discovery Sprint

    A fixed price Discovery Sprint. The architecture document and a working spike on your real data, in a repository you own.

If something in this note looks like your problem, the reply comes from the engineers who built it.