fix: gate fallback fast reset notices

This commit is contained in:
Vincent Koc
2026-06-22 09:27:29 +08:00
parent 6b1eef9959
commit 6eb72a830e
3 changed files with 7 additions and 2 deletions
@@ -3129,7 +3129,9 @@ export async function runCodexAppServerAttempt(
systemPromptReport,
};
} finally {
await maybeEmitFastModeAutoResetBestEffort();
if (params.isFinalFallbackAttempt !== false) {
await maybeEmitFastModeAutoResetBestEffort();
}
codexModelCallDiagnostics.emitError(
"codex app-server run completed without model-call terminal event",
);
@@ -540,7 +540,9 @@ async function runCliAgentWithLifecycleInternal(
for (const bridge of bridges) {
bridge.unsubscribe();
}
await maybeEmitFastModeAutoReset();
if (params.runParams.isFinalFallbackAttempt !== false) {
await maybeEmitFastModeAutoReset();
}
if (emitLifecycleTerminal && !lifecycleTerminalEmitted) {
emitAgentEvent({
runId: params.runId,
+1
View File
@@ -1066,6 +1066,7 @@ export function createFollowupRunner(params: {
fastModeStartedAtMs,
fastModeAutoOnSeconds: candidateFastMode.fastModeAutoOnSeconds,
fastModeAutoProgressState,
isFinalFallbackAttempt: runOptions?.isFinalFallbackAttempt,
timeoutMs: run.timeoutMs,
runTimeoutOverrideMs: run.runTimeoutOverrideMs,
runId,