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>
Two causes of the paired room "keeps stopping" symptom:
- Reviewer approvals worded as "PROCEED" were parsed as 'continue'
(a change request), causing an owner TASK_DONE <-> reviewer PROCEED
ping-pong until the deadlock cap. parseReviewerVerdict() now treats a
leading PROCEED as approval so the turn finalizes after one round.
- When the Codex reviewer was unavailable, the owner's answer was held
for review and the user saw nothing. Now the held owner answer is
emitted with a "review skipped" notice on reviewer_codex_unavailable.
Verified: tsc --noEmit clean; 27 related vitest tests pass.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The owner↔reviewer↔arbiter loop could repeat forever: when the arbiter
ruled PROCEED/REVISE/RESET it reset round_trip_count to 0, and nothing
tracked how many times the arbiter had already intervened. A re-deadlock
re-invoked the arbiter without bound.
Add a persistent arbiter_intervention_count (new column + migration 020)
that survives the round-trip reset, and a configurable cap
ARBITER_MAX_INTERVENTIONS (default 1). Once the arbiter has intervened
that many times and the loop still deadlocks, requestArbiterOrEscalate
escalates straight to the user instead of re-invoking the arbiter.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>