Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): settle stopped tasks after session replacement #17921

Closedluke2x(GitHub profile, opens in a new tab)wants to merge 13 commits intomain fromrefs/pull/17921/headopened View on GitHub

Showing 10 changed files with 147 additions and 3 deletions (loading 9).

x
0 of 10 viewed, 10 left
147 additions and 3 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -2466,6 +2466,10 @@
const liveSelectionChanges: Array<unknown> = [];
const continuationRequests: Array<ProviderContinuationRequests.ProviderContinuationRequest> =
+ const nativeTaskEndReceipts =
+ yield* Queue.unbounded<
+ Extract<ProviderAdapter.ProviderAdapterV2Event, { type: "subagent.native-task-ended" }>
+ >();
const continuationReceipts =
yield* Queue.unbounded<ProviderContinuationRequests.ProviderContinuationRequest>();
const terminalReceipts =
@@ -2581,9 +2585,9 @@
Stream.runForEach((event) =>
Effect.gen(function* () {
events.push(event);
- if (event.type === "subagent.updated") {
- yield* Queue.offer(subagentReceipts, event);
- }
+ if (event.type === "subagent.native-task-ended")
+ yield* Queue.offer(nativeTaskEndReceipts, event);
+ if (event.type === "subagent.updated") yield* Queue.offer(subagentReceipts, event);
if (event.type === "turn.terminal") {
yield* Queue.offer(terminalReceipts, event);
@@ -2625,6 +2629,7 @@
events,
terminalReceipts,
subagentReceipts,