Skip to content

Commit e7d12dd

Browse files
committed
fix(server): use the Claude driver for native subagent stopping
1 parent a4360ce commit e7d12dd

5 files changed

Lines changed: 13 additions & 12 deletions

File tree

‎apps/server/src/orchestration-v2/Orchestrator.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8842,7 +8842,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
88428842
subagent === undefined ||
88438843
subagent.runId !== command.runId ||
88448844
subagent.origin !== "provider_native" ||
8845-
subagent.driver !== "claude" ||
8845+
subagent.driver !== "claudeAgent" ||
88468846
subagent.nativeTaskRef?.strength !== "strong" ||
88478847
subagent.nativeTaskRef.nativeId === null
88488848
) {

‎apps/server/src/orchestration-v2/ThreadStop.test.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import * as SqlClient from "effect/sql/SqlClient";
2121
import * as TestClock from "effect/testing/TestClock";
2222

2323
import * as SqlitePersistence from "../persistence/Sqlite.ts";
24+
import { CLAUDE_PROVIDER } from "./Adapters/ClaudeAdapterV2.ts";
2425
import { CodexProviderCapabilitiesV2 } from "./Adapters/CodexAdapterV2.ts";
2526
import { OrchestrationEffectRequestV2 } from "./EffectOutbox.ts";
2627
import * as Orchestrator from "./Orchestrator.ts";
@@ -601,10 +602,10 @@ it.effect(
601602
const subagent = {
602603
...before.subagents[0]!,
603604
origin: "provider_native" as const,
604-
driver: ProviderDriverKind.make("claude"),
605-
providerInstanceId: ProviderInstanceId.make("claude"),
605+
driver: CLAUDE_PROVIDER,
606+
providerInstanceId: ProviderInstanceId.make("claudeAgent"),
606607
nativeTaskRef: {
607-
driver: ProviderDriverKind.make("claude"),
608+
driver: CLAUDE_PROVIDER,
608609
nativeId: "claude-task",
609610
strength: "strong" as const,
610611
},
@@ -630,8 +631,8 @@ it.effect(
630631
occurredAt: now,
631632
payload: {
632633
...providerThread,
633-
driver: ProviderDriverKind.make("claude"),
634-
providerInstanceId: ProviderInstanceId.make("claude"),
634+
driver: CLAUDE_PROVIDER,
635+
providerInstanceId: ProviderInstanceId.make("claudeAgent"),
635636
providerSessionId: ProviderSessionId.make("session:native-child-stop"),
636637
},
637638
});

‎apps/web/src/components/chat/ThreadRelationshipsControl.agents.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ afterEach(async () => {
5555

5656
it.each([
5757
{ driver: "codex", origin: "app_owned" },
58-
{ driver: "claude", origin: "app_owned" },
59-
{ driver: "claude", origin: "provider_native" },
58+
{ driver: "claudeAgent", origin: "app_owned" },
59+
{ driver: "claudeAgent", origin: "provider_native" },
6060
])(
6161
"stops active $origin $driver subagents without opening their thread",
6262
async ({ driver, origin }) => {
@@ -167,7 +167,7 @@ it.each([
167167
expect(renderer.root.findAllByProps({ "aria-label": "Stop subagent Worker" })).toHaveLength(0);
168168
state.projection = {
169169
...projection,
170-
subagents: [{ ...agent, origin: "provider_native", driver: "claudeAgent" }],
170+
subagents: [{ ...agent, origin: "provider_native", driver: "codex" }],
171171
};
172172
await act(async () => renderer.update(cloneElement(panel)));
173173
expect(renderer.root.findAllByProps({ "aria-label": "Stop subagent Worker" })).toHaveLength(0);

‎apps/web/src/components/chat/ThreadRelationshipsControl.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export function ThreadRelationshipsPanel(props: {
416416
agent &&
417417
(agent.origin === "app_owned" ||
418418
(agent.origin === "provider_native" &&
419-
agent.driver === "claude" &&
419+
agent.driver === "claudeAgent" &&
420420
agent.nativeTaskRef?.strength === "strong" &&
421421
agent.nativeTaskRef.nativeId !== null &&
422422
["pending", "running", "waiting"].includes(agent.nativeStatus))) &&

‎packages/client-runtime/src/operations/commands.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,8 @@ describe("V2 environment commands", () => {
10161016
parentNodeId: NodeId.make("owner-node"),
10171017
origin: "provider_native",
10181018
createdBy: "agent",
1019-
driver: ProviderDriverKind.make("claude"),
1020-
providerInstanceId: ProviderInstanceId.make("claude"),
1019+
driver: ProviderDriverKind.make("claudeAgent"),
1020+
providerInstanceId: ProviderInstanceId.make("claudeAgent"),
10211021
providerThreadId: null,
10221022
childThreadId: ThreadId.make("native-child-thread"),
10231023
nativeTaskRef: null,

0 commit comments

Comments
 (0)