Skip to content

Commit a0898ec

Browse files
committed
fix(server): a Claude turn opens its query with the catalog it started with
1 parent ac16111 commit a0898ec

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10828,6 +10828,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
1082810828
const openQuery = Effect.fnUntraced(function* (
1082910829
turnInput: ProviderAdapter.ProviderAdapterV2TurnInput,
1083010830
nativeThreadId: string,
10831+
turnCatalog: ClaudeModelCatalog,
1083110832
) {
1083210833
const queryPolicy = yield* queryPolicyForTurn(turnInput);
1083310834
const mcpSession = yield* mcpSessions.read(turnInput.threadId);
@@ -10842,7 +10843,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
1084210843
const queryPolicyKey = claudeEffectiveQueryPolicyKey(queryPolicy, mcpOverrides);
1084310844
const compiledSelection = compileClaudeModelSelection(
1084410845
turnInput.modelSelection,
10845-
modelCatalog,
10846+
turnCatalog,
1084610847
);
1084710848
const resumeSessionAt = yield* getNativeConversationHeadId(turnInput.providerThread);
1084810849
const existing = yield* Ref.get(queryContext);
@@ -10958,7 +10959,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
1095810959
);
1095910960
const queryOptions = makeClaudeQueryOptions({
1096010961
modelSelection: turnInput.modelSelection,
10961-
modelCatalog,
10962+
modelCatalog: turnCatalog,
1096210963
nativeThreadId,
1096310964
title: turnInput.appThread.title,
1096410965
resume: shouldResume,
@@ -11226,7 +11227,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
1122611227
Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
1122711228
Effect.provideService(Path.Path, path),
1122811229
);
11229-
const querySession = yield* openQuery(turnInput, nativeThreadId);
11230+
const querySession = yield* openQuery(turnInput, nativeThreadId, turnCatalog);
1123011231
const autoCompactWindow = yield* resolveAutoCompactWindow(
1123111232
querySession.settingsCwd,
1123211233
turnInput.modelSelection,

0 commit comments

Comments
 (0)