diff --git a/src/daemon/ticker.py b/src/daemon/ticker.py index d3da121..a4f2198 100644 --- a/src/daemon/ticker.py +++ b/src/daemon/ticker.py @@ -1307,8 +1307,8 @@ Parent Task ID: {parent_task.id} pass # v2.7.2: 进程存活性检查 — counter 占用但进程已死的兜底 - if self.spawner and self.counter: - for agent_id in list(self.counter.active_agents.keys()): + if self.spawner and self.counter and hasattr(self.counter, "active_agents"): + for agent_id in list(self.counter.active_agents.keys()) if hasattr(self.counter, "active_agents") else []: session_info = self.spawner.get_session_by_agent(agent_id) if not session_info: continue