From fbb8680376c06070a59ba4c5777453c152a51414 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Fri, 10 Apr 2026 09:41:39 -0700 Subject: [PATCH] Guard against empty stdout when resolving merge conflicts Claude can exit 0 but produce no output, leaving the file blank. --- src/commands/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/helpers.ts b/src/commands/helpers.ts index 8c92ef5..d29bdf0 100644 --- a/src/commands/helpers.ts +++ b/src/commands/helpers.ts @@ -127,7 +127,7 @@ export async function resolveConflicts( "resolve this merge conflict. output ONLY the resolved file content with no markdown fences, no explanation, no surrounding text.", ) - if (resolved.exitCode !== 0) { + if (resolved.exitCode !== 0 || !resolved.stdout.trim()) { const stderr = resolved.stderr.trim() throw new Error(`Claude failed to resolve ${file}: ${stderr || "(no output)"}`) }