About Experience Open Source Notes

PreprintVersion v1 · 5 October 2026

AgentECC: Repairing Hijacked Agent Actions Wherever the Environment Keeps a Witness

Jicheng Wang1, Zili Wang1, Chu Lin, Xianzhong Ding2, Jiachen Liu3, Yifeng He1, Hao Chen4

1University of California, Davis2University of California, Merced3ARA Lab4University of Hong Kong

This is a preprint and has not been peer reviewed. DOI: 10.6084/m9.figshare.34932510.

Abstract

Tool-using agents act on data they do not control. A line planted in an email or a file can redirect a payment while the rest of the task runs as asked. An execution guard can refuse the call, but stopping the payment does not recover its intended payee. A person may have to finish the task, and that handoff cost is much of why agents are not left to run unattended. We treat the injected value as corrupted data, with two recovery paths. When an independent, protected record determines the value the authorized action needs, the guard restores it without human involvement. When no record determines it, one scoped question about that field can obtain the missing value from an authorized source. AgentECC is a runtime guard with both responses, refusing when neither is available. Before deployment, an agent reads each tool's schema and writes a contract naming which arguments carry consequences and which trusted sources hold their copies; a linter admits or rejects each entry. At runtime a deterministic check compares each guarded argument with those sources, without a model judging safety. We state when each response is sound and measure its environmental coverage before attacks. On AgentDojo's rent tasks, with the same amount-scoped question channel, AgentECC keeps 13 of 20 runs under injection against refusal's 5 on GPT-4o, 14 against 7 on GPT-5.5, and 10 against 1 on Qwen3.5-9B, with no successful attacks in these cohorts. Evaluated adaptive searches find no injection that passes its check. Given the same power to ask about every contested field, refusal still keeps 5 of 20 on GPT-4o, and asks more questions to do it. Refusal need not be the endpoint: a deployment can make more actions recoverable by engineering the records and authorized answer channels their fields need.

Contributions

  1. The identifiability condition for sound correction, and the local boundary that an allow/deny check cannot restore an already-corrupted field (Section 3).
  2. AgentECC, a guard that implements correction from committed evidence and retransmission through a scoped question (Section 4).
  3. An evaluation on AgentDojo, ADI, τ²-bench and AppWorld with four agents. Controlled comparisons hold the witness check and question channel fixed to isolate the response to a failed check, where records suffice, questions help, or neither route exists (Section 5).

Figures

Diagram of one payment action whose recipient is restored from a committed record and whose changed amount is supplied by a scoped answer before execution.
Figure 1. One action can require both correction and new authorization. The committed record determines the recipient, but not the changed rent. A scoped answer supplies the missing amount; execution waits until both fields are resolved. Account values and symbols are illustrative.
Two-part diagram: offline schema and provider checks admit a frozen contract; at runtime evidence is bound to each field, which is kept, corrected or queried.
Figure 3. Contracts define source rules; witnesses supply values. (A) Schema and provider checks admit a frozen contract with recipient-restoration and amount-confirmation rules. (B) Runtime binds evidence to the operation, field and object, then keeps, corrects or queries each field. Execution requires every guarded field to resolve.
Bar chart of AgentDojo rent tasks kept out of 20 under no defense, block plus ask, PACT-style, CaMeL-style and AgentECC plus ask, for GPT-4o, GPT-5.5 and Qwen3.5-9B, with successful attack counts below each bar.
Figure 4. Repair keeps more rent tasks than refusal at zero observed attacks. Four tasks, five replicates; both guards may ask about the amount.

Figures are reproduced from the 35-page manuscript; see the PDF for all figures and tables.

Citation

@misc{wang2026agentecc,
  title        = {{AgentECC: Repairing Hijacked Agent Actions Wherever the Environment Keeps a Witness}},
  author       = {Jicheng Wang and Zili Wang and Chu Lin and Xianzhong Ding and Jiachen Liu and Yifeng He and Hao Chen},
  year         = {2026},
  note         = {Preprint, version v1},
  doi          = {10.6084/m9.figshare.34932510},
  howpublished = {\url{https://jeremyjc67.github.io/papers/agentecc/}}
}

Versions

VersionManuscript dateFilesIdentifier
v15 Oct 2026PDF · HTML10.6084/m9.figshare.34932510.v1