Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client): "Subagent needs input" no longer sticks after the subagent finishes #18996

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/18996/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 64 additions and 1 deletion.

x
0 of 2 viewed, 2 left
49 additions and 1 deletionpackages/client-runtime/src/state/threadShell.test.tsModified
View file
@@ -1,6 +1,7 @@
import {
EnvironmentId,
ProjectId,
+ RuntimeRequestId,
ThreadId,
type OrchestrationV2ShellSnapshot,
} from "@t3tools/contracts";
@@ -9,7 +10,7 @@
import { describe, expect, it } from "vite-plus/test";
​
import { PrimaryConnectionTarget } from "../connection/model.ts";
-import { v2ShellSnapshot, v2ThreadShell } from "./orchestrationV2TestFixtures.ts";
+import { v2Now, v2ShellSnapshot, v2ThreadShell } from "./orchestrationV2TestFixtures.ts";
import { applyShellStreamEvent } from "./shellReducer.ts";
import { createEnvironmentThreadShellAtoms } from "./threadShell.ts";
​
@@ -103,6 +104,53 @@
registry.dispose();
});
​
+ it("counts a subagent question on its parent only while the subagent runs", () => {
+ const { registry, threads, snapshotAtom } = makeHarness();
+ const root = v2ThreadShell;
+ const child = {
+ ...root,
+ id: ThreadId.make("child"),
+ creationSource: "mcp" as const,
+ status: "running" as const,