fix(session): auto-clear stuck conversation on invalid tool call ID mismatch (#555)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jason Carreira
2026-03-11 18:18:02 -04:00
committed by GitHub
parent 535e5680c3
commit e38f5a4db7
3 changed files with 34 additions and 2 deletions

View File

@@ -895,8 +895,9 @@ export async function recoverOrphanedConversationApproval(
streaming: false,
});
} catch (batchError) {
const batchErrMsg = batchError instanceof Error ? batchError.message : String(batchError);
log.warn(`Failed to submit approval denial batch for run ${runId} (${approvals.length} tool call(s)):`, batchError);
details.push(`Failed to deny ${approvals.length} approval(s) from run ${runId}`);
details.push(`Failed to deny ${approvals.length} approval(s) from run ${runId}: ${batchErrMsg}`);
continue;
}