comment: prevent infinite loop in result reconciliation on fatal errors

This commit is contained in:
2026-07-17 17:22:18 +08:00
parent 0d22ee5d71
commit 2829344d3d
@@ -115,6 +115,10 @@ pub async fn reconcile_editor_agent_tool_calls(
}
if let Some(error) = last_reconcile_error {
// unlikely.
// if we don't mark this as failed,
// the client will poll external job id -> found completed -> get conv and reconcile again,
// if here is fatal, it will be stuck in a loop.
mark_result_reconcile_failed(&mut document.messages[message_index], error);
reconciled.push(document.messages[message_index].clone());
}