Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a Claude /goal no longer reads as complete while a background subagent runs #16598

MergedJreevo(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/16598/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 156 additions and 1 deletion.

x
0 of 2 viewed, 2 left
132 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -15560,6 +15560,138 @@
+ it.effect(
+ "defers goal completion until an ambient subagent finishes and Claude checks again",
+ () =>
+ Effect.gen(function* () {
+ const harness = yield* makeWakeHarness;
+ const condition = "the review finds no bugs";
+ const taskId = "task-goal-review";
+ const toolUseId = "toolu-goal-review";
+ const now = yield* DateTime.now;
+ yield* harness.runtime.startTurn(
+ makeClaudeTestTurnInput({
+ threadId: harness.threadId,
+ providerThread: harness.providerThread,
+ now,
+ attemptId: RunAttemptId.make("goal-background-attempt"),
+ text: `/goal ${condition}`,
+ attachments: [],
+ }),
+ );
+ for (const frame of [
+ syntheticFrame("goal-background-set", `Goal set: ${condition}`),
+ claudeSdkFrame({
+ ...makeSubagentTaskStartedFrame({ taskId, toolUseId, uuid: "goal-review-start" }),
+ ambient: true,
+ skip_transcript: true,
+ }),