@@ -424,22 +424,6 @@ describe("ClaudeAdapterV2 runtime query policy", () => {
424424 assert.equal(requestedModel, "opus");
425425 });
426426
427- it("a chosen workflow size overrides the one from launch arguments", () => {
428- const sentSize = (workflowSizeGuideline: ClaudeSettings["workflowSizeGuideline"]) =>
429- (
430- ClaudeAdapterV2.makeClaudeQueryOptions({
431- modelSelection: CLAUDE_TEST_MODEL_SELECTION,
432- nativeThreadId: "native-workflow-size",
433- resume: false,
434- cwd: "/workspace",
435- sdkSettings: { workflowSizeGuideline: "small" },
436- settings: { ...DEFAULT_CLAUDE_SETTINGS, workflowSizeGuideline },
437- }).settings as { workflowSizeGuideline?: string } | undefined
438- )?.workflowSizeGuideline;
439- assert.equal(sentSize("large"), "large");
440- assert.equal(sentSize("default"), "small");
441- });
442-
443427 it("projects AskUserQuestion input with question text as the answer key", () => {
444428 const preview = "\n **Proposed change**\n\n```ts\n\tconst enabled = true;\n```\n ";
445429 assert.deepEqual(
@@ -1111,12 +1095,16 @@ describe("ClaudeAdapterV2 Auto-accept edits", () => {
11111095});
11121096
11131097describe("ClaudeAdapterV2 append-system-prompt-file launch argument", () => {
1114- const startTurnWithLaunchArgs = Effect.fnUntraced(function* (launchArgs: string, cwd: string) {
1098+ const startTurnWithLaunchArgs = Effect.fnUntraced(function* (
1099+ launchArgs: string,
1100+ cwd: string,
1101+ settings?: Partial<ClaudeSettings>,
1102+ ) {
11151103 const fileSystem = yield* FileSystem.FileSystem;
11161104 const opened: Array<ClaudeAdapterV2.ClaudeAgentSdkQueryOptions> = [];
11171105 const adapter = yield* ClaudeAdapterV2.makeClaudeAdapterV2({
11181106 instanceId: ClaudeAdapterV2.CLAUDE_DEFAULT_INSTANCE_ID,
1119- settings: { ...DEFAULT_CLAUDE_SETTINGS, launchArgs },
1107+ settings: { ...DEFAULT_CLAUDE_SETTINGS, ...settings, launchArgs },
11201108 environment: {},
11211109 attachmentsDir: yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-claude-append-" }),
11221110 fileSystem,
@@ -1221,7 +1209,7 @@ describe("ClaudeAdapterV2 append-system-prompt-file launch argument", () => {
12211209
12221210 // regression: #15073 the SDK replaced the --settings launch argument with T3's settings
12231211 it.effect.each([
1224- `--settings '{"skillOverrides":{"lint":"off"},"showThinkingSummaries":false}'`,
1212+ `--settings '{"skillOverrides":{"lint":"off"},"showThinkingSummaries":false,"workflowSizeGuideline":"small" }'`,
12251213 "--settings user-settings.json",
12261214 ])("merges %s beneath T3's settings", (launchArgs) =>
12271215 Effect.scoped(
@@ -1230,15 +1218,20 @@ describe("ClaudeAdapterV2 append-system-prompt-file launch argument", () => {
12301218 const cwd = yield* fileSystem.makeTempDirectoryScoped({ prefix: "t3-claude-settings-" });
12311219 yield* fileSystem.writeFileString(
12321220 NodePath.join(cwd, "user-settings.json"),
1233- '{"skillOverrides":{"lint":"off"},"showThinkingSummaries":false}',
1221+ '{"skillOverrides":{"lint":"off"},"showThinkingSummaries":false,"workflowSizeGuideline":"small" }',
12341222 );
12351223 const { exit, opened } = yield* startTurnWithLaunchArgs(launchArgs, cwd);
12361224 assert.isTrue(Exit.isSuccess(exit));
12371225 assert.deepInclude(opened[0]!.settings, {
12381226 skillOverrides: { lint: "off" },
12391227 showThinkingSummaries: true,
1228+ workflowSizeGuideline: "small",
12401229 });
12411230 assert.isUndefined(opened[0]!.extraArgs?.["settings"]);
1231+ const chosen = yield* startTurnWithLaunchArgs(launchArgs, cwd, {
1232+ workflowSizeGuideline: "large",
1233+ });
1234+ assert.deepInclude(chosen.opened[0]!.settings, { workflowSizeGuideline: "large" });
12421235 }).pipe(
12431236 Effect.provide(
12441237 Layer.mergeAll(
0 commit comments