fix: send NEEDS_CONTEXT straight to the user instead of the arbiter

A NEEDS_CONTEXT from the owner or reviewer is a question only the user can
answer, and the arbiter's own rules say to ESCALATE it. Routing it through the
arbiter added a full turn first (13 of 23 arbiter calls in 30 days). Escalate
directly; BLOCKED and deadlocks still go to the arbiter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-10-01 18:32:08 +09:00
parent 3fcb4efa43
commit de2de33c3e
3 changed files with 77 additions and 0 deletions

View File

@@ -251,6 +251,8 @@ export function handleReviewerCompletion(args: {
escalateLogMessage,
logContext: { taskId, verdict, summary: summary?.slice(0, 100) },
arbiterInterventionCount: task.arbiter_intervention_count ?? 0,
// Questions for the user go straight to the user (see owner side).
maxArbiterInterventions: verdict === 'needs_context' ? 0 : undefined,
patch: { reviewer_failure_count: 0 },
});
return;