Manuscript Offprint

arXiv:2610.30738

AgentTriage: Replayable Security Diagnosis Across Heterogeneous Agent Runtimes

Jie Ying, Xutao Zhang, Ningyuan Chen, Mengce Zheng, Jun Li, Zhongjie Zhu, Tiantian Zhu

Jie Ying, Xutao Zhang, Ningyuan Chen, Mengce Zheng, Jun Li, Zhongjie Zhu ∗^{*}, and Tiantian Zhu

Abstract—When tool-use agents write files, execute code, or send data, their final responses do not explain the resulting security events, and heterogeneous runtimes expose the relevant evidence through incompatible interfaces. We present AgentTriage, an executable contract for replayable security diagnosis across heterogeneous runtimes. The contract admits conclusions whose claims cite canonical runtime events and requires abstention when mandatory evidence is missing. Runtime overlays normalize native observations, while a deterministic pipeline joins invocation and result lifecycles, constructs a typed provenance graph, selects a policy-decisive slice, and binds claims to recorded evidence. Given the same normalized trace, overlay version, and pre-run policy oracle, the diagnosis can be recomputed and its claims re-checked without language-model judgment. Across five runtimes, one contract captures all 159 applicable executions, with an audit of native and synthesized identifiers. On 120 adjudicated cases, AgentTriage achieves 0.858 grounded joint diagnosis, 0.966 required-evidence coverage, and a 0.036 unsupported-claim rate, improving joint diagnosis by 0.175 (95% CI [0.092, 0.258]) over the strongest same-schema baseline. These results quantify the precision of replayable diagnosis and the observation boundaries that require abstention. We release an open-source implementation and selected sanitized evidence at https://github.com/AsnGs/agenttriage-open-source.

Index Terms—AI agent security, Security diagnosis, Provenance analysis, Runtime monitoring, Incident triage, Policy enforcement

1 INTRODUCTION

Tool-use agents turn language-model decisions into security-sensitive effects: they execute code, modify files, send data, call privileged APIs, and delegate work across agents [1], [2], [3], [4], [5], [6], [7], [8]. When one of these effects is unsafe, an operator needs more than the agent's final answer or a task-level pass/fail label. Security triage must establish which input reached the action, which arguments crossed the tool boundary, whether the action was attempted, blocked, failed, or executed, which control intervened, and which runtime events justify each conclusion. Existing safety benchmarks make end effects measurable [9], [10]; they leave the execution-level diagnosis behind those effects as a separate systems problem.

That problem becomes difficult across agent runtimes because there is no shared unit of execution evidence. Code agents expose generated programs and process results, browser agents interleave external content with planner state, checkpointed graphs create parallel branches, MCP separates requests from responses, and multi-agent systems distribute parentage across handoffs. Chronological adjacency cannot distinguish causality from concurrency, a tool request cannot establish that an effect completed, and textual overlap cannot identify which field influenced a sink argument. A useful diagnosis must normalize these differences without erasing the native boundaries that make the evidence trustworthy.

Prior work provides complementary views of agent security. Safety benchmarks measure harmful completion, vulnerability-discovery systems search for prompt-to-sink paths, and trajectory tools localize failures or responsible context [11], [12], [13], [14], [15], [16]. These lines of work ask how to diagnose. We ask a different and, for incident triage, prior question: which diagnostic conclusions can a third party independently replay? A conclusion that cannot be recomputed from recorded evidence is not auditable, however accurate it happens to be, and a method whose judgment rests on a model cannot be checked without re-running that model.

J. Ying, X. Zhang, N. Chen, M. Zheng, J. Li, and Z. Zhu are with the College of Information and Intelligence Engineering, Zhejiang Wanli University, Ningbo, China (e-mail: yingjie@zwu.edu.cn; xutaozhang@zwu.edu.cn; chenningyuan@zwu.edu.cn; mczheng@zwu.edu.cn; xxllj@zwu.edu.cn; zhongjiezhu@hotmail.com).

T. Zhu is with the College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou, China (e-mail: ttzhu@zjut.edu.cn).

*Corresponding author: Zhongjie Zhu (e-mail: zhongjiezhu@hotmail.com).

We therefore treat the diagnosis as an object with an explicit, executable contract rather than as the output of a new algorithm. The contract states what a diagnostic conclusion must contain and what evidence it must cite; when that evidence is absent, the contract requires abstention instead of a plausible completion. AgentTriage implements this contract across heterogeneous agent runtimes. Its central design decision is that judgment is not delegated to a language model. A thin overlay records events at each runtime's native boundaries; a shared deterministic layer then joins invocation/result lifecycles, normalizes policy-relevant arguments, constructs a simplified typed provenance graph (STPG), selects the policy-decisive source-to-terminal slice, and attaches canonical event identifiers to every atomic claim. Only a policy or

This work is supported in part by the following grants: National Natural Science Foundation of China under Grant No. 62002324; Zhejiang Provincial Natural Science Foundation of China under Grant No. LQ21F020016; The Fundamental Research Funds for the Provincial Universities of Zhejiang under Grant No. RF-A2023009; Key Program of Zhejiang Province Natural Science Foundation (LZ24F010004); Zhejiang Provincial "Pioneer, Leader+ X" Science and Technology Program (2026C02A1221); and The 14th China Innovation and Entrepreneurship Competition-Innovation Challenge (Ningbo).

acle fixed before execution assigns authorization, outcome, and defense semantics. Given the same normalized trace, overlay version, and oracle, the pipeline computes the same diagnosis: the diagnosis can be recomputed byte for byte and each claim re-checked against the events that support it. Determinism here means reproducibility, not completeness: anything outside the instrumented boundary never enters the result, which is why abstention is part of the contract.

This framing changes what the evaluation must establish. We evaluate AgentTriage across TaskWeaver [17], Agent Zero [18], LangGraph [19], Goose [20], and Microsoft Agent Framework [21]: five structurally different runtimes that expose code, browser, graph, MCP, and multi-agent boundaries. We first measure the observation capability of each overlay, that is, which identifiers and relations are obtained natively and which the overlay must synthesize; we then show that one contract captures all 159 applicable acquisition runs; and finally we quantify the precision that replayable diagnosis reaches. On 120 independently adjudicated cases, Full AgentTriage attains 0.858 Grounded Joint Diagnosis (GJD), 0.933 policy-outcome macro-F1, and 0.966 required-evidence coverage at an unsupported-claim rate of 0.036. Against the strongest same-schema baseline, GJD improves by 0.175 (95% CI [0.092, 0.258]). The worst-target GJD is 0.792, and every one-factor mechanism ablation yields a paired loss in GJD together with an increase in unsupported claims, indicating that the gain follows from the diagnosis architecture rather than from a richer output contract.

This paper makes four contributions:

  • We formulate replayable security diagnosis as an executable contract: a conclusion is admissible only when its lifecycle, policy result, structural fields, and mandatory claim evidence are jointly correct for the same execution, and missing evidence forces abstention. We define the contract’s operators and their observable failure modes.

  • We measure observation capability across five structurally different runtimes, separating identifiers and relations that a runtime exposes natively from those an overlay must synthesize, so that the boundary of what the contract can represent is stated rather than assumed.

  • We quantify the precision that replayable diagnosis reaches, and its cost: 0.858 GJD and 0.966 required-evidence coverage with 0.036 unsupported claims on 120 adjudicated cases.

  • We release AgentTriage under the Apache-2.0 license together with the event contract, the five runtime overlays, and sanitised evaluation evidence.

References (73)