From 4723319eef905512ca8b3d3e227e3e4fadb04b31 Mon Sep 17 00:00:00 2001 From: MoerAI Date: Wed, 18 Mar 2026 16:23:37 +0900 Subject: [PATCH] fix(atlas): use worktree path for git verification when available (fixes #2229) --- src/hooks/atlas/tool-execute-after.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hooks/atlas/tool-execute-after.ts b/src/hooks/atlas/tool-execute-after.ts index 55fb8ddd6..ac4d7a538 100644 --- a/src/hooks/atlas/tool-execute-after.ts +++ b/src/hooks/atlas/tool-execute-after.ts @@ -65,11 +65,13 @@ export function createToolExecuteAfterHandler(input: { } if (toolOutput.output && typeof toolOutput.output === "string") { - const gitStats = collectGitDiffStats(ctx.directory) + const boulderState = readBoulderState(ctx.directory) + const worktreePath = boulderState?.worktree_path?.trim() + const verificationDirectory = worktreePath ? worktreePath : ctx.directory + const gitStats = collectGitDiffStats(verificationDirectory) const fileChanges = formatFileChanges(gitStats) const subagentSessionId = extractSessionIdFromOutput(toolOutput.output) - const boulderState = readBoulderState(ctx.directory) if (boulderState) { const progress = getPlanProgress(boulderState.active_plan) const sessionState = toolInput.sessionID ? getState(toolInput.sessionID) : undefined