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
This commit is contained in:
+2
-1
@@ -31,8 +31,9 @@ if ! docker image inspect "$IMAGE" >/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 </dev/null 2>/tmp/mosaic-poc-stderr.$$)"
|
||||
RC=$?
|
||||
set -e
|
||||
STDERR_FILE="/tmp/mosaic-poc-stderr.$$"
|
||||
|
||||
Reference in New Issue
Block a user