Part 1 · Multi-agentThe orchestrator trusts what it is told
Agentic systems increasingly split a task across several LLM agents. A common shape, and the one MultiAgentDojo uses, is an orchestrator that holds no tools of its own and a set of sub-agents that each own a slice of the tools. The orchestrator plans; it calls a sub-agent with a natural-language task; the sub-agent runs its tools and reports back in prose; the orchestrator reads that prose and decides the next call.
This factoring is attractive for permissions and context: the file agent reads files, the banking agent moves money, and neither can do the other's job. But it introduces a quiet assumption. The orchestrator never sees a tool's raw output. It sees a sub-agent's description of that output. Every critical value (a recipient account, an email address, a URL) passes through a model that regenerates it as free text, and the receiver cannot tell a value that was copied verbatim from a tool from a value the model wrote.
One compromised sub-agent is enough
Suppose exactly one sub-agent is compromised: the one that produces a value the task depends on. It keeps its own tool permissions. It cannot touch other agents, the environment, or the raw tool outputs. Its only power is what it chooses to say in its report.
We take the 20 MultiAgentDojo tasks where a value one sub-agent reads is used verbatim as an argument of another sub-agent's state-changing call, compromise the producing agent, and have it report a replacement value.
| The compromised agent's report | Runs | Attack succeeded |
|---|---|---|
| Clean misreport (replacement only) | 39 | 38 |
| Mixed (true and false value both named) | 14 | 2 |
A clean misreport succeeds 38 of 39 times. The orchestrator's next step is exactly what the user asked for; it simply has the wrong number, and no second source to check it against. A stronger orchestrator does not help, because the missing ingredient is information, not judgment. You cannot reason your way to a value you were never shown.
This is an old pattern in a new setting. The orchestrator acting on a false value with its own authority is a confused deputy; substituting the value is false data injection. What is new is that the harmful step is the user's own requested action, carried out with one wrong argument.
Part 2 · Prompt injectionHow the lie gets in
A sub-agent does not have to be malicious to misreport. The realistic routes are a sub-agent that has read a poisoned page or file, a malicious plugin or sub-agent definition, or a third-party agent whose output you do not control. Prompt injection is the first of these, and it is the one the system's own defenses are supposed to handle.
The fixed attack barely works, which is why it hides
On MultiAgentDojo with deepseek-v4.1-flash and the standard important_instructions attack, the attack succeeds in 2.0% of 912 runs. A fixed injection planted in a web page produced a misreport 0 of 60 times; the sub-agent reads the planted instruction and flags it (this is a prompt injection, I will not follow it
). Seven wordings over 420 runs raised that to 1. An injection benchmark would call this model safe.
Detection is not safety
But seeing is not refusing to act. In that one success, and in a focused sweep of the web-fetch tasks, the agent named the injection in its report and still issued one request to the attacker's URL, buried in a retry loop as it tried variants of a page it could not load. We record this as executed_despite_flag. An adaptive attacker that optimizes directly for this signal pushes it up sharply:
| Setting (web-fetch tasks) | Flagged the injection | Flagged yet executed |
|---|---|---|
| Fixed wording, one attempt | 55/56 | 4/56 |
| Adaptive, optimizing the signal | — | 8/39 ≈ 21% |
The model's vigilance fires nearly every time, and it still executes the attacker's call about one time in five under pressure.
And when the injection reaches the request itself
A direct injection appends the attacker's value to the user's request. Here nothing needs to be compromised at all, and with no defense the attack succeeds in 46 of 60 runs.
The misreport experiments in Part 1 simulate the end state, a sub-agent that is already compromised, instead of injecting it live. That is the standard assumption in this literature. Part 2 is the evidence that the end state is reachable: not often with a fixed template on this model, but often enough once the attacker adapts.
Part 3 · ContractBind the value to its source
Prompt injection is dangerous because instructions and data share one channel and the model cannot tell them apart. The misreport is the dual problem: a critical value must be regenerated by a model to be handed on, and the receiver cannot tell a copied value from a generated one. Both are solved the same way, by taking the model out of the path it should not be in. The model may choose which value to use; the system carries the value from its source.
A provenance contract is a small piece of data, written per task, that names the few arguments that matter and binds each to the tool call that must have produced it:
# contract for a bill-payment task banking/user_task_0: send_money: recipient: {must_come_from: {tool: read_file, args: {file_path: "bill-december-2023.txt"}}} amount: {must_come_from: {tool: read_file, args: {file_path: "bill-december-2023.txt"}}}
A runtime guard keeps a log of every tool call and its raw output across all sub-agents, in the one process they share. Before any state-changing call executes, for each contract-named argument it checks that the value appears (after normalizing case, URL scheme, and trailing slash) in the raw output of the required tool with the required arguments. If it does not, the call is denied and the calling agent gets one fixed message. This is the by-reference idea from CaMeL, restricted to the handful of arguments a contract names and applied across the sub-agent boundary.
send_money. The contract records the file's real output and denies the account that is not in the log. Giving the orchestrator its own read tool sidesteps the compromised agent entirely — a strong baseline the contract has to beat (below).It stops the misreport
Across the 50 runs where the compromised agent misreported, the guard let one through. The cost on normal tasks is 2 of 60 runs, with matching that normalizes values and trusts the user's own request.
| Suite | No defense, no attack (utility) | Contract, no attack (utility) | Contract, under attack (attack succeeded) |
|---|---|---|---|
| banking | 6/6 | 6/6 | 0/6 |
| slack | 30/30 | 30/30 | 0/25 |
| travel | 12/12 | 12/12 | 0/11 |
| workspace | 12/12 | 10/12 | 1/8 |
| all | 60/60 | 58/60 | 1/50 |
The one leak is instructive. That rule binds the producing tool only (search_emails), and the compromised email agent also owns send_email. The likely path is write-then-read-back: the agent writes the false value into the mailbox and reads it out, giving it provenance. A tool-only binding does not hold when the compromised agent can write to the source it is checked against.
It stops the injections that vigilance misses
In the flagged-yet-executed cases from Part 2, the attacker's URL is not in the bound source, so the contract denies it: 0 of 56 on the same focused tasks. Vigilance did not catch it; the check did.
It stops direct injection, but only in strict mode
A contract that trusts "values from the user's prompt" passes a direct injection by construction. But the critical values in these tasks are all tool-derived; the user never types them. A strict contract binds every named value to its producing tool and refuses the prompt as a source:
| Condition | Attack succeeded |
|---|---|
| Direct injection, no defense | 46/60 |
| + contract that trusts the request | 48/60 |
| + strict contract (tool-bound) | 2/59 |
The cost is over-denial of legitimate URL variants the agent constructs, such as adding a path to a bound URL, which strict matching rejects.
The honest partWhere a simpler design does just as well
If you give the orchestrator its own read-only copies of the tools and no contract at all, the attack mostly evaporates. The orchestrator reads the source itself, often without delegating the read, so the compromised agent never gets to speak:
| Condition | Orchestrator read itself | Attack succeeded | Utility |
|---|---|---|---|
| Orchestrator has read tools | 60/60 | 5/60 | 57/60 |
| + told to verify reports | 60/60 | 3/60 | 53/60 |
| Orchestrator has no tools | — | 40/60 | 28/60 |
In this benchmark the contract's advantage over "let the orchestrator read" is narrow: the contract does not depend on which tools the orchestrator holds, and it keeps the reads delegated. Whether that matters depends on why a system delegates reads in the first place: permissions it cannot grant the orchestrator, or context too large to pull back. The 5 remaining successes are exactly the tasks where the source, a web page, was reachable only through the compromised agent. That is where the contract keeps its edge.
Limitations
- The mechanism is not new. By-reference passing is CaMeL; provenance-by-value is ContrAgent, single-agent. What is here is its use across sub-agent handoffs, with each value bound to the call that produced it, and a map of when that beats a simpler design.
- It needs a visible tool log. A true third-party agent runs its tools on someone else's server; we never see the raw output, and the check has nothing to compare against. The defense is for sub-agents that run in your own process but whose output you cannot trust.
- It covers copied values, not computed ones. Dates, amounts, and anything the agent derives are out of scope, about a third of state-changing arguments.
- Two assumptions are untested. The contracts were written from ground-truth call sequences, not learned, and the attacker did not know the defense. A write-then-read-back attacker, or one that plants a bad value already present in a bound source, is the obvious next adversary.
TakeawaysThree sentences
- Multi-agent. Delegation puts a model between every tool and the orchestrator. One sub-agent that reports a wrong value wins 38 of 39 times, and a stronger orchestrator does not help.
- Prompt injection. A model that names the attack still executes it about one time in five against an adaptive attacker. Detection is not safety.
- Contract. Binding critical arguments to their producing tool stops the misreport (1/50), stops direct injection in strict mode (46/60 → 2/59), and is worth its cost exactly when the only source of a value is held by an agent you cannot trust.
References and code
- Experiments, runner, and contracts: github.com/zyni2001 (repository available on request).
- MultiAgentDojo, a multi-agent extension of AgentDojo. arXiv:2610.05640.
- CaMeL: Defeating Prompt Injections by Design. arXiv:2503.18813.
- ContrAgent, runtime provenance for a single agent. arXiv:2609.18128.
- The Attacker Moves Second: adaptive attacks bypass injection defenses. arXiv:2510.09023.
Numbers are from runs on deepseek-v4.1-flash via OpenRouter; 20 tasks, 3 repeats unless noted. The strict-contract direct-injection row is 2/59 as the final run completes. This is an exploratory study; treat the figures as a map, not a leaderboard.