Skip to content

Commit 1591816

Browse files
committed
fix(claude): resolve task cwd before opening query
1 parent 0893a65 commit 1591816

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
@@ -9954,6 +9954,9 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
99549954
...(appendSystemPromptFileText === undefined ? {} : { appendSystemPromptFileText }),
99559955
...(toolSearchOverride === undefined ? {} : { toolSearchOverride }),
99569956
});
9957+
const resolvedTurnCwd = yield* fileSystem
9958+
.realPath(turnInput.runtimePolicy.cwd ?? ".")
9959+
.pipe(Effect.orElseSucceed(() => turnInput.runtimePolicy.cwd));
99579960
const querySession = yield* queryRunner
99589961
.open({
99599962
threadId: turnInput.threadId,
@@ -10006,9 +10009,7 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
1000610009
taskOutputRoot: claudeTaskOutputRoot(
1000710010
adapterOptions.environment,
1000810011
path,
10009-
yield* fileSystem
10010-
.realPath(turnInput.runtimePolicy.cwd ?? ".")
10011-
.pipe(Effect.orElseSucceed(() => turnInput.runtimePolicy.cwd)),
10012+
resolvedTurnCwd,
1001210013
hostPlatform,
1001310014
),
1001410015
};

0 commit comments

Comments
 (0)