Repository navigation
fix(server): Stop closes native subagent question cards #31347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
bf266b7
c1a76ce
be64152
02f2a79
9914c15
1c23588
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8634,10 +8634,18 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* ( | |
| ] as const; | ||
| }), | ||
| ); | ||
| const directActiveTurn = activeTurnContexts.find( | ||
| (candidate) => candidate.providerTurnId === turnInput.providerTurnId, | ||
| ); | ||
| const recoveredCompletedRoot = | ||
| directActiveTurn === undefined | ||
| ? activeTurnContexts | ||
| .map((context) => approvalOwnerCodexTurn(context).owner) | ||
| .find((candidate) => candidate.providerTurnId === turnInput.providerTurnId) | ||
| : undefined; | ||
| const activeTurn = | ||
| activeTurnContexts.find( | ||
| (candidate) => candidate.providerTurnId === turnInput.providerTurnId, | ||
| ) ?? | ||
| directActiveTurn ?? | ||
| recoveredCompletedRoot ?? | ||
| (turnInput.requestRuntimeRestart === true | ||
| ? settledTurnContexts.find( | ||
|
Comment on lines
+8637
to
8650
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stop on a completed continued root cannot reach its live child. When a goal or capacity continuation finishes, Stop on a completed continued root with live child work needs to resolve the child's owner lineage whether the requested turn is the original turn or the latest continuation. The choice of mechanism is open.
|
||
| (candidate) => candidate.providerThread.id === turnInput.providerThread.id, | ||
|
|
@@ -8673,6 +8681,17 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* ( | |
| `Provider turn ${turnInput.providerTurnId} is not active and cannot be interrupted.`, | ||
| ); | ||
| } | ||
| if (recoveredCompletedRoot !== undefined) { | ||
| yield* Ref.update(terminalizedNonCompletedNativeTurns, (current) => { | ||
| const updated = new Set(current); | ||
| for (const turn of continuedRuns.get(recoveredCompletedRoot.providerTurnId) ?? [ | ||
| recoveredCompletedRoot, | ||
| ]) { | ||
| updated.add(turn.nativeTurnId); | ||
| } | ||
| return updated; | ||
| }); | ||
| } | ||
| const interruptTargets: Array<{ | ||
| readonly context: ActiveCodexTurnContext; | ||
| readonly completion: Deferred.Deferred<void, never>; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.