Retry silent owner capacity failures

Classify Codex selected-model capacity as overloaded and requeue silent owner failures that leave paired tasks active.
This commit is contained in:
Eyejoker
2026-05-21 03:46:59 +09:00
committed by GitHub
parent f240cf7820
commit fbaca3ab68
10 changed files with 281 additions and 4 deletions

View File

@@ -55,6 +55,17 @@ describe('agent-error-detection', () => {
expect(detectClaudeProviderFailureMessage(message)).toBe('overloaded');
});
it('classifies Codex model capacity errors as overloaded', () => {
expect(
classifyAgentError(
'Selected model is at capacity. Please try a different model.',
),
).toEqual({
category: 'overloaded',
reason: 'overloaded',
});
});
it('marks only Claude quota/auth reasons as Claude rotation reasons', () => {
expect(shouldRotateClaudeToken('429')).toBe(true);
expect(shouldRotateClaudeToken('usage-exhausted')).toBe(true);