Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(pi): async pi-subagents workflow, chain and parallel members show as subagents #36599

Mergedjuliusmarmingemerged 3 commits intomain fromrefs/pull/36599/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 112 additions and 0 deletions (loading 1).

x
0 of 2 viewed, 2 left
112 additions and 0 deletionspackages/provider-pi/src/server/adapter.test.tsModified
View file
@@ -3187,6 +3187,118 @@
}).pipe(Effect.scoped, Effect.provide(layerTest)),
+ it.effect("shows the members of an async pi-subagents workflow as running subagents", () =>
+ Effect.gen(function* () {
+ const fake = yield* makeFakePi;
+ const { runtime, takeEvent } = yield* openRuntime(fake);
+ const providerThread = yield* runtime.ensureThread({
+ threadId: THREAD_ID,
+ modelSelection: modelSelection("default"),
+ runtimePolicy,
+ });
+ yield* startTurn(runtime, providerThread);
+ yield* fake.takeRequest("prompt");
+ yield* fake.emit({ type: "agent_start" });
+ // Frames as pi-subagents 0.88.1 sends them for an async `runs.all([alpha, beta])` workflow.
+ const step = (key: string, state: string) => ({
+ id: key,
+ kind: "step",
+ label: key,
+ state,
+ startedAt: 1_000,
+ updatedAt: 2_000,
+ activity: { currentTool: "bash", turnCount: 1, toolCount: 1 },
+ agent: "scout",
+ model: "anthropic/claude-haiku-5-5",
+ });
+ const emitSnapshot = (state: string, alpha: string, beta: string) =>
+ fake.emit({