From 2829344d3d81a90d1000236976e6e3894bd8b941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 17 Jul 2026 17:22:18 +0800 Subject: [PATCH] comment: prevent infinite loop in result reconciliation on fatal errors --- server-rs/crates/api-server/src/editor_agent/reconcile.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server-rs/crates/api-server/src/editor_agent/reconcile.rs b/server-rs/crates/api-server/src/editor_agent/reconcile.rs index eeb057e56..3e7606d6e 100644 --- a/server-rs/crates/api-server/src/editor_agent/reconcile.rs +++ b/server-rs/crates/api-server/src/editor_agent/reconcile.rs @@ -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()); }