fix(paired): bound arbiter interventions to stop infinite arbiter loop
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>
This commit is contained in:
@@ -244,6 +244,7 @@ export function loadConfig(): AppConfig {
|
||||
),
|
||||
agentLanguage: readText('AGENT_LANGUAGE') ?? '',
|
||||
arbiterDeadlockThreshold: readInteger('ARBITER_DEADLOCK_THRESHOLD', 2),
|
||||
arbiterMaxInterventions: readInteger('ARBITER_MAX_INTERVENTIONS', 1),
|
||||
maxRoundTrips,
|
||||
},
|
||||
models: {
|
||||
|
||||
@@ -57,6 +57,7 @@ export interface AppConfig {
|
||||
forceFreshClaudeReviewerSessionInUnsafeHostMode: boolean;
|
||||
agentLanguage: string;
|
||||
arbiterDeadlockThreshold: number;
|
||||
arbiterMaxInterventions: number;
|
||||
maxRoundTrips: number;
|
||||
};
|
||||
models: {
|
||||
|
||||
Reference in New Issue
Block a user