From cc052db6c7b57e9329f099fff768022033234b19 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Fri, 15 May 2026 18:11:56 +0200 Subject: [PATCH] fix(agent-loop): redirect stdin from /dev/null to prevent tmux PTY blocking Without `< /dev/null`, claude detects the tmux PTY as stdin and blocks waiting for user input that never arrives (the PTY never sends EOF). The 3-second stdin-timeout only fires for pipe stdin, not TTY stdin. Co-Authored-By: Claude Sonnet 4.6 --- scripts/agent_loop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/agent_loop.py b/scripts/agent_loop.py index c5717c7..7ad2427 100755 --- a/scripts/agent_loop.py +++ b/scripts/agent_loop.py @@ -179,7 +179,7 @@ def _start_agent(prompt: str, session_name: str) -> str: f"claude --dangerously-skip-permissions" f" --name {shlex.quote(session_name)}" f" -p {shlex.quote(prompt)}" - f" 2>&1 | tee {shlex.quote(str(log_file))}" + f" < /dev/null 2>&1 | tee {shlex.quote(str(log_file))}" ) subprocess.run( ["tmux", "new-session", "-d", "-s", session_name, "bash", "-c", shell_cmd],