Skip to content

SAGE: Locating the Earliest Deviation from Safety Intent in LLM Agent RepairSAGE

Paper Tracker· arXiv:2610.06163· Wenji Bai, Muhammad Waseem, Zeeshan Rasheed, Jaakko Peltonen, Pekka Abrahamsson·Indexed by this site · 2026-10-07· Originally publishedEvaluation

Quick read

Analysis and theory

Based on the paper PDF (AI-generated); refer to the original

SAGE localized origins in 93 of 95 silent failures; 14/19 agent-introduced cases had origins before the write.

Questions
Patches that pass syntax and functional checks can still contain vulnerabilities, i.e., silent failures. Confirming that a patch is unsafe does not indicate the earliest round in which the repair process diverged from the task's security intent.
Methods
SAGE normalizes framework trajectories into canonical rounds, has an LLM reviewer that sees only the current prefix score four dimensions of security reasoning, reconstructs artifact history, and then uses fixed rules to select the earliest attributable divergence.
Experiments and results
Of 95 confirmed silent failures, SAGE located 93; 51 cases of unaddressed requirements, 37 cases of insufficient defenses, and 5 cases of code change defects. Of the 19 cases introduced by agents, 14 originated earlier than the write. Type consistency was higher than exact round, and trajectories retaining only the final file were the lowest.
Limitations and future work
The authors state that origin does not establish causation, and a zero score only means no relevant reasoning was recorded. The corpus is Python repair tasks, SecurityEval and CVEfixes, six frameworks and six models, and contains only cases flagged by L2 or L3 and then human-confirmed. The authors plan to extend languages and task types, and to run controlled intervention studies.
Experimental setupGPT-5.5、Claude Opus 4.8 et al. · SecurityEval、CVEfixes · 起源定位覆盖率、origin type agreement et al.
Evaluated models
GPT-5.5Claude Opus 4.8Gemini 3.1 ProDeepSeek-V4-ProKimi K3Qwen3.8-Max
Benchmarks
SecurityEvalCVEfixes
Metrics
起源定位覆盖率origin type agreementexact-turn agreementwithin-one-turn agreementCohen's κKrippendorff's αpercent agreement
AI summaryThe researchers propose Security Awareness Gap Evaluation (SAGE), a trajectory-based method that combines per-turn recorded safety reasoning assessments with reconstructed code history to locate the earliest point where an LLM Agent deviates from the task's safety intent during repair, targeting silent failures that pass syntax and functional checks but still contain vulnerabilities. The study evaluated 95 confirmed silent failures screened from 3,684 repair trajectories generated by six Agent frameworks and six base models on SecurityEval and CVEfixes, and SAGE provided an origin in 93 cases. Most origins were unaddressed safety requirements or inappropriate defense choices, with only 5 coinciding with the code change itself; when the Agent introduced vulnerable code, 14 of 19 cases had origins earlier than the write operation. Reproducibility among repeated scoring and a second judge was higher for origin types than for specific turns, and trajectories retaining only the final file had the lowest consistency.

The researchers propose Security Awareness Gap Evaluation (SAGE), a trajectory-based method that combines per-turn recorded safety reasoning assessments with reconstructed code history to locate the earliest point where an LLM Agent deviates from the task's safety intent during repair, targeting silent failures that pass syntax and functional checks but still contain vulnerabilities. The study evaluated 95 confirmed silent failures screened from 3,684 repair trajectories generated by six Agent frameworks and six base models on SecurityEval and CVEfixes, and SAGE provided an origin in 93 cases. Most origins were unaddressed safety requirements or inappropriate defense choices, with only 5 coinciding with the code change itself; when the Agent introduced vulnerable code, 14 of 19 cases had origins earlier than the write operation. Reproducibility among repeated scoring and a second judge was higher for origin types than for specific turns, and trajectories retaining only the final file had the lowest consistency.

Related events and news

1 events · 1 news mentions

News that mentions this paper

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Silent failures have no failure signal; SAGE must localize the earliest round in the trajectory that deviates from safety intent.

    Silent failures pass existing syntax and functional checks yet still contain security vulnerabilities, with no observable task-failure signal, making it hard to localize the earliest round in which the repair process diverged from security intent.

    • Where they arise: The authors state that LLM-based agents carry out repair as an iteration of planning, tool use, editing, and verification, but passing existing tests does not mean security requirements are met. The same patch can come from a missed requirement, a defense that does not close a weakness, or failure to apply an appropriate defense correctly, and can pass subsequent review.
    • Existing methods: Failure classification and attribution are developed and evaluated mainly on observable task failures, often relying on step labels or additional trajectories. Bai et al. describe silent failures by category, role, and stage, but without systematic rules for localizing the earliest origin round, and without evaluating whether assignments are consistent across scoring and across reviewers.
    • Core observation: The authors define origin as the earliest round in the recorded reasoning or artifact history where divergence from the task's security intent becomes visible, and separate it from the introduced write and later missed-detection opportunities. Figure 1 illustrates that both can differ from the code change itself.
    • This paper's approach: The authors propose SAGE (Security Awareness Gap Evaluation): normalize trajectories into canonical rounds, use prefix-only, quotation-anchored security reasoning scores, combine with reconstructed artifact history and explicit rules, and mark the earliest attributable divergence.
  2. What related research exists?

    Attribution methods often rely on visible failures or additional trajectories; the authors place this paper on a single trajectory that has passed checks.

    Section 2 of the paper discusses related work in four groups. The experimental tasks come from SecurityEval and CVEfixes; the paper does not run the attribution methods below as experimental baselines.

    LLM-generated code and agent repair

    • Empirical results and data: The paper surveys security weaknesses in LLM-generated code, and limitations in LLM vulnerability detection and reasoning, and lists SecurityEval, LLMSecEval, CVEfixes, and BaxBench for vulnerability prompting, historical fixes, and exploit-based testing.
    • Repair and scoring: The paper states that zero-shot and neural repair remain limited on real vulnerabilities, and attention has turned to agents that iterate over localization, editing, and verification. Such runs are often scored by whether tests pass, but patches that pass tests can still be incorrect, and non-agent pipelines can also achieve competitive scores.
    • Relation to this paper: The authors state these works motivate evaluating beyond final tests, but do not explain where in the trajectory a security failure first becomes attributable.

    Silent failures

    • Bai et al. (2026): Define patches that pass syntax and functional checks but still retain or introduce vulnerabilities as silent failures, and classify them by category, agent role, and workflow stage.
    • Difference: The authors state that work has no systematic method for round-level localization, and does not evaluate whether origin assignments are consistent across multiple scorings and different reviewers. This paper separates origin round, code origin, introduced write, and later missed-detection opportunities.

    Failure analysis and attribution

    • Classification and diagnosis: Cemri et al. (2025) characterize failures by system design, inter-agent mismatch, and task verification; Bouzenia and Pradel (2025) link failed runs to repetitive, non-adaptive action loops; AgentDebug classifies errors by module and diagnoses root causes to guide recovery.
    • Step attribution: Zhang et al. (2025) do LLM-based attribution when task failures are observable and step labels exist. AgenTracer trains a tracer on trajectories constructed from counterfactual replays and fault injection. FAMAS ranks by spectral analysis across multiple executions, which may be unavailable when auditing a single trajectory. DuoTrace learns routine patterns from normal trajectories and filters anomalous steps, but its anomaly scores are not designed to connect steps to patches that passed functional checks and whose security defect has been confirmed.
    • Evidence conditions: The paper states that attribution accuracy depends on evidence completeness and remains limited on long trajectories. The authors contrast SAGE with this: within a single trajectory where functional checks have passed, ask where the divergence from security intent first becomes attributable.

    LLMs as reviewers

    • Known variability: LLM reviewers are used to evaluate generated code and software agents; agreement with humans varies by task, and verdicts vary with prompt phrasing and answer position.
    • Relevance to this paper: The authors state this is directly relevant to SAGE, because origin localization uses reviewer assignments of expressed security reasoning, so no single judgment is treated as ground truth.

    The authors frame this paper's position relative to recent work in three points: it analyzes single repairs that passed syntax and functional checks but were independently confirmed to contain security defects; it uses failure anchors, prefix scoring, and artifact history under systematic rules to find the earliest attributable divergence, thereby separating origin from code origin and introduced write, and can assign origins for inherited vulnerabilities; reliability comes from repeated scoring, cross-review, task-disjoint resampling, and human annotation, each covering different outputs.

  3. How does the paper address this problem?

    SAGE uses prefix scoring, artifact history, and fixed rules to flag the earliest attributable safety intent deviation.

    SAGE has three stages: build a corpus of confirmed silent failures, score canonical rounds and localize origins, then assess from multiple sources whether localization outputs are consistent (Figure 2).

    Corpus and trajectories

    • Sampling: After language and format filtering, SecurityEval and CVEfixes have 1,236 eligible tasks (121 and 1,115). Stratified by CWE family with a fixed random seed, 150 were drawn proportionally within each dataset, 75 per set. The seed value is not given in the paper. SecurityEval uses the code in the prompt as the input file; CVEfixes provides the vulnerable version, and the repair description names the target CVE and CWE.
    • Execution configuration: Six open-source frameworks (Table 1), each paired with six base models, for 36 configurations total. Where supported, temperature 1.0 and a 600-second timeout; the isolated environment has 5 CPU cores, 16 GB memory, 512 GB storage. Task content is unchanged, only adapted to each framework's input format. Each configuration runs once per task.
    • Confirmation: L0 is parseability. L1 requires imports to parse, functions and classes in the input to be preserved, and tests to pass if present; SecurityEval has no test suite, so only the first two are used. L2 uses Bandit; findings mapped to a CWE, with high-severity findings flagged. L3 computes a rule score R for the patch, ranging 0 to 100: controllable input sources weight 2–4, sinks such as dynamic execution or insecure deserialization 6–12; when the same patch has a source, sinks are multiplied by 1.5, and when a sink matches the task CWE, by 1.3; 10 is added if the target weakness pattern remains, and 2 is subtracted per detected defense category, up to 10. For multi-file patches, the highest file score is taken, and R at least 15 is flagged. Thresholds follow prior work; because all candidates undergo human review, the authors state the thresholds set screening sensitivity. Candidates are those passing L0 and L1 and flagged by L2 or L3.
    • Human review and normalization: TP preserves or introduces a clear vulnerability relevant to the task; Partial has a relevant mitigation attempt but a still-plausible vulnerability; FP is excluded. TP and Partial enter the corpus. Failure anchors record the affected artifact and the confirmed defect (missing defense, insufficient defense, or a vulnerability introduced by the change), without origin labels. Each framework's logs are normalized into canonical rounds: one agent message, plus associated tool calls, tool results, and artifact changes.

    Round scoring

    The primary reviewer is GPT-5.6 Sol, chosen because it is not among the evaluated base models, avoiding trajectories being scored by the model that generated them. Each round is scored once in trajectory order, given only the task context and the prefix up to that round; later rounds, multi-layer validation results, and confirmation labels are withheld.

    • Four dimensions and scale: Threat recognition (TR), defense intent (DI), verification rigor (VR), scope awareness (SA), each 0–3 (Table 4). 0 is unrelated to security, 1 is generic security language, 2 is task-specific, 3 is task-specific and addresses completeness or conditions for a defense to hold.
    • Two auxiliary labels: Applicability separates substantive planning, implementation, review, and verification from administrative events such as environment setup and tool polling. Security opportunity indicates whether the round is doing or reviewing work substantively related to the security intent—decisions, code paths, or artifacts; it is labeled only from the task context and prefix, without looking at the confirmed defect.
    • Anchoring: Every nonzero score must include a verbatim quotation linked to the canonical entry, and hence to the original trajectory. Applicable rounds with no security reasoning score 0. Only formatting, file bookkeeping, and framework handshakes are excluded.

    Origin rules

    Localization uses failure anchors, reconstructed artifact history, and per-round scores. The origin is the earliest round where existing evidence indicates failure to meet the task's security intent, and which connects to the confirmed defect under the following rules. The authors state this is an attributable divergence; inherited vulnerabilities need not have an introduced write.

    1. Code origin: Using the original vulnerable artifact as baseline, compare with snapshots after each write. If the anchor fragment is not in the baseline and appears in a later snapshot, it was introduced by the agent, including new weaknesses, insufficient mitigations, and removal or weakening of existing defenses. If already in the original code and not eliminated by later writes, it is inherited.
    2. Introduced write: From artifact history only. When agent-introduced, take the earliest write where the vulnerability appears and persists to the final snapshot; if eliminated in between and restored, take the restoring write. Inherited vulnerabilities have no introduced write.
    3. Candidate (i) insufficient defense: Before the introduced write, or before delivery of the fix for inherited vulnerabilities, the earliest round that expressed a defense connected to the anchor, indicated by nonzero DI. The score only records that a defense was expressed; because human review confirmed the delivered patch still contains the defect, that defense is treated as insufficient.
    4. Candidate (ii) unaddressed requirement: The first round where the agent had an opportunity to address the security intent but had neither TR nor DI; this can be the introduced write itself.
    5. Candidate (iii) code-change defect: Only when (i) and (ii) do not hold, select the introduced write, in which case the write round itself has TR or DI. Not applicable to inherited vulnerabilities.

    The rules take the earliest applicable round. The origin type records which candidate was selected; the origin round can precede the introduced write. Implementation or review rounds after the origin with VR or SA at most 1 are marked as missed-detection opportunities, reported separately, and not selected as the origin. 0 or 1 means no relevant verification or scope reasoning, or only generic statements; 2 requires task-specific reasoning.

    The result is Localized or Undetermined. For undetermined cases, the reason is recorded: no candidate connects to the confirmed defect, or scoring failure made required scores unavailable. Origin and introduced write do not depend on scores, and both results are reported. Automated checks verify that fragment history is consistent with origin and that the origin is not later than the introduced write. Fragment matching only localizes code; the vulnerability itself is confirmed by human review.

    How consistency evaluation is designed

    Repeated scoring and cross-review comparisons cover reviewer-dependent origin type and round; human annotation and task-disjoint resampling cover artifact-derived origin and introduced write. Humans do not annotate origin type or round. R1 annotates all confirmed cases, R2 a stratified subset; neither sees SAGE scores or automated localization, and both use the same anchors and reconstructed history as SAGE. R1 participated in corpus construction and rule design; R2 did not. The second reviewer is Claude Opus 5, using the same rubric, prompt, and prefix context as the primary reviewer, and cannot see the primary scores, human annotations, or localization results.

  4. What experiments did the paper conduct?

    Localized 93 of 95 cases; origins were mostly unaddressed requirements or insufficient defense, with type more consistent than exact round.

    Experimental setup

    • Trajectory sources: The six frameworks are CAMEL, AG2, Deep Agents, Aider, MiniSWE-Agent, OpenHands; the six base models are GPT-5.5, Claude Opus 4.8, Gemini 3.1 Pro, DeepSeek-V4-Pro, Kimi K3, Qwen3.8-Max. Each of the 36 configurations is run once, for a total of 5,400 runs.
    • Screening funnel: After excluding crashes, timeouts, and incomplete generations, 3,684 trajectories (68.22%) enter validation, with 331 silent failure candidates (Table 2). CAMEL accounts for 292 of the 509 L0/L1 failures, of which 241 fail L1, mostly because delivered files omit functions or classes from the input.
    • Confirmed corpus: R1 reviews all candidates, R2 independently reviews a random 60 cases. The three-way classification observation agreement is 0.88, Cohen's κ is 0.73, and Gwet's AC1 is 0.85 (Table 3). For the binary classification of whether to include in the corpus, 54/60 agree (90.00%, κ=0.74). Disagreements are resolved through discussion. The confirmed corpus is 95 cases across 19 tasks: 87 from CVEfixes (15 tasks) and 8 from SecurityEval (4 tasks). The largest task is server-side request forgery repair on CVEfixes, accounting for 16 cases.
    • Scoring protocol: GPT-5.6 Sol scores all 95 cases once; a stratified random 60 cases (across all frameworks and covering different reconstruction conditions) are scored twice more. Claude Opus 5 independently scores the same 60 cases.
    • Human reference: R1 labels code origin and introduction write for all 95 cases (a specific write, no introduction write, or undeterminable), and R2 labels 60 of them. Metrics are percentage agreement, Cohen's κ, Krippendorff's α, and exact-round and ±1-round agreement.
    • Group comparisons: The authors state that the confirmed failure subsets differ in task, vulnerability, and trajectory composition, so cross-group comparisons are descriptive; estimates for CAMEL (n=4), OpenHands (n=9), Kimi K3 (n=5), and Qwen3.8-Max (n=1) should be interpreted with caution.

    Main results

    Per Table 5. Percentages are the authors' reported numbers.

    Swipe horizontally to read the table

    CategoryCasesPercentageSource
    Inherited from input files7376.84%Table 5(a)
    Introduced by agent1920.00%Table 5(a)
    Unaddressed security requirement5153.68%Table 5(b)
    Insufficient defense selected3738.95%Table 5(b)
    Defect in code change55.26%Table 5(b)
    Origin precedes introduction write14/1973.68%Table 5(c)
    • Authors' interpretation: Artifact history supports code origin and introduction write; reasoning traces support attributing origin to unaddressed requirements or insufficient defenses. The authors argue that attributable deviations can become observable before subsequent code edits. Cases coinciding with the introduction write are all single-message Aider trajectories with no earlier rounds; the rule restricts candidates to the introduction write or earlier rounds, so this ordering holds by construction.
    • When there is no introduction write: 74/76 cases are still assigned an origin (97.37%), including inherited vulnerabilities and cases with no identifiable code location. Cases with no identifiable code location are 3/95 (3.16%). Another 2 cases are undetermined (2.11%): 1 inherited and 1 with no code location, both because no candidate could be linked to the confirmed defect. The remaining 2 cases with no code location are labeled as unaddressed requirements based only on planning and dialogue.
    • Missed detection opportunities: 59/95 cases at least once (62.11%). By framework: AG2 29/32, Deep Agents 13/13, MiniSWE-Agent 11/15, OpenHands 4/9, CAMEL 2/4; Aider's 22 cases are all 0 because single-message trajectories have no rounds after the origin. Although AG2 has a security reviewer, 28 of its 32 cases still have reviewer rounds flagged. The authors state that the overall proportion largely reflects the framework composition of the corpus; the flag indicates recorded VR or SA is low, not that detection would have succeeded. In Figure 4(a), inherited vulnerabilities account for 41/51 (80.39%) of unaddressed-requirement origins and 31/37 (83.78%) of insufficient-defense origins. The horizontal axis of Figure 4(b) is the canonical number of rounds from origin to introduction write, scaled to 25; the text does not give per-point distances.

    Repeated scoring and cross-review

    Comparisons use the same stratified random 60 cases. Agreement is computed only on cases where all compared scorings localize; α uses cases with at least two scorings (Table 6(a)).

    Swipe horizontally to read the table

    ComparisonnType agreementExact round±1 round
    Primary reviewer three times5796.49%87.72%91.23%
    Two reviewers5092.00%78.00%84.00%
    Four scorings combined4889.58%75.00%81.25%
    • Type is more stable than round: Across three scorings, 57/60 cases are localized every time (95.00%). For this set, type α is 0.96 and round α is 0.82. The two reviewers jointly localize 50/60 cases (83.33%), with type α of 0.86 and round α of 0.59. For four scorings, type α is 0.92 and round α is 0.74. ±1 round recovers only part of the disagreement; the authors state some disagreements span more than adjacent rounds.
    • Dimension scores: In Figure 5(a), for the same reviewer across three scorings, ordinal α is reported by the authors as 0.89 to 0.95 (in the figure: TR 0.93, DI 0.95, VR 0.93, SA 0.89, n=57). For two reviewers, it is TR 0.76, DI 0.86, VR 0.68, SA 0.68 (n=50). The authors state that VR and SA also determine missed-detection flags, so that flag may be sensitive to reviewer choice. In Figure 5(b), the proportion of jointly localized cases where the two reviewers' scores differ by at most 1 point is reported by the authors as 90.00%–96.00%.
    • Authors' interpretation: The type of recorded deviation is reproduced more often than its exact location; cross-reviewer gaps are larger than same-reviewer repeated scorings.

    Human reference and task composition

    Per Table 6(c). Introduction write labels are a specific write, no introduction write, or undeterminable.

    Swipe horizontally to read the table

    ComparisonnOrigin agreementOrigin κIntroduction write agreementIntroduction write κ
    R1 vs R26090.00%0.7875.00%0.58
    SAGE vs R16088.33%0.7485.00%0.70
    SAGE vs R26085.00%0.6678.33%0.62
    SAGE vs R19584.21%0.6281.05%0.58
    • Consensus subset: When annotators reach consensus, SAGE matches their labels for origin in 49/54 cases (90.74%) and introduction write in 44/45 (97.78%). The authors state that judging inherited versus introduced is more reproducible than determining the introduction write.
    • Task composition: Across disjoint partitions of the 1,000 tasks, the median origin agreement with R1 is 84.21%, with central 95% of 74.42%–96.88%; introduction write median is 81.06%, with central 95% of 69.39%–93.33% (Table 6(b)). After excluding tasks one by one, origin ranges from 82.56% to 89.87% and introduction write from 79.07% to 87.34%. Both highs occur after excluding the task with the most cases (16/95); that task accounts for 7/15 origin disagreements and 8/18 introduction write disagreements. The authors state that subset estimates vary with task composition, but no single task inflates the overall estimate.
    • Authors' interpretation: Agreement with annotators describes whether artifact history matches human reading; repeated scoring describes whether outputs dependent on reviewers are stable. The authors consider these not interchangeable.

    Defect types, frameworks, and reconstruction conditions

    The groupings in Figure 6(a) are based on human-confirmed delivered code: missing defense, insufficient defense, or change-introduced vulnerability. The authors state this differs from the origin types in Section 4.1.

    • By defect: For missing defense (n=64), SAGE agrees with R1 on both origin and introduction write in 60/64 cases (93.75%). For insufficient defense (n=26), it is 16/26 (61.54%) for origin and 14/26 (53.85%) for introduction write. The authors state that the high agreement for missing defense largely stems from its inherited origin, with no introduction write within the observed trajectory. For insufficient-defense cases localized all three times, the origin round is identical in 16/16; among missing-defense cases, 6 have changed rounds. The change-introduced vulnerability group has n=5, and the text does not report the proportion relative to R1.
    • By framework: In Table 7(a), AG2 (n=32) has 28/32 (87.50%) for both metrics, and Aider (n=22) has 18/22 (81.82%) for both. MiniSWE-Agent (n=15) has origin 13/15 (86.67%), higher than introduction write 11/15 (73.33%). Deep Agents (n=13) has 9/13 (69.23%) for both. AG2 has reviewer rounds flagged as missed-detection opportunities in 28/32 cases; the 22 single-message Aider cases have no rounds after the origin. The authors state that the trajectory structure of frameworks affects the evidence available for localization.
    • By reconstruction condition: final-only has no intermediate code states. Introduction write agreement with R1 is 4/7 (57.14%) for final-only, 16/22 (72.73%) for per-write, and 57/66 (86.36%) for single-write. Exact-round agreement on jointly localized cases is 2/4 (50.00%) for repeated scoring and 1/4 (25.00%) for cross-review under final-only; for single-write it is 36/39 (92.31%) and 30/33 (90.91%). The authors argue that without intermediate snapshots, the write introducing a vulnerability fragment cannot be determined from artifact history, and the rule uses this write to bound origin candidates. per-write remains lower than single-write across the three comparisons; the authors suggest part of the difference may come from the number of writes, not just missing states. The final-only group is small (n=7 for human comparison), but the direction is consistent across evidence sources.

    Other ablations and analyses

    • Gemini 3.1 Pro (n=28): origin 27/28 (96.43%), introduction write 25/28 (89.29%) (Table 7(b)). The authors state this is the highest human agreement among the larger groups.
    • DeepSeek-V4-Pro (n=24): origin 22/24 (91.67%), introduction write 21/24 (87.50%).
    • Claude Opus 4.8 (n=21): 16/21 (76.19%) for both metrics.
    • GPT-5.5 (n=16): 10/16 (62.50%) for both; the 10 cases localized all three times have identical origin rounds.
    • Kimi K3 (n=5): 5/5 (100.00%) for both. The authors state this group's estimates should be interpreted with caution.
    • Qwen3.8-Max (n=1): 0 (0.00%) for both. The authors state this group's estimates should be interpreted with caution.
  5. What are some points that can be further explored?

    The authors state that attribution does not establish causation, and the effects of language, task, and intervention are not established in this paper.

    Limitations and future directions noted by the authors

    • Construction: The origin round is the earliest observable, attributable divergence under SAGE's rules. It does not establish that the selected round caused the vulnerability, nor that intervening there would have prevented it; incomplete records may conceal earlier divergences (Section 5.2).
    • Meaning of scores: A score of zero means no relevant reasoning was recorded, not that the agent had none. Missed-detection opportunities only mark subsequent low-scoring rounds, not that detection would have succeeded. Human review covers only artifact-derived outputs; origin type and round are assessed only through repeated scoring and cross-review, measuring consistency rather than correctness (Section 5.2).
    • The human reference itself: Annotators' kappa on introduced writes was 0.58, below the source's 0.78. The authors therefore report separately with each annotator and treat consensus-subset results as conditional (Section 5.2).
    • Review: Prefix scoring, verbatim quotations, three runs of the primary reviewer, a second reviewer from another model family, and comparison with two annotators who did not see SAGE outputs reduce but cannot eliminate threats. The two reviewers jointly localized 50/60 cases, with exact-round agreement of 78.00%. Shared biases between the two reviewers, biases from the rubric, and model-family overlap of the primary reviewer with GPT-5.5 and the second reviewer with Claude Opus 4.8, the authors state, cannot be excluded. Annotators and SAGE use the same reconstructed history, so shared reconstruction errors may inflate agreement; R1 participated in corpus construction and rule design. Confirmed cases concentrate in a few tasks (Section 5.2).
    • Extrapolation: The evaluation covers Python repair tasks on two security benchmarks, six frameworks, and six base models; the authors state it may not generalize to other languages, task types, or deployment settings. Patches not flagged by static analysis or exploitability screening do not enter human review. Cross-framework and cross-model differences are descriptive and do not estimate framework- or model-level effects. Groups with fewer than ten cases are especially uncertain, and the authors state this also qualifies the Section 5.1 inference about retaining intermediate artifacts (Section 5.2).
    • Future work: The authors plan to extend the analysis to other programming languages and task types, and to use controlled studies to test whether placing guardrails at the localized origin can prevent silent failures (Section 6). Whether explicit security-requirement checks during review rounds can reduce silent failures, and at what cost, the authors state remains to be evaluated; origin assignment can suggest intervention hypotheses, but whether it prevents silent failures requires controlled studies beyond this observational analysis (Section 5.1).

    Experimental coverage

    • Corpus: 95 confirmed silent failures across 19 tasks, of which CVEfixes 87 (15 tasks) and SecurityEval 8 (4 tasks), with the largest task having 16 cases. Trajectories come from 6 frameworks and 6 base models, one run per configuration per task; 3,684 valid trajectories from 5,400 runs entered validation (Section 3.2, Table 2).
    • Screening: Candidates passed L0, L1, L2 (Bandit), and L3 (R at least 15), then human confirmation; 331 silent-failure candidates (Section 3.2.4–3.2.5).
    • Review and annotation: GPT-5.6 Sol scored 95 cases and rescored 60 twice; Claude Opus 5 scored the same 60. R1 annotated code origin and introduced writes for 95 cases, R2 for 60. Origin type and origin round had no human annotation (Section 3.3–3.4).
    • Robustness design: 1,000 task-disjoint partitions, and leave-one-task-out. Grouped reporting covers confirmed defect types, frameworks, base models, and reconstruction conditions single-write, per-write, final-only (Section 3.4, Section 4.3).
    • Comparisons: The paper does not report results of running the attribution methods discussed in Section 2—AgentDebug, AgenTracer, FAMAS, DuoTrace, or Zhang et al.—on this corpus.
  6. Summarize the main content of the paper

    SAGE localizes the earliest divergence of silent failures on repair trajectories that have passed checks; type is more stable than round.

    SAGE localizes the earliest attributable divergence from security intent on agent repair trajectories that passed syntax and functional checks but still contain confirmed security defects.

    • Problem: The authors argue that passing tests cannot answer whether security requirements are met. The same insecure patch can come from a planning omission, insufficient defense, or implementation deviation; looking only at the final patch or the introduced write cannot localize the earliest round in which the process diverged.
    • Approach: Trajectories from each framework are normalized into canonical rounds. GPT-5.6 Sol, seeing only the prefix up to the current round, scores TR, DI, VR, SA from 0–3; nonzero scores must have verbatim quotations linked to the original trajectory. Fixed rules combine failure anchors, artifact history, and scores, taking the earliest applicable among insufficient defense, unaddressed requirement, and code-change defect. Implementation or review rounds after the origin with VR or SA at most 1 are additionally marked as missed-detection opportunities.
    • Corpus: Six frameworks and six base models on SecurityEval and CVEfixes, 5,400 runs total, 3,684 valid trajectories, 331 candidates, 95 confirmed cases across 19 tasks.
    • Origins: SAGE localized 93/95 cases (97.89%). Types: unaddressed requirement 51 (53.68%), insufficient defense 37 (38.95%), code-change defect 5 (5.26%), 2 undetermined. 73 inherited from input files. Of the 19 cases where the agent introduced the vulnerability, 14 had origins before the write. 59 cases had at least one missed-detection opportunity marked.
    • Consistency: Among 57 cases localized in all three primary-reviewer runs, type agreed 96.49% and exact round 87.72%. Among 50 cases localized by both reviewers, the corresponding figures were 92.00% and 78.00%. Origin agreement with human annotators was higher than introduced-write labels and varied with task partitioning. final-only trajectories had the lowest time or write agreement in three comparisons. The authors state that repeated stability can coexist with disagreement from the human reference, the GPT-5.5 group being one example.
    • Authors' conclusions: Final-patch inspection can indicate that a repair is insecure but cannot indicate where the process first diverged. Origin type and exact round should be reported separately, and reviewer consistency and human agreement also cover different outputs. The authors plan to extend to other languages and task types, and to use controlled studies to test whether adding guardrails at the localized origin can prevent silent failures.
Read originalarxiv.org