From aeb9e968ff4a9267de38cc0da26b7d7383bf3d7d Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 13 Oct 2026 02:17:47 +0530 Subject: [PATCH] fix: keep the git autocommit notice off stdout in the stdio transport On the stdio transport stdout is the MCP protocol stream. With GIT_AUTOCOMMIT=true the startup notice was written with console.log and landed on that stream ahead of the first protocol message. --- packages/server/src/mcp/stdio.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/mcp/stdio.ts b/packages/server/src/mcp/stdio.ts index 25eab91..135f5b8 100644 --- a/packages/server/src/mcp/stdio.ts +++ b/packages/server/src/mcp/stdio.ts @@ -48,7 +48,8 @@ if (process.env.GIT_AUTOCOMMIT === "true") { console.error(`[understory] GIT_AUTOCOMMIT=true but autocommit cannot work: ${gitReady.reason}`); process.exit(1); } - console.log("[understory] git autocommit: enabled (bundle history is being recorded)"); + // stderr: stdout is the MCP protocol stream on this transport. + console.error("[understory] git autocommit: enabled (bundle history is being recorded)"); } const server = await buildMcpServer(kb);