From 7d889cb1a8344ed0d8294d3d4648e1431caf2396 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Mon, 25 May 2026 13:43:02 +0800 Subject: [PATCH] auto-sync: 2026-05-25 13:43:02 --- src/daemon/spawner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index 8c6caf2..cda85ac 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -700,13 +700,15 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_ ) # 续杯 spawn(counter 保持占用,直到 max_retries 或最终完成时 release) + # session 策略:原始是 main session (session_id=None) 时,retry 也用 main session try: await self.spawn_full_agent( agent_id=agent_id, message=message, task_id=task_id, on_complete=on_complete, - reuse_session_id=session_id, + use_main_session=(session_id is None), + reuse_session_id=session_id if session_id else None, task_db_path=db_path, ) except Exception: