fix: send EOF via empty stdin so Claude exits after agentic prompt
Without -p, Claude enters interactive mode and waits for more input indefinitely. Setting input="" closes the stdin pipe immediately, causing Claude to process the positional prompt and then exit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -442,7 +442,10 @@ def invoke_agent_agentic(
|
||||
input_data = prompt
|
||||
else:
|
||||
# claude: use positional arg with a pointer to the task file
|
||||
# (avoids OS arg length limits for large prompts)
|
||||
# (avoids OS arg length limits for large prompts).
|
||||
# Send empty stdin so Claude receives EOF and exits after processing
|
||||
# instead of hanging in interactive mode waiting for more input.
|
||||
input_data = ""
|
||||
cmd.append(
|
||||
f"Read the task file at {task_file} and execute all instructions in it. "
|
||||
f"Work only inside the current directory and do not modify files "
|
||||
|
||||
Reference in New Issue
Block a user