Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep the authoritative subagent model when snapshots race task_started #7583

Mergedspiky02plateau(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/7583/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 136 additions and 6 deletions.

x
0 of 2 viewed, 2 left
78 additions and 0 deletionsapps/server/src/provider/Layers/ClaudeAdapter.test.tsModified
View file
@@ -1834,6 +1834,84 @@
+ it.effect("a subagent snapshot that beats task_started still wins over the seed", () => {
+ const harness = makeHarness();
+ return Effect.gen(function* () {
+ const adapter = yield* ClaudeAdapter;
+​
+ const taskEventsFiber = yield* adapter.streamEvents.pipe(
+ Stream.filter((event) => event.type.startsWith("task.")),
+ Stream.take(2),
+ Stream.runCollect,
+ Effect.forkChild,
+ );
+​
+ const session = yield* adapter.startSession({
+ threadId: THREAD_ID,
+ provider: ProviderDriverKind.make("claudeAgent"),
+ modelSelection: createModelSelection(
+ ProviderInstanceId.make("claudeAgent"),
+ "claude-opus-4-6",
+ [{ id: "effort", value: "max" }],
+ ),
+ runtimeMode: "full-access",
+ });
+ yield* adapter.sendTurn({
+ threadId: session.threadId,
+ input: "spawn an agent",
+ attachments: [],