From 290eace01b6bdf05538b852d8e6b692d41da2b51 Mon Sep 17 00:00:00 2001 From: chungyeong Date: Fri, 13 Mar 2026 23:04:13 +0900 Subject: [PATCH] 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 --- cross_eval/agent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cross_eval/agent.py b/cross_eval/agent.py index f97d1f7..3844520 100644 --- a/cross_eval/agent.py +++ b/cross_eval/agent.py @@ -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 "