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 the full trade-off curve between prompt-injection resistance and task utility for LLM agent defenses — sweeping defense operating points under static and adaptive attacks to map which defenses are Pareto-efficient and which are dominated once adaptive attackers and benign-task cost are counted together.

A research project about the number defense papers don’t report: what an agent loses. Every prompt-injection defense publishes its attack-success-rate reduction; almost none publishes the complete curve of what that protection costs in task success, token overhead, and latency — and none reports that cost measured while an adaptive attacker presses on the defense. This project treats the security–utility trade-off as the primary object of study. For each defense in a representative set, the project sweeps its operating points (thresholds, checking intensity, strictness settings), measures both attack success and benign task success at every point, repeats the sweep under adaptive attack, and maps the resulting Pareto frontier: which defenses sit on the efficiency boundary, which are dominated once both axes are counted, and how the frontier itself moves when the attacker adapts.
>Defensive research on public benchmarks. All measurements run inside published evaluation harnesses (AgentDojo, InjecAgent) on synthetic tasks in isolated environments. The adaptive-attack methodology is the one documented in the peer-reviewed literature, applied only to research fixtures — never to real systems, users, or third-party services.
Defenses against prompt injection occupy a design space whose axes are security and utility. The literature evaluates the security axis at a single operating point per defense, usually against a static attack set, and treats utility as a secondary check (if it is measured at all). This creates two blind spots. First, a defense evaluated only at its strictest setting can look both safer and costlier — or both safer and cheaper — than it is across its reachable range, and single-point reporting hides which it is. Second, the adaptive-attacks literature demonstrated that static-attack evaluation flatters defenses; but the interaction is unmeasured: the utility cost a defense imposes may grow precisely where its adaptive-attack resistance collapses (for example, when strictness must be pushed to extremes to resist adaptation), which single-point, single-condition reporting cannot reveal. The research problem: the joint security–utility operating characteristic of agent defenses, under both static and adaptive attack conditions, is unmeasured — so the field cannot say which defenses are Pareto-efficient or how deployment decisions should be made.
Defense selection is currently an act of faith. A team choosing between a self-checking pipeline, a structured-input scheme, and a detection classifier has attack-success tables from different rigs, different models, and different utility accounting — no common curve, no common attacker, no way to see that Defense A blocks slightly fewer attacks while costing half the latency and none of the benign-task degradation. Pareto mapping fixes the decision: dominated defenses can be eliminated from consideration, efficient ones can be compared at matched utility budgets, and the adaptive-attack overlay shows which operating points evaporate under pressure. The result is directly usable by deployers and gives evaluation researchers a template for cost-normalized reporting that the field currently lacks.
The attack condition follows the published adaptive methodology: the attacker supplies indirect injection content through the channels the benchmarks provide (tool outputs, retrieved text) and, in the adaptive condition, knows which defense is active and may tune payloads against it within a fixed budget. The defender controls only the defense configuration — its operating parameters, not the underlying model’s weights (with the possible exception of training-time patterns applied per their published recipes). Two assumptions matter for interpretation. First, utility is measured on benchmark task distributions; production workloads with longer horizons may shift the cost axis, which is why the ablations reweight utility components rather than claim a single universal curve. Second, the adaptive attacker is budget-bounded so that every frontier point is reproducible; the measured contraction under adaptation is therefore a lower bound on real adaptive pressure. Within these bounds, the experiment answers a question neither defense vendors nor deployers can currently see: where each defense’s honest operating range lies, and what remains after an attacker presses on it.
AgentDojo established the standard harness that measures attack success and task utility for agents under programmable attacks and defenses. The adaptive-attacks work (Findings of NAACL 2025) bypassed eight indirect-injection defenses with attack success above 50%, demonstrating that static evaluation overstates robustness. StruQ demonstrated a training-time structured-query defense with strong resistance and little measured utility cost in its own evaluation. ToolSafe demonstrated a guardrail-with-feedback design explicitly motivated by preserving task flow — evidence that the field recognizes utility loss as the binding constraint but has not systematically mapped it.
Existing approaches focus primarily on security metrics at single operating points, leaving the joint operating characteristic insufficiently evaluated: no published work sweeps defense configurations to trace full security–utility curves, no work computes Pareto frontiers across defenses under a common harness and attacker budget, and no work measures how adaptive attacks reshape those frontiers. Cross-defense comparison also suffers from inconsistent utility accounting (different task sets, different overhead measurements), which this project removes by construction. Defensible statement: recent studies have demonstrated defense fragility under adaptation and individually promising cost profiles, but Pareto-level joint measurement across defenses and attack conditions remains open.
Three gaps connect directly to the project. First, curve existence: no defense has published its reachable security–utility curve, so even approximate dominance claims are impossible today. Second, cross-defense comparability: curves must be traced on one harness, one model, one task set to be comparable — which no study has done for more than two defenses. Third, adaptive reshaping: whether the frontier contracts, stretches, or reorders under adaptive attack is unknown — if strict operating points that resist adaptation also destroy utility, the practical frontier may be much thinner than static results suggest.
> What are the security–utility Pareto frontiers of a representative set of prompt-injection defenses when operating points are swept on a common harness — and how do those frontiers change when a bounded adaptive attacker is introduced?
We hypothesize that at least one widely cited defense is Pareto-dominated once its full operating range and benign-task cost are measured on a common rig, and that adaptive attack pressure will contract the frontier (fewer efficient points survive) while reordering some defense positions, with strictness-dependent defenses degrading earliest because their utility cost grows fastest as strictness rises.
The investigation is a controlled measurement campaign. (1) Defense selection. Four defenses spanning the design space: a structured-input/training-time pattern (StruQ-style), a self-check pipeline (SelfDefend-style), a detection classifier, and a guardrail-with-feedback design (ToolSafe-style). For each, identify its tunable operating parameters (strictness thresholds, check frequency, panel size, blocking mode versus flagging mode). (2) Sweep protocol. On AgentDojo with a frozen open-weights model, sweep each defense across at least five operating points; at each point measure attack success on the injected splits and task success, latency, and token overhead on the benign splits. (3) Adaptive overlay. Following the published adaptive methodology with a fixed attacker budget, repeat the sweep at each defense’s most promising points and measure how the security axis moves at unchanged utility cost. (4) Frontier analysis. Compute per-condition Pareto sets, dominance relations, and a Pareto-area metric; test the hypothesis by identifying dominated defenses and shifted points. The comparison strategy fixes harness, model, task split, and attacker budget in advance so all between-defense differences are attributable to the defenses themselves. Ablations vary the utility metric weighting (task success versus latency versus cost) to check that conclusions are not artifacts of one weighting choice.
A bounded 6–12 month version: three defenses on one harness (AgentDojo), five operating points each, static plus one adaptive-attack configuration, with the full Pareto analysis and released sweep infrastructure. This delivers the first common-rig frontier measurement for a defense subset — one focused, defensible contribution — while keeping compute within a single-GPU-plus-API budget by using an open-weights agent model and bounded sweep grids.
The doctoral program deepens the measurement into theory and practice. Adaptive co-optimization: let the attacker and the defense-selection process interact over rounds — measuring frontier evolution under an adaptive adversary with unbounded retuning, and designing defense portfolios that present convex frontiers to attackers. Cost modeling: develop a principled cost model (risk reduction per utility dollar/token) and derive deployment guidelines as an optimization problem; validate on tasks and models outside the MPhil rig. Certification: formalize what a defensible defense claim must include (frontier, conditions, attacker budget) and audit a wide defense corpus against that standard, building the field’s first cost-normalized defense registry.
Environment/dataset: AgentDojo primary; InjecAgent replication; frozen open-weights agent model. Baseline: undefended + published-default points. Proposed method: full sweep grids per defense with unified cost accounting. Attack/test conditions: static suite attacks; adaptive attacks with fixed budget at selected operating points. Control conditions: attack-free benign runs per point (utility); repeated-seed runs to bound run-to-run variance before frontiers are computed. Metrics: as above. Ablations: utility-metric reweighting; sweep-grid density sensitivity; attacker-budget sensitivity at the adaptive stage. Generalization tests: InjecAgent frontier replication; optional second agent model to test model-dependence of frontier shape.
A potential contribution includes: the first cross-defense security–utility Pareto measurement on a common harness under static and adaptive conditions; an empirical study identifying dominated defenses and frontier contraction under adaptation; and a released evaluation framework (sweep infrastructure, cost-accounting protocol, frontier analysis toolkit) that turns single-point defense reporting into curve reporting. The project does not presuppose which defenses dominate — the measurement, whichever way it lands, is the contribution.
Sweep breadth trades against compute: grids are bounded, so curves are samples rather than continuums, and narrow operating-point spacing near the frontier is not guaranteed. Reimplementation fidelity applies here as in all defense-reproduction work; wrappers are documented but absolute numbers carry implementation uncertainty (comparative claims are the robust output). The attacker is bounded by budget — frontier contraction is a lower bound on adaptive pressure. Utility is measured on benchmark tasks, whose overhead structure (short tasks, few tool calls) may understate production costs on long workflows. Model-dependence is only partially explored within MPhil scope.
All experiments run inside public benchmark harnesses on synthetic tasks in isolated environments. Adaptive-attack methodology is applied strictly per the published protocol to research fixtures; no real systems, user data, or third-party services are involved, and no operational attack tooling beyond the published suites is produced. The purpose is defensive economics — enabling deployers to choose protections honestly and researchers to report costs alongside security claims.
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 trains unsupervised models on benign agent trajectories to detect multi-step prompt-injection campaigns before the harmful action...
Ready to level up? These ideas offer more complexity:
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.