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.
This commit is contained in:
shokollm
2026-03-31 04:56:55 +00:00
parent a3c24e53b9
commit bfb8ee045b

View File

@@ -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() {