From 599fad0e86a1a65ea60f7690195e936d806916cf Mon Sep 17 00:00:00 2001 From: justsisyphus Date: Fri, 23 Jan 2026 15:42:35 +0900 Subject: [PATCH] fix(atlas): capture stderr from git commands to prevent help text leak When git commands fail (e.g., not in a repo, invalid HEAD), git outputs help text to stderr. Without explicit stdio option, execSync inherits the parent's stdio causing help text to appear on terminal during delegate_task execution. Add stdio: ['pipe', 'pipe', 'pipe'] to capture stderr instead of letting it leak to terminal. --- src/hooks/atlas/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks/atlas/index.ts b/src/hooks/atlas/index.ts index fad307576..a8809ed60 100644 --- a/src/hooks/atlas/index.ts +++ b/src/hooks/atlas/index.ts @@ -274,6 +274,7 @@ function getGitDiffStats(directory: string): GitFileStat[] { cwd: directory, encoding: "utf-8", timeout: 5000, + stdio: ["pipe", "pipe", "pipe"], }).trim() if (!output) return [] @@ -282,6 +283,7 @@ function getGitDiffStats(directory: string): GitFileStat[] { cwd: directory, encoding: "utf-8", timeout: 5000, + stdio: ["pipe", "pipe", "pipe"], }).trim() const statusMap = new Map()