Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

Stop the clock redrawing turns for offline agents (CHOO-3013) (#715)

Abel Dantasde93f30783af
diff --git a/core/switch_core/session_activity/publisher.py b/core/switch_core/session_activity/publisher.py
index 0e233f2b7..fc69b9fdf 100644
--- a/core/switch_core/session_activity/publisher.py
+++ b/core/switch_core/session_activity/publisher.py
@@ -325,10 +325,9 @@ class AgentSessionActivityPublisher:
clock = self._adapter.redraws_for_elapsed_time
for keys in (self._live_turns, self._open_cards):
for key, agent_id in list(keys.items()):
- moved = self._online_seen.get(agent_id) != self._agent_online(
- agent_id
- )
- if moved or (clock and keys is self._live_turns):
+ online = self._agent_online(agent_id)
+ moved = self._online_seen.get(agent_id) != online
+ if moved or (clock and online and keys is self._live_turns):
self._enqueue(key)
async def _handle(self, key: _Key) -> None: