Editor’s introduction
The study focuses on technical trustworthiness in code review comments, measuring whether AI can determine if a comment’s claims are factually correct and contextually applicable within a codebase. Researchers introduced CRJudgeBench, a dataset of 1,199 real pull request comments, half verified as trustworthy and half as untrustworthy, to evaluate AI agents’ ability to judge technical accuracy. The benchmark includes both plausible but incorrect comments and accurate ones, highlighting a gap in prior work that focused on comment generation rather than validation. Sentinel, an agentic judge trained through iterative learning, achieved 76.60% accuracy on a 359-instance test set, outperforming baseline models. This demonstrates that even advanced LLMs struggle with technical trustworthiness, especially when comments are plausible but factually flawed. The results suggest that current AI agents lack robust mechanisms to verify claims against actual code context, indicating a need for more sophisticated, repository-grounded evaluation methods in code review automation.
Introduction
Coding agents such as Claude Code and Codex are rapidly changing how software is produced and have been adopted by more and more software practioners. Their usage has transitioned from short code completions toward repo-level end-to-end agentic development workflows. While coding agents increase the efficiency of various software development and maintenance activities through automated code reasoning and generation, the generated code still needs to be reviewed and verified to ensure it meets quality criteria. Moreover, the large volume of agent-generated code can overwhelm human reviewers that leads to degraded review reliability. Scaling AI-assisted development therefore requires reliable, scalable review mechanisms alongside stronger coding agents.
This need has motivated increasing interest in automated code review, including Large Lanuage Model (LLM)-based agents that inspect code patches (i.e., in pull requests) and automatically generate review comments. Recent benchmarks such as c-CRAB and CR-Bench evaluated the ability of such agents to accurately detect quality issues in code patches and generate review comments. However, existing review agents collectively identify only around 40% of issues identified by humans and provide numerous false alarms. A recent study of 31,073 CodeRabbit review–feedback pairs across 239 GitHub repositories found that developers rejected 56.3% of agent-generated reviews, mainly because of false alarms, redundant or out-of-scope suggestions, and misalignment with developer intent, showing that a plausible review comment may still be a false alarm and may not be technically correct given the software context. Thus, whether agent-generated review comments can be trusted becomes crucial.
Despite the importance of review comment trustworthiness, existing evaluation frameworks have not directly tackled this aspect. Earlier approaches evaluate general properties of review comments. EvaCRC models attributes such as evaluation, suggestion, question, and emotion, but takes only the comment text as input without the code change or repository context, which can introduce noise and bias. CRScore provides reference-free measurements of conciseness, comprehensiveness, and relevance by grounding evaluation in code claims and potential issues. However, they use semantic matching for evaluation, which does not directly verify whether a comment’s technical claim is correct and trustworthy. These evaluations are valuable for measuring surface-level review quality and agent capability, but they leave an important aspect underexplored: given a specific review comment, is its technical judgment actually correct for the code patch and grounded in the repository context to which it refers? A comment can be fluent, relevant, detailed, and actionable while still making an incorrect claim about program behavior. Conversely, whether an apparently reasonable claim is correct may depend on context such as code and documents outside the code patches, such as callers, guards, definitions, or tests elsewhere in the repository. Existing methods lack the ability to use various repository-wide software context when evaluating the trustworthiness of a review comment.
Repository and Pull Request Selection
To construct CRJudgeBench, we target open-source projects mainly written in Python on Github, since Python has become one of the most widely used programming languages in software development. We select projects through a series of automated filtering steps and manual examination. First, we collect top 1,000 Python repositories ranked by GitHub star count to ensure we target widely used and popular projects. Second, we aim to retain projects with active maintenance activities. To do so, we only keep the ones with more than 1,500 PRs in total and having at least one commit or PR recorded between August 15, 2024 and August 15, 2025. Then, we proceed to gather PRs of these projects.
We next use an LLM to assist in auditing these 106,241 PRs for dataset inclusion. The screening criteria exclude PRs with descriptions that lack substantive technical content or cannot be meaningfully interpreted, such as simple expressions of agreement, formatting-only suggestions, and references whose meaning cannot be resolved using the available context, such as the code patch, PR description/discussion, and linked issues. We also exclude PRs whose problem descriptions contain fewer than 40 words or whose interpretation depends on external information absent from the available context. These can be undocumented project conventions, off-platform discussions (i.e., personal communications such as emails etc.), or unavailable issue. After the LLM audit, we manually examined 383 randomly sampled PRs (confidence level of 95% and margin of error of 5%) where two Python experts with more than five years of software code review experience independently examine its assessments and supporting rationales to verify that the screening criteria have been applied appropriately. Then, they discuss to resolve any disagreements. For those they could not come to an agreement, a third Python expert with more software code review experience is consulted to make the final inclusion decisions. This LLM-assisted screening and joint verification by the three Python experts yields 7,086 PRs.
CRJudgeBench Construction
An instance in our dataset centers on a target code review comment in a PR. Its associated software context includes the PR description, linked issue reports, the code patch under review, the complete review timeline, and the repository code at the corresponding version. Each instance carries a human-annotated ground truth Boolean trustworthy label. For each of the 7,086 selected PRs that can contain multiple review comments, we create one data instance for every review comment written by a contributor other than the PR author; comments written by the PR author are excluded. This initial collection yields 76,190 instances. We first apply rule-based filtering where we exclude instances whose target comments are authored by bot accounts, identified using predefined username patterns, or whose code patches exceed 200,000 characters. We also remove instances whose target comments contain fewer than 10 characters after trimming whitespace, match a predefined list of brief acknowledgments, or begin with ‘‘LGTM’’11 1 LGTM stands for “Looks Good To Me” and is commonly used in code reviews to indicate approval. and contain fewer than 30 characters. This process resulted in 67,458 instances. We then prompt an LLM to remove purely social or complimentary comments, vague comments requiring unavailable external context, duplicated comments, formatting- or whitespace-only remarks. This step led to 48,027 instances. Next, we conducted manual examination to assess its technical trustworthiness and suitability for inclusion in the benchmark, excluding comments deemed unsuitable, that is, they cannot be reliably assessed using the available software context. The first three authors discussed and resolved the disagreements throughout this process. However, joint manual annotation of the 48,027 remaining instances would incur a prohibitive cost. To keep the annotation effort manageable, we therefore restrict manual annotation to instances from the ten repositories with the highest GitHub star counts, yielding 1,031 instances for manual joint review. Finally, we have 764 technically correct comments (true) and 65 technically incorrect comments (false).
Teacher Supervision and Verification
After teacher supervision, we also add a verification step with the goal of improving supervision effectiveness. We prompt the teacher to review the supervised action executed after the student’s trajectory prefix in a fresh session. Specifically, the teacher has access to the trajectory prefix, the executed supervised action and its observation, and ground truth trustworthiness label as guidance. It checks whether the action is executable and useful given the prefix, and whether the action helps verify the review comment’s technical claim or associated code location. This assessment also checks whether the teacher supervision leaks the ground truth label or claims observations that are unavailable before supervised action execution. We don’t eliminate the actions that return an error (i.e., failed tool calls) as they may still provide useful information for the student’s next steps. The supervised actions that pass this round of teacher verification are retained. We posit that such a verfication step, similar to agent self-reflection, would boost student’s learning process and make it generalize to unseen comments. We provide the complete implementation and prompts in B.7.
Iterative Policy Updates
We optimize LoRA adapters while freezing the base parameters of the backbone LLM of the student agent. Teacher-verified training units from earlier epoches supplement newly collected units so that the trained student can “remember” lessons from previous epoches. After each epoch, the student generates new trajectories that have learned the teacher’s supervision from the previous epoch. Thus, teacher would shift its supervision toward the steps encountered by the updated policy to further improve student’s policy and performance. This whole training process follows the LEAP-style iterative learning loop without requiring the teacher to take over student rollouts or provide token-by-token feedback. All training units from the epoches originate from the data instances from the training split of CRJudgeBench.
Untrustworthy Comments Are Harder to Judge
The results show that untrustworthy comments are substantially more difficult to identify than trustworthy comments. All models achieve positive-class recall between 87.77% and 98.69% and F1 scores between 72.17% and 84.33%, whereas the baselines obtain negative-class recall of only 2.31%–20.77% and F1 scores of 3.73%–33.75%. This asymmetry suggests that models can often confirm technically trustworthy claims, but struggle to reject plausible comments whose errors may require tracing repository context, verifying referenced symbols, or checking the exact code location. Even GLM-5.3, the strongest baseline, identifies only 20.77% of the untrustworthy comments. Sentinel substantially improves negative-class recall to 37.69% and F1 to 53.85%, yet the remaining gap confirms that identifying untrustworthy comments is the central challenge of this task. We leave further improving the performance in untrustworthy comments detection a future work.
Automated Code Review and Evaluation
The advent of LLMs has led to techniques that generate review comments from code patches or refine patches based on comments. studied using ChatGPT to refine code based on review comments. implemented 18 agents specializing in different software quality dimensions to analyze patches and generate comments, while similarly proposed role-based agents to generate comments and subsequently refine code. However, most prior studies in automated code review relied on similarity-based metrics such as BLEU, which can be adversely affected by low-quality human-written comments. Although recent work has proposed LLM-based reference-free metrics, these metrics do not assess technical trustworthiness and rely mainly on code patches and comments without repository context, potentially introducing significant noise and bias.
Code review benchmarks have shifted from traditional benchmarks toward more realistic evaluations of agentic code review. c-CRAB converts human-identified issues into executable tests and measures whether agent-generated comments help a coding agent resolve them, whereas CR-Bench evaluates issue discovery and its trade-off with spurious findings. analyze developer feedback on CodeRabbit reviews, identifying false positives, redundancy, and misalignment with developer intent as major causes of rejection. These studies assess end-to-end utility of review agents or developer reception. In contrast, CRJudgeBench evaluates whether an individual comment’s technical claim is correct in its code and repository context, while Sentinel actively gathers repository evidence for this judgment.
Conclusion
In this study, we take the first step to formulate a previously overlooked quality aspect of code review comments, technical trustworthiness. To evaluate coding agents’ performance in this aspect and train agents that are better capable of assessing it, we introduce CRJudgeBench, a repository-grounded benchmark of 1,199 expert-verified instances based on real pull requests, including 764 trustworthy and 435 untrustworthy code review comments. We also present Sentinel, an agentic judge that gathers evidence from code patches and repositories to assess comment trustworthiness. On the 359-instance test set, Sentinel achieves 76.60% accuracy, outperforming GLM-5.3 by 6.13 percentage points and its base model by 19.78 points. Our results show that general-purpose LLMs struggle to detect plausible but technically incorrect comments, while specialized training for evidence gathering substantially improves repository-grounded judgment. Future work will expand CRJudgeBench to more repositories and programming languages and further improve Sentinel’s efficiency and robustness.
AI use statement
This work follows strictly the AI policy required by the ICLR conference. We used generative AI tools to discuss and refine research ideas and methodology, provide feedback on experimental design, assist with implementing and debugging the data-processing, training, and evaluation pipelines, support the interpretation of experimental results, and assist with translation.
During dataset construction, large language models helped screen collected code-review comments for technical substance and suitability for annotation. They were also used to generate candidate synthetic negative instances by perturbing positive comments or their associated code locations through negation, symbol substitution, and location reassignment. Human experts jointly verified that every synthetic instance was technically incorrect in its associated context before inclusion in the benchmark. As part of our training method, language models generated student trajectories and teacher-provided corrective actions for supervised fine-tuning. Separate model calls also assisted in reviewing teacher-generated actions. Language-model agents served as the code-review judges evaluated in our experiments. These uses are described in the corresponding methodology and experimental sections.
The authors manually checked cited literature against original sources, reviewed and tested AI-assisted code, and verified reported results and their interpretation against experimental records. Benchmark labels were established through human annotation and verification. Teacher-generated supervision was assessed through execution and replay checks. The authors made the final decisions regarding the methodology, analysis, and presentation. We take responsibility for the final content of this work, including all text, claims, results, and artifacts produced with the assistance of generative AI.
Teacher Output Format
The message_index is the zero-based index of a message in student_history. For a final judgment, each quote must reproduce text from the corresponding existing tool message. A bash proposal may have an empty evidence array; the recorded proposal in Appendix B.5 includes two references to observations already available in the prefix.
This is the teacher’s native proposal format, which differs from the student action format. A bash proposal is converted to one bash tool call with an optional explanation. A finish proposal is converted to a bash call that prints the completion marker and a single-field prediction JSON object. The private review_note, final explanation, and evidence fields are not appended to the student’s submission command.
Output Example: Inspecting the Target-File Patch
The following is the actual teacher proposal paired with the preceding input; all six fields are retained from the recorded proposal. The teacher requests the relevant patch section. Its explanation states only that absence from the base-version file does not establish absence from the reviewed version, without assuming the result of the proposed command.
Here, message_index=3 refers to the tool observation containing the task JSON and its declaration that the repository is at the base commit, while message_index=15 refers to the search result with no match. The prediction=null value indicates that this action requests additional verification rather than submitting a final judgment.
B.7.1 Reviewer Prompt
Independently audit one proposed teaching action. You receive the student’s pre-action history, the action, its actual execution result (if a command), and the PRIVATE human label. Do not approve merely because the label matches. Check that the action advances technical/file verification, uses the right code version, does not leak the answer key, and makes no factual claim that required a future observation. References must actually support the claim, not just occur somewhere in output. A no-match search can be a valid action. A final judgment needs evidence, not an echoed label. Return needs_review if uncertain; reject fabricated evidence, unsupported final judgments or invalid operations. The action should be useful, but need not match the exact command you would use.


