From 32829ae8baa99f5ff6ee88789bf21f3977a26ae6 Mon Sep 17 00:00:00 2001 From: Markus Hofstetter Date: Sat, 13 Jun 2026 11:42:04 +0200 Subject: [PATCH] feat: add debug logging for session directory and file in review script Includes additional diagnostic outputs for PI_DEBUG mode: contents of the session directory and the selected session file. --- scripts/review.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/review.sh b/scripts/review.sh index 4c78695..5f9530b 100755 --- a/scripts/review.sh +++ b/scripts/review.sh @@ -255,9 +255,14 @@ if [ ! -s /tmp/pi-review.md ]; then exit 1 fi +echo "Debug mode: PI_DEBUG=${PI_DEBUG}" + # If debug mode, extract tool calls from session and append to review if [ "${PI_DEBUG}" = "true" ]; then + echo "Session dir contents:" + find /tmp/pi-session -type f 2>/dev/null || echo " (none)" SESSION_FILE=$(find /tmp/pi-session -name '*.jsonl' -type f 2>/dev/null | head -1) + echo "Session file: ${SESSION_FILE:-}" TOOL_LOG="" if [ -n "${SESSION_FILE}" ]; then