From bfb8ee045b885b271445e241ca56f17e539ca898 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Tue, 31 Mar 2026 04:56:55 +0000 Subject: [PATCH] fix(kugetsu): use --format json for session existence check Use opencode session list --format json with grep instead of table output to make check_opencode_session_exists() more reliable. This fixes issue #38 where forked sessions may not appear in the table format output, causing false 'session expired' reports. --- skills/kugetsu/scripts/kugetsu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/kugetsu/scripts/kugetsu b/skills/kugetsu/scripts/kugetsu index 1cf0b33..85c6901 100755 --- a/skills/kugetsu/scripts/kugetsu +++ b/skills/kugetsu/scripts/kugetsu @@ -303,7 +303,7 @@ validate_issue_ref() { check_opencode_session_exists() { local session_id="$1" - opencode session list 2>/dev/null | grep -q "^$session_id" + opencode session list --format json 2>/dev/null | grep -q "\"$session_id\"" } kugetsu_get_pm_context() { -- 2.49.1