From 0734b1f3a5b9034bfb2bd6e76b8668f558fef377 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Wed, 2 Sep 2026 19:50:07 -0500 Subject: [PATCH] fix(launcher): detach stdin on agent container run (#5) pi print mode reads piped stdin until EOF; an attached terminal stdin blocked the one-shot run forever. Automated contexts (closed stdin) never exposed it. Request text comes from the compose command. Proven: tail -f /dev/null | scripts/hello.sh now returns MOSAIC_HELLO_OK in ~4s (previously timed out at 30s); verify.sh remains green. Closes #5 --- scripts/hello.sh | 5 ++++- scripts/verify.sh | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/hello.sh b/scripts/hello.sh index c2b23598..bbbaf57a 100755 --- a/scripts/hello.sh +++ b/scripts/hello.sh @@ -15,5 +15,8 @@ load_config bootstrap_runtime_dir # -T: no pseudo-TTY, so stdout is clean model output. +# /dev/null 2>&1; then fi # 2. Run the agent request (stdout only = model response). +# stdin detached: see hello.sh — print mode would block on a terminal. set +e -RESPONSE="$(docker compose run --rm -T mosaic-agent 2>/tmp/mosaic-poc-stderr.$$)" +RESPONSE="$(docker compose run --rm -T mosaic-agent /tmp/mosaic-poc-stderr.$$)" RC=$? set -e STDERR_FILE="/tmp/mosaic-poc-stderr.$$"