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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user