fix(acp): order mid-reasoning Antigravity steers after the first reply #48657
Closedelectrum(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/48657/headopened View on GitHubelectrum(GitHub profile, opens in a new tab) linked this to fix #48620
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
- @@ -7322,3 +7438,11 @@73227438 } else if (context.nativeThreadId === notification.sessionId) {73237439 if (update.sessionUpdate === "usage_update") {73247440 context.replyOpen = false;7441+ if (!context.finalized && context.pendingPromptSteers.length > 0) {7442+ const lastReply =7443+ (context.assistant.current?.text.trim().length ?? 0) > 07444+ ? context.assistant.current7445+ : context.closingAssistantSegments.findLast(7446+ (segment) => segment.text.trim().length > 0,7447+ );7448+ if (lastReply !== undefined && lastReply !== null) {@@ -7579,3 +7706,15 @@75797706 ) {75807707 yield* emitProviderRetry(context, "completed");75817708 }7709+ // A prompt-steered agent that finished its prior reply before taking the steer now7710+ // begins the steer's work; anchor the steer after that reply before emitting new items.7711+ if (context.pendingPromptSteers.length > 0) {7712+ if (7713+ context.completedPreSteerReply !== null &&7714+ isNewModelOutputForSteer(context, notification)7715+ ) {7716+ yield* releaseDeferredPromptSteers(context, context.completedPreSteerReply);7717+ } else if (7718+ (update.sessionUpdate === "agent_thought_chunk" &&7719+ (acpContentBlockDisplayText(update.content)?.length ?? 0) > 0) ||7720+ (update.sessionUpdate === "agent_thought" &&
- @@ -7579,3 +7706,11 @@75797706 ) {75807707 yield* emitProviderRetry(context, "completed");75817708 }7709+ // A prompt-steered agent that finished its prior reply before taking the steer now7710+ // begins the steer's work; anchor the steer after that reply before emitting new items.7711+ if (context.pendingPromptSteers.length > 0) {7712+ if (7713+ context.completedPreSteerReply !== null &&7714+ isNewModelOutputForSteer(context, notification)7715+ ) {7716+ yield* releaseDeferredPromptSteers(context, context.completedPreSteerReply);
juliusmarminge closed this
Sign in to join this conversation.

Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
093fdfeℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.