From b8ef9ef4b77193e48d17723c9a3fddbafe8ee83c Mon Sep 17 00:00:00 2001 From: cfdaily Date: Tue, 26 May 2026 13:48:56 +0800 Subject: [PATCH] auto-sync: 2026-05-26 13:48:56 --- src/daemon/spawner.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index 2913a83..27f0e07 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -624,18 +624,17 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_ elif outcome == "fallback_timeout" and not cls["should_retry"]: # A5/A6: fallback 不应出现,标 failed + escalate + context 日志 logger.error("UNEXPECTED FALLBACK: agent=%s session=%s task=%s " - "transport=%s fallbackReason=%s counter_active=%s " + "fallback_used=%s fallback_reason=%s counter_active=%s " "This indicates counter check failed to prevent concurrent spawn.", agent_id, session_id, task_id, - meta.get("transport"), meta.get("fallbackReason"), + json_result.get("fallback_used"), json_result.get("fallback_reason"), self.counter.active_agents if self.counter else "N/A") await self._do_on_complete_async(on_complete, agent_id, outcome) if db_path and task_id: self._mark_task(db_path, task_id, "failed", { "reason": "unexpected_fallback", - "transport": meta.get("transport"), - "fallback_reason": meta.get("fallbackReason"), - "duration_ms": meta.get("durationMs"), + "status": json_result.get("status"), + "fallback_reason": json_result.get("fallback_reason"), }) else: # 其他:A1(completed), A4(agent_failed), A7(auth_failed),