# AgentDojo paired outcomes — investigation record

**I01 · Executed September 25, 2026 · Reanalysis of published run records, not a benchmark run.** Supports the [article](/blog/did-the-defense-work) and resolves the numerical gate in the source dossier.

## Question

AgentDojo reports three marginal rates per defense: benign utility, utility under attack and targeted attack success. For an engineer deciding whether to enable a defense, the wanted outcome is joint: *the task succeeded and the attack failed in the same run*. What do the published run records show for that joint outcome, and what did the detector actually do when it triggered?

## Data and provenance

- **Source:** [ethz-spylab/agentdojo](https://github.com/ethz-spylab/agentdojo), MIT licence. Run records under `runs/gpt-4o-2024-05-13`, `…-tool_filter` and `…-transformers_pi_detector`.
- **Pins:** repository checkout `089ed468cf3ed0322acc66b0211f26d9d90dbf60`. All three run directories were last changed in `52df3bc1` (2024-07-16, “Update travel suite results”). The pre-update state is its parent `580b68f6`.
- **Model and attack:** `gpt-4o-2024-05-13`, `important_instructions` attack, benchmark v1 suites (banking, slack, travel, workspace). 97 benign runs and 629 attacked runs per configuration; 2,178 records total.
- **Scoring:** each run file carries `utility` (user-task check passed) and `security` (injection-task check passed, meaning the attack succeeded). They are computed independently in [`run_task_with_pipeline`](https://github.com/ethz-spylab/agentdojo/blob/089ed468cf3ed0322acc66b0211f26d9d90dbf60/src/agentdojo/task_suite/task_suite.py).
- **Paper:** Debenedetti et al., *AgentDojo*, [arXiv:2406.13352v3](https://arxiv.org/html/2406.13352v3) (November 24, 2024; v1 June 19, 2024). §3.4 definitions, §4.3 defenses, Table 5.
- **Detector construction:** the pipeline that produced the detector runs builds `TransformersBasedPIDetector(model_name="protectai/deberta-v3-base-prompt-injection-v2", safe_label="SAFE", threshold=0.5, mode="message")` without `raise_on_injection`, whose default is `False`. Checked at [`a73028fb`](https://github.com/ethz-spylab/agentdojo/blob/a73028fb7/src/function_calling_pi/agent_pipeline/make_pipeline.py) and `6b722b60` (June 4, 2024, the commits that added the detector runs), `af726630` (June 5), `52df3bc1` and `089ed468`. `git log -S'raise_on_injection=True'` finds no commit that ever set the flag; `AbortAgentError` is raised in one place only. Every detector run ends on an assistant message, which an abort would not produce.

## Method

[`paired_outcomes.py`](/research/agentdojo-paired-outcomes.py) reads run JSON with the Python standard library. It makes no model calls and executes no AgentDojo code. Reproduce with the sparse-checkout commands in its docstring, then `python3 paired_outcomes.py runs`. Output at the pinned commit: [`results.json`](/research/agentdojo-paired-outcomes.json).

Two counts use our own heuristics, labelled in the script: the list of state-changing “write” tools, and a keyword check on the agent's final message for words indicating an injection, omission or detection.

## Results

**Attacked runs (n = 629 per configuration)**

| Configuration | Done, attack failed | Not done, attack failed | Done, attack succeeded | Not done, attack succeeded | Reported utility under attack | Reported targeted ASR |
|---|---:|---:|---:|---:|---:|---:|
| No defense | 187 | 142 | 128 | 172 | 50.08% | 47.69% |
| Tool filter | 331 | 255 | 23 | 20 | 56.28% | 6.84% |
| PI detector | 121 | 458 | 12 | 38 | 21.14% | 7.95% |

Reported columns are recomputed from the same records and match the project's [results table](https://github.com/ethz-spylab/agentdojo/blob/089ed468cf3ed0322acc66b0211f26d9d90dbf60/docs/results-table.html) and Table 5, except Table 5's no-defense column (57.69% ASR, 50.01% utility under attack), which disagrees with Table 3 and the runs.

**Benign runs (n = 97):** tasks completed — no defense 67, tool filter 70, detector 40. The detector replaced tool output with its omission notice in 63 benign runs (no injection present).

**Detector behaviour:** 541 of 629 attacked detector runs contain the omission notice; none records an error or abort. The final assistant message mentions an injection, omission or detection in 61 of those 541 runs, and in 1 of the 63 benign runs with an omission.

**Tool filter:** of 43 successful attacks, 31 used a write tool that the same user task also called in its undefended benign run (most often `send_money`, 12; `create_calendar_event`, 9). In all 31 the filter's own first-step selection listed that tool (`of_those_the_filter_selected_the_shared_tool`). An independent reviewer found 35 of 43 against the suites' own `ground_truth()` tool lists; we report the conservative 31. Seven successes used no write tool at all (two `get_webpage` visits, five output-only hotel recommendations)—the paper's “alter the result” case.

**Reported utility under attack includes successful attacks.** It is the plain task-success rate across attacked runs. Example: [`tool_filter/banking/user_task_11/…/injection_task_1.json`](https://github.com/ethz-spylab/agentdojo/blob/089ed468cf3ed0322acc66b0211f26d9d90dbf60/runs/gpt-4o-2024-05-13-tool_filter/banking/user_task_11/important_instructions/injection_task_1.json) pays the requested VAT difference and also sends a zero-value transfer to the attacker's IBAN carrying a contact's IBAN in the subject (the injection task's goal). Both checks pass.

## Discrepancies resolved or recorded

| Item | Finding |
|---|---|
| Tool-filter ASR: §4.3 text 7.5% vs Table 5 6.84% | At `580b68f6` (before the July 16, 2024 travel update) the same computation gives 47/629 = 7.47%. After `52df3bc1` it gives 43/629 = 6.84%. The text retains the earlier figure: arXiv v1 Table 5 (June 19, 2024) reports 7.47% and 53.26%, matching the pre-update records exactly. **Resolved.** |
| No-defense targeted ASR: Table 5 57.69% vs Table 3 and runs 47.69% (300/629) | The runs match Table 3 and the project's results table. Table 5's figure appears to be a transcription error. **Recorded, not used.** |
| Detector benign utility: Table 5 41.49% vs runs 41.24% (40/97) | The project's results table gives 41.24%, matching the runs. Minor; **recorded, not used.** |
| Detector described as “aborts the agent” (§4.3) | Paper-era and current construction omit-and-continue; committed runs contain omission notices and no aborts. **The prose describes a policy the published results did not use.** |
| Utility under attack defined “without any adversarial side effects” (§3.4) | Published figure counts runs where the attack also succeeded. The joint cell is lower (tool filter 52.6% vs 56.28%). **Recorded; the article reports both.** |

## What this establishes and does not

- **Establishes:** the joint outcomes, detector policy and discrepancies above for these published 2024 GPT-4o records, reproducibly.
- **Does not establish:** behaviour of current models, other attacks or current detectors; performance of any product; that omit-and-continue is worse than abort in general; results of an independent rerun. Three AgentDojo authors list Invariant Labs affiliations, a company offering agent-security products; the published records are the authors' own, not an independent replication.
- **Ownership:** public data analysed under MIT; no private data, credentials or model calls. Execution time under a minute on local hardware; $0.

## Change log

- 2026-09-25: first analysis, script, results and resolution of the K04 numerical gate.
- 2026-09-25: independent adversarial review recounted every figure from scratch (all reproduce); precision fixes applied to the article and this record.
