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