From aaa40be407ba4d19c46e5cb31fc44b192e1eaca4 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 15 Jun 2026 11:18:16 +0200 Subject: [PATCH] Oi,Wtf: fix flush race, print session name at end --- scripts/Oi | 5 ++++- scripts/Wtf | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/Oi b/scripts/Oi index 899475b..d41df6e 100644 --- a/scripts/Oi +++ b/scripts/Oi @@ -79,6 +79,9 @@ fi printf '%b' "$context\n\nAcknowledge context. What are we working on?" | try tee "$NAV_PATH/prompt" >/dev/null # Wait for agent to finish, then print response -offset=$(cat "$NAV_PATH/offset") +while [ "$(cat "$NAV_PATH/statewait")" = "idle" ]; do :; done while [ "$(cat "$NAV_PATH/statewait")" != "idle" ]; do :; done +sleep 0.1 +offset=$(cat "$NAV_PATH/offset") tail -c +$((offset + 1)) "$NAV_PATH/chat" +printf '\n%s\n' "$NAV_NAME" diff --git a/scripts/Wtf b/scripts/Wtf index f6f4158..a2e10ac 100755 --- a/scripts/Wtf +++ b/scripts/Wtf @@ -79,6 +79,9 @@ fi printf '%b' "$context\n\nWhat does this code do?" | try tee "$NAV_PATH/prompt" >/dev/null # Wait for agent to finish, then print response -offset=$(cat "$NAV_PATH/offset") +while [ "$(cat "$NAV_PATH/statewait")" = "idle" ]; do :; done while [ "$(cat "$NAV_PATH/statewait")" != "idle" ]; do :; done +sleep 0.1 +offset=$(cat "$NAV_PATH/offset") tail -c +$((offset + 1)) "$NAV_PATH/chat" +printf '\n%s\n' "$NAV_NAME"