From 601eff13efb59ed3cf9a81f248b0b2f491a8ca6c Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 23 May 2026 00:39:19 +0800 Subject: [PATCH] auto-sync: 2026-05-23 00:39:19 --- src/daemon/spawner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index 6f61194..05b3051 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -561,6 +561,10 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_ retry_counts = self._get_retry_counts(db_path, task_id) count = retry_counts.get(retry_field, 0) + 1 + # 更新计数器并写回最新 attempt 的 metadata + retry_counts[retry_field] = count + self._update_retry_counts(db_path, task_id, retry_counts) + if count >= self.max_retries: logger.error("Agent %s max retries (session=%s, %s=%d)", agent_id, session_id, retry_field, count)