From 57b52df17fd0fc25a259f494216128dea2df5b11 Mon Sep 17 00:00:00 2001 From: dfj Date: Wed, 11 Nov 2026 18:30:24 +0100 Subject: [PATCH] Mirror server output into the WSL console window The run_ wrappers now tee the server's stdout/stderr into the launching console (the window the plugin opens) in addition to the log file, and title the window per model. Closing the window kills only tee; Python raises BrokenPipeError on the dead pipe and the logging module contains it, so the server keeps running. pipefail keeps the EXIT= line reporting the launcher's exit code. --- launchers/run_agents_a1.sh | 10 +++++++++- launchers/run_fast_unsloth.sh | 10 +++++++++- launchers/run_qwen36_unc.sh | 10 +++++++++- launchers/run_uncensored.sh | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/launchers/run_agents_a1.sh b/launchers/run_agents_a1.sh index 06fe7e0..ce65a91 100644 --- a/launchers/run_agents_a1.sh +++ b/launchers/run_agents_a1.sh @@ -1,5 +1,13 @@ #!/bin/bash +# Console + log wrapper used by the OpenCode plugins. +# tee mirrors the server's output into the launching console (the WSL window +# the plugin opens) while the log file stays the durable record. Closing the +# window kills only tee and stops the log growing; Python raises +# BrokenPipeError on the dead pipe (no SIGPIPE death) and the logging module +# contains it, so the server keeps running. DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) cd /home/dfj -bash "$DIR/launch_agents_a1.sh" > /home/dfj/agents_a1.log 2>&1 +title "vllm: agents-a1" 2>/dev/null || true +set -o pipefail +bash "$DIR/launch_agents_a1.sh" 2>&1 | tee /home/dfj/agents_a1.log echo "EXIT=$?" >> /home/dfj/agents_a1.log diff --git a/launchers/run_fast_unsloth.sh b/launchers/run_fast_unsloth.sh index 80bc0cf..cff9a29 100644 --- a/launchers/run_fast_unsloth.sh +++ b/launchers/run_fast_unsloth.sh @@ -1,5 +1,13 @@ #!/bin/bash +# Console + log wrapper used by the OpenCode plugins. +# tee mirrors the server's output into the launching console (the WSL window +# the plugin opens) while the log file stays the durable record. Closing the +# window kills only tee and stops the log growing; Python raises +# BrokenPipeError on the dead pipe (no SIGPIPE death) and the logging module +# contains it, so the server keeps running. DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) cd /home/dfj -bash "$DIR/launch_fast_unsloth.sh" > /home/dfj/fast_unsloth.log 2>&1 +title "vllm: qwen3.8-fast" 2>/dev/null || true +set -o pipefail +bash "$DIR/launch_fast_unsloth.sh" 2>&1 | tee /home/dfj/fast_unsloth.log echo "EXIT=$?" >> /home/dfj/fast_unsloth.log diff --git a/launchers/run_qwen36_unc.sh b/launchers/run_qwen36_unc.sh index 07c6138..6ba41fd 100644 --- a/launchers/run_qwen36_unc.sh +++ b/launchers/run_qwen36_unc.sh @@ -1,5 +1,13 @@ #!/bin/bash +# Console + log wrapper used by the OpenCode plugins. +# tee mirrors the server's output into the launching console (the WSL window +# the plugin opens) while the log file stays the durable record. Closing the +# window kills only tee and stops the log growing; Python raises +# BrokenPipeError on the dead pipe (no SIGPIPE death) and the logging module +# contains it, so the server keeps running. DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) cd /home/dfj -bash "$DIR/launch_qwen36_unc.sh" > /home/dfj/qwen36_unc.log 2>&1 +title "vllm: qwen3.6-uncensored" 2>/dev/null || true +set -o pipefail +bash "$DIR/launch_qwen36_unc.sh" 2>&1 | tee /home/dfj/qwen36_unc.log echo "EXIT=$?" >> /home/dfj/qwen36_unc.log diff --git a/launchers/run_uncensored.sh b/launchers/run_uncensored.sh index 1c61e44..14a7210 100644 --- a/launchers/run_uncensored.sh +++ b/launchers/run_uncensored.sh @@ -1,5 +1,13 @@ #!/bin/bash +# Console + log wrapper used by the OpenCode plugins. +# tee mirrors the server's output into the launching console (the WSL window +# the plugin opens) while the log file stays the durable record. Closing the +# window kills only tee and stops the log growing; Python raises +# BrokenPipeError on the dead pipe (no SIGPIPE death) and the logging module +# contains it, so the server keeps running. DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) cd /home/dfj -bash "$DIR/launch_inner.sh" > /home/dfj/uncensored.log 2>&1 +title "vllm: qwen3.8-uncensored" 2>/dev/null || true +set -o pipefail +bash "$DIR/launch_inner.sh" 2>&1 | tee /home/dfj/uncensored.log echo "EXIT=$?" >> /home/dfj/uncensored.log