Recover Codex compaction failures in paired owner flow
This commit is contained in:
@@ -15,7 +15,10 @@ import {
|
||||
} from './agent-error-detection.js';
|
||||
import type { AgentOutput } from './agent-runner.js';
|
||||
import { detectCodexRotationTrigger } from './codex-token-rotation.js';
|
||||
import { shouldRetryFreshSessionOnAgentFailure } from './session-recovery.js';
|
||||
import {
|
||||
shouldRetryFreshCodexSessionOnAgentFailure,
|
||||
shouldRetryFreshSessionOnAgentFailure,
|
||||
} from './session-recovery.js';
|
||||
|
||||
export interface StreamedTriggerReason {
|
||||
reason: AgentTriggerReason;
|
||||
@@ -74,6 +77,19 @@ export function evaluateStreamedOutput(
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
isPrimaryCodex &&
|
||||
!state.sawOutput &&
|
||||
shouldRetryFreshCodexSessionOnAgentFailure(output)
|
||||
) {
|
||||
nextState.retryableSessionFailureDetected = true;
|
||||
return {
|
||||
state: nextState,
|
||||
shouldForwardOutput: false,
|
||||
suppressedRetryableSessionFailure: true,
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
isPrimaryClaude &&
|
||||
output.status === 'success' &&
|
||||
|
||||
Reference in New Issue
Block a user