Cut Live variant two output latency

This commit is contained in:
Paul Bakaus
2026-07-13 12:09:39 -07:00
parent 265502a125
commit 7a3ef022d9
4 changed files with 290 additions and 12 deletions
@@ -340,6 +340,8 @@ export class CodexLiveWorkerSupervisor {
prepared,
phase,
expectedVariants: Number(event.count || arrivedVariants),
sessionId: event.id,
scaffold: event.scaffold,
cwd: this.cwd,
maxBytes: this.config.maxArtifactBytes,
});
@@ -379,7 +381,11 @@ export class CodexLiveWorkerSupervisor {
if (this.isCanceled(event.id)) return;
const result = await this.runTurnWithReconnect({
input,
outputSchema: codexWorkerOutputSchemaForPhase(phase, Number(event.count || arrivedVariants)),
outputSchema: codexWorkerOutputSchemaForPhase(
phase,
Number(event.count || arrivedVariants),
{ sourceDelta: phase === 'second' && !prepared.previewMode },
),
onAgentMessage: publishCandidate,
eventId: event.id,
});