Stateful Cross-Session Injection: Attacks, Detection, and Session-Boundary Defenses
A research project that studies how prompt injections persist across agent sessions — building a stateful evaluation harness that measures...
A research project that measures whether prompt-injection defenses keep working when both the attack strategy and the agent architecture change — building transfer matrices across agent scaffolds on the AgentDojo benchmark to quantify which defenses generalize and which silently fail.

A research project about a question the agent-security literature keeps deferring: when a prompt-injection defense reports strong numbers in one experimental setup, does that number survive a change of agent architecture or a stronger attacker? Published defenses are usually evaluated in the scaffold their authors built, against the attack suite that was convenient, with the adaptive-attack methodology that was available at publication time. This project treats defense robustness as an empirical, measurable property and maps it: the same defenses, reimplemented across several open agent architectures, evaluated under both static and adaptive attack conditions, with the resulting transfer matrix reported honestly — including where defenses reorder, degrade, or stop mattering.
>Defensive security research on public benchmarks. Every experiment in this project runs inside published evaluation harnesses (AgentDojo, InjecAgent) against synthetic tasks in isolated environments. Nothing here touches real user systems, real credentials, or third-party services; the adversarial techniques studied are the ones already documented in the peer-reviewed literature, applied only to research fixtures.
Prompt injection — attacker-controlled text that hijacks an LLM agent’s instructions — is the most-studied failure mode of tool-using agents, and a steady stream of defenses addresses it: structured input channels, self-checking pipelines, verification steps, detection classifiers. Each defense reports strong attack-success-rate reductions in its own evaluation. Two variables are almost never varied together: the agent architecture executing the defense (a monolithic tool-calling loop, a planner-executor split, or a multi-stage scaffold) and the attack strategy (the fixed benchmark cases versus an adaptive attacker that knows the defense). The research problem is precise: defense effectiveness measured in one architecture under one attack family may not transfer to others, and nobody has systematically measured how much of the reported robustness survives the transfer.
Deployment decisions are being made from single-rig numbers. A team running a planner-executor agent reads a defense paper evaluated on a monolithic scaffold and assumes comparable protection; an attacker does not assume anything — they adapt. The adaptive-attacks result (eight indirect-prompt-injection defenses bypassed with attack success above 50%) already showed that static evaluation flatters defenses; whether the magnitude of that flattering changes with architecture is unknown. If defense rankings reorder across scaffolds, the field’s implicit assumption — that robustness is a property of the defense alone — is wrong, and evaluation practice needs architecture-aware reporting. If rankings hold, the field gains a reusable negative result that saves everyone duplicate experiments. Either outcome is publishable and useful; the current literature cannot tell you which to expect.
Recent studies have established the core building blocks. AgentDojo provides a standardized, extensible environment for evaluating prompt-injection attacks and defenses against tool-calling agents, and demonstrates that existing defenses do not fully solve the problem even in its own harness. The adaptive-attacks work then evaluated eight published defenses and bypassed all of them using attack strategies tuned to each defense’s assumptions. StruQ demonstrated that training-time structured queries substantially improve resistance with little utility cost; SelfDefend demonstrated that LLM self-checking pipelines can catch many injected instructions at inference time.
Existing approaches focus primarily on a single agent scaffold per study, leaving architecture transfer insufficiently evaluated: no published work re-runs the same defense suite across heterogeneous agent architectures under a consistent adaptive-attack methodology, and no work reports which architectural properties (tool-loop shape, planner separation, observation formatting) predict residual robustness. The interaction is also unmeasured — adaptive attacks have been tuned per defense within one rig, but the joint variation of architecture × attack strategy × defense is absent from the literature. Defensible wording of the gap: recent studies have demonstrated defense fragility within their evaluation settings, but evaluation remains limited to single-scaffold rigs, so the cross-architecture generalization of both defenses and the adaptive-attack results themselves is open.
Three questions connect these findings to this project. First, do the adaptive-attack results themselves transfer — does a defense that collapses under adaptation in a monolithic scaffold also collapse in a planner-executor scaffold, or does architectural indirection absorb some attack pressure? Second, is defense ranking stable — is the ordering by attack success rate the same across architectures, or do defenses exchange places? Third, what explains residual robustness — can measurable architectural properties (how much untrusted content reaches the planning context, whether tool results are re-summarized, how commitments are sequenced) predict which defenses degrade least? None of these is answered by the existing papers, because none of them varies the architecture.
> To what extent do prompt-injection defenses retain their effectiveness when both the attack strategy (static benchmark cases versus adaptive attacks) and the agent architecture (monolithic tool loop versus planner-executor versus re-summarizing scaffold) are varied — and which measurable architectural properties predict residual robustness?
We hypothesize that defense rankings will reorder across architectures: prompt-hardening and self-check defenses will lose more effectiveness than isolation-style defenses when untrusted content passes through additional processing stages, because each transformation stage creates new injection paths that defenses evaluated on a single rig never exercised. We further hypothesize that adaptive-attack success will vary more across architectures than static-attack success, because adaptation exploits rig-specific assumptions that architectures expose differently.
The investigation proceeds in four movements. (1) Defense re-implementation. Select four to six published defenses spanning the design space — a training-time structured-input defense (StruQ-style, evaluated via its released patterns), a self-check defense (SelfDefend-style), a detection-classifier defense, and an isolation-style baseline — and reimplement them as architecture-independent wrappers whose behavior is documented per scaffold. (2) Architecture matrix. Run the same task suites on at least three open agent architectures built over the same underlying model: a direct tool-calling loop, a planner-executor split where the planner never sees raw tool output, and a scaffold that re-summarizes observations before they re-enter context. (3) Attack conditions. Evaluate under (a) the static benchmark attacks, and (b) adaptive attacks following the published adaptive methodology — attacker knows the defense, tunes prompts per defense per architecture, with a bounded adaptation budget so results are reproducible. (4) Analysis. Produce a transfer matrix (defense × architecture × attack condition) of attack success rates and utility deltas, then regress residual robustness against architectural features (context-path length, number of transformations of untrusted content, presence of re-summarization) to test whether robustness is predictable from architecture alone. Model choices should include one open-weights model family for cost control; the model is held constant across architectures so that architecture is the manipulated variable, not model identity.
A bounded, executable 6–12 month version: reimplement three defenses across two agent architectures on the AgentDojo benchmark, evaluate under static and adaptive attack conditions with a documented adaptation budget, and deliver (a) the transfer matrix, (b) a utility-cost analysis, and (c) a reproducible evaluation kit that others can extend to further architectures. This scope produces one focused contribution — the first controlled cross-architecture robustness measurement for a defense subset — without requiring novel attack invention or multi-model scaling.
The doctoral program generalizes along three genuine axes. Adaptive generality: replace hand-tuned adaptive attacks with an automated adaptive-attack search that treats the defense-plus-architecture stack as the optimization target, testing whether the transfer conclusions hold against attack strategies no human tuned. Architecture independence: develop a characterization of defense-robustness predictors that transfers to architectures not in the training set of the analysis — a small benchmark of new scaffolds where predictions are tested blind. Certification direction: formalize what a “robustness claim” should mean for agent defenses (which variables must be held, varied, and reported for a claim to transfer), and propose an architecture-aware reporting standard, validated by auditing a wider defense corpus under it.
Environment/dataset: AgentDojo as primary suite; InjecAgent as generalization suite; one open-weights model family held constant. Baseline: undefended + published defense configurations as shipped. Proposed method: architecture-independent defense wrappers with per-scaffold integration documented. Attack/test conditions: static benchmark attacks; adaptive attacks with bounded iteration budget (e.g., fixed candidate count per cell) and frozen attacker model. Control conditions: benign task runs per cell (utility), and a no-attack control to isolate defense-induced utility loss. Metrics: as listed above. Ablations: remove re-summarization from the indirection scaffold; replace planner separation with simple prompt segregation; vary adaptation budget to test sensitivity. Generalization tests: rerun the full matrix on InjecAgent; optionally one additional open scaffold if time allows.
A potential contribution takes the form of: (a) the first controlled cross-architecture robustness transfer matrix for prompt-injection defenses, (b) an empirical study establishing whether published rankings survive rig changes, and (c) a reusable evaluation framework (wrappers, adaptation protocol, analysis scripts) that subsequent work can extend. The project does not promise that defenses will fail or succeed — it promises the first trustworthy measurement of the transfer question, with either outcome contributing to evaluation practice.
Reimplementation fidelity is the central threat: wrappers may not reproduce each paper’s exact integration, so per-cell absolute numbers carry uncertainty even though the comparative methodology is sound. The architecture set is small by necessity; findings are claims about the studied scaffolds, not about all possible agent designs. The adaptation budget bounds attacker strength — a longer-budget attacker might break defenses this study leaves standing, so results are lower bounds on attacker capability. Compute limits the model diversity; holding the model constant strengthens internal validity but weakens claims about model-dependence of transfer. Finally, AgentDojo/InjecAgent task realism is high but synthetic; production attack distributions may differ.
All experiments run inside the published benchmark harnesses against synthetic tasks in isolated environments. The adaptive-attack methodology is applied only to research fixtures — never to third-party systems, real user data, or production agents — and attack artifacts are handled as research code with responsible-release practices (no weaponized payload collections beyond what the benchmark already publishes). The project’s purpose is defensive: measuring where defenses fail so that evaluation practice and deployed systems improve. No real-world exploitation, no unauthorized access, and no instructions for attacking live systems are produced at any stage.
A research project that studies how prompt injections persist across agent sessions — building a stateful evaluation harness that measures...
A research project that measures, for the first time at registry scale, how much tool-poisoning risk actually exists across public...
A research project that measures the full trade-off curve between prompt-injection resistance and task utility for LLM agent defenses —...
Looking for something more accessible? Try these:
Published on September 12, 2026
A team of developers, researchers, and innovators who review and publish practical ideas for builders and creators.
Published on September 12, 2026
A team of developers, researchers, and innovators who review and publish practical ideas for builders and creators.