fix: stop Codex pool retry loops

This commit is contained in:
ejclaw
2026-06-02 05:29:32 +09:00
parent 03d4c81192
commit 5648b61075
16 changed files with 369 additions and 24 deletions

View File

@@ -1,21 +1,11 @@
import { logger } from './logger.js';
import {
classifyAgentError,
classifyCodexAuthError,
} from './agent-error-detection.js';
import { isTerminalCodexAccountFailure } from './agent-error-detection.js';
import { transitionPairedTaskStatus } from './paired-task-status.js';
import { classifyArbiterVerdict } from './paired-verdict.js';
import type { PairedTask } from './types.js';
const ARBITER_RESOLUTION_ROUND_TRIP_COUNT = 0;
function isTerminalCodexAccountFailure(summary?: string | null): boolean {
if (!summary) return false;
if (classifyCodexAuthError(summary).category !== 'none') return true;
if (classifyAgentError(summary).category === 'rate-limit') return true;
return /all\s+codex(?:\s+rotation)?\s+accounts/i.test(summary);
}
export function handleFailedArbiterExecution(args: {
task: PairedTask;
taskId: string;