Agent defenses outside the model: envelope labels, cross-query leak detection and consequence-aware tool gating
Three papers posted on 2026-10-26 and 2026-10-27 place agent defenses outside the model's weights: in the labels on content an agent receives, in the pattern of queries across a conversation, and in how much scrutiny each proposed tool call gets. Each finds that its defense works only under specific conditions, and states them.
Envelope labels hold only when the envelope is authentic
Update (2026-11-20): The author of The Envelope Layer posted a revised version on 2026-10-30 that adds control experiments, including an unlabeled baseline. It now reports that weak labels do reduce the semantic breach rate when the envelope is authentic, with about a quarter to a half of the benefit of strong labels, which cut the rate by 56 to 61 percentage points; this replaces the first version's finding, reported below, that weak labels are not necessarily better than no label.
The Envelope Layer: An Underestimated Surface of LLM Agent Defense returns to the envelope layer, the channel through which external content enters an agent. Earlier work had framed it as a defense surface independent of both the model layer and the agent layer but had tested it only briefly, without examining how label strength, envelope authenticity, scaffold differences or existing memories affect defense effectiveness. Following that work's GDA Measurement methodology and A/B/C/D outcome taxonomy, the paper uses the A2A-TIBA attack as its test vehicle, takes the semantic breach rate as its primary indicator with the semantic refusal rate as a complementary reference, and runs a two-by-two factorial experiment on label strength and envelope authenticity plus a separate memory experiment. The paper states that all tests ran in an isolated testbed against fictitious decoy files and that it reports no new protocol-level vulnerability, since the permission model it exploits is already public; it does not say whether the agent or model vendors were notified.
When the envelope is authentic, strong labels consistently reduce the semantic breach rate, while weak labels are not necessarily better than no label at all. When the envelope can be forged, the benefit of strong labels weakens and its direction varies across frontends. Memory has a larger effect than any label manipulation: a remembered success raises the breach rate, a remembered failure lowers it, and most combinations containing both return to the no-memory baseline. The paper therefore splits the envelope layer into two levels, an admission channel plus a context assembly surface, and argues that its security boundary is not a fixed property of labels but a dynamic outcome of label claims, frontend permissions and historical memory.
System prompt extraction shows up across queries, not within one
Detecting and Mitigating Query-Based System Prompt Leakage Attacks starts from the fact that system prompts carry task directives, safety policies and access controls, and that black-box adversaries can extract them through adaptive, multi-turn interactions that defenses assessing each query independently will miss. Its framework, AdvGuard, models relationships between queries as a bounded semantic interaction graph, statistically filters candidate components, converts them into line graphs and classifies them with a graph convolutional network, so that multi-hop patterns in query similarity separate coordinated extraction from benign workflows. A lightweight prompt-level detector provides protection before enough interaction history accumulates, and the framework supports black-box deployments.
In mixed-query evaluations, AdvGuard improves recall by up to 36% over the strongest baseline while keeping the false positive rate at or below 3.4%, and in multi-turn workloads it reaches 97.23% to 99.1% F1 with 100% recall. Leave-one-attack-family-out tests yield 99.98% mean recall and 99.99% mean F1 with no observed false positives. Integrated into the adaptive PLeak and LeakAgent attack loops, it limits exact-match leakage to 0.00 to 0.01 and substring-match leakage to 0.01 to 0.09 across the evaluated victim models.
Scrutiny allocated by consequence, not by uncertainty alone
CASEL: Consequence-Aware Selective Execution for Reliable Long-Horizon Tool-Using Agents, a six-page paper accepted at CBASE 2026, targets the runtime layer that decides what happens to each proposed tool call. Most runtime safeguards allocate scrutiny by generic uncertainty scores or coarse mutation heuristics. CASEL instead combines calibrated failure probability, state-dependent consequence, reversibility, ambiguity and evidence freshness, and for each call chooses among direct execution, verification, sandboxing, clarification, approval and abstention by minimizing a per-mode cost. The authors formalize direct execution as selective prediction and state and test the validity conditions of a finite-sample threshold and a trajectory risk ledger.
In a controlled simulation over 20 seeds with 120,000 test actions each, in which every method has the same intervention menu and compute cost, CASEL reduces harmful-side-effect trajectories from 14.75% for an uncertainty-ranked gate to 7.02%, and mean normalized harm from 0.184 to 0.123. A gate ranked by the product of failure probability and consequence reaches similar harm (5.82%, 0.120) but sends 45% more actions to human approval, removing reversibility-aware routing raises the rate to 15.53%, and a trajectory-level risk budget increases harm at equal cost (11.82%). The authors state that intervention effectiveness is assumed rather than measured, so the results rank allocation rules under the simulator's assumptions and do not establish deployment effectiveness.
Reading the three together
Each paper moves the defense to a place where the attacker's leverage is structural rather than textual. The envelope study shows that a label is only as strong as the guarantee that it was not forged, and that an agent's memory of past outcomes can outweigh any label. AdvGuard treats extraction as a property of a sequence of queries rather than of any single one. CASEL treats safety as an allocation problem over tool calls, in which what a call can change and whether it can be undone decide how much scrutiny it receives. All three also state where their results stop: forgeable envelopes erode the label benefit, AdvGuard relies on a per-prompt detector until history builds up, and CASEL's gains come from a simulator.
What to do now
For teams running tool-using agents, the papers point to four changes:
- Authenticate envelopes: Treat trust labels on incoming content as meaningful only if the envelope that carries them cannot be forged, and test label behavior under forgery for each frontend you run.
- Test with memory state: Evaluate injection defenses with prior successes and failures in memory, since in the envelope study memory moved breach rates more than any label did.
- Monitor sessions, not prompts: Score extraction attempts over the interaction history, and keep a per-prompt detector for the first turns of a session.
- Route tool calls by consequence: Weigh reversibility and state-dependent consequence when deciding whether a call executes directly, runs in a sandbox or waits for approval, and measure how many calls each rule sends to humans.
Limits
The evidence is narrow in different ways. The envelope study uses a single attack, A2A-TIBA, as its test vehicle; AdvGuard's figures come from the authors' evaluation workloads and attack loops; and CASEL's results come from a simulator in which intervention effectiveness is assumed. None of the three reports measurements from deployed agents, which would show how far each result carries.
Sources
- The Envelope Layer: An Underestimated Surface of LLM Agent Defense · arXiv · 2026-10-27
- Detecting and Mitigating Query-Based System Prompt Leakage Attacks · arXiv · 2026-10-26
- CASEL: Consequence-Aware Selective Execution for Reliable Long-Horizon Tool-Using Agents · arXiv · 2026-10-27