From 8937d862c38fc38113ae337981fbba34b4666587 Mon Sep 17 00:00:00 2001 From: Sergiy Dybskiy Date: Tue, 6 Oct 2026 00:05:49 -0400 Subject: [PATCH] Stop the review when a file read fails The lead reviewer's prompt told it to continue with the diff hunks when read_file failed, so a run that read none of the files still approved. Now it stops and says so. Co-authored-by: Claude --- apps/pr-reviewer/src/agents/review.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/pr-reviewer/src/agents/review.ts b/apps/pr-reviewer/src/agents/review.ts index 9237145..1a68551 100644 --- a/apps/pr-reviewer/src/agents/review.ts +++ b/apps/pr-reviewer/src/agents/review.ts @@ -177,8 +177,7 @@ export function ReviewLead() { 1. Load the diff with the read_diff tool, using the file path given in the user message. 2. For every file in the diff, call read_file with the path from its \`diff --git\` header so the - reviewers see the whole file, not only the hunks. If a read fails, continue with the diff - hunks for that file. + reviewers see the whole file, not only the hunks. If a read fails, stop and say so. 3. Delegate two review passes: one task to correctness-reviewer, one task to style-reviewer. Issue both tasks in a single batch so they run in parallel, and include the complete diff text and the full contents of the files you read in each task message — subagents cannot