From 93d65d9a3445423706639d9f7dc8fec11fad2654 Mon Sep 17 00:00:00 2001 From: RichardDillman Date: Sun, 7 Dec 2025 16:21:36 -0500 Subject: [PATCH] Fix: Add -p flag when spawning Claude with a prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without -p flag, Claude expects input from stdin and fails with: "Input must be provided either through stdin or as a prompt argument" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/claude-spawner.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/claude-spawner.ts b/src/claude-spawner.ts index 37f1abe..a449d60 100644 --- a/src/claude-spawner.ts +++ b/src/claude-spawner.ts @@ -78,7 +78,9 @@ export async function spawnClaude( const projectEnv = loadEnvFile(project.path); // Spawn Claude Code - const claudeProcess = spawn('claude', initialPrompt ? [initialPrompt] : [], { + // Use -p flag to pass prompt, otherwise Claude expects stdin + const args = initialPrompt ? ['-p', initialPrompt] : []; + const claudeProcess = spawn('claude', args, { cwd: project.path, stdio: ['ignore', 'pipe', 'pipe'], detached: true,