Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client-runtime): keep subagent questions off parent threads #26367

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/26367/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 18 additions and 2 deletions.

x
0 of 2 viewed, 2 left
15 additions and 1 deletionpackages/client-runtime/src/state/threadShell.test.tsModified
View file
@@ -108,7 +108,7 @@
registry.dispose();
});
​
- it("counts a subagent question on its parent only while the subagent runs", () => {
+ it("keeps a live subagent question inside the parent without flagging its thread", () => {
const { registry, threads, snapshotAtom } = makeHarness();
const root = v2ThreadShell;
const child = {
@@ -132,6 +132,10 @@
const dispose = registry.mount(inputs);
registry.set(snapshotAtom(environmentId), { ...v2ShellSnapshot, threads: [root, child] });
expect(registry.get(inputs).map((thread) => thread.id)).toEqual([child.id]);
+ expect(
+ registry.get(threads.threadShellAtom({ environmentId, threadId: root.id }))
+ ?.pendingSubagentRequest,
+ ).toBeNull();
registry.set(snapshotAtom(environmentId), {
...v2ShellSnapshot,
threads: [root, { ...child, status: "queued" as const }],
@@ -272,6 +276,16 @@
`${remoteEnvironmentId}/${helper.id}`,
]);
​
+ registry.set(snapshotAtom(remoteEnvironmentId), {
+ ...v2ShellSnapshot,
+ threads: [
+ task,