ductor
ductor copied to clipboard
UpdateObserver runs on all agents instead of main only
Bug
In a multi-agent setup, every agent starts its own UpdateObserver instance. This means:
- Multiple agents check for updates independently
- Multiple agents send update notifications to the user
- Unnecessary network requests and duplicate messages
Root cause
In messenger/telegram/startup.py:
if is_upgradeable() and bot.config.update_check:
bot._update_observer = UpdateObserver(notify=bot._on_update_available)
bot._update_observer.start()
There is no check for agent name — all agents start the observer.
Expected behavior
Only the main agent should check for updates and notify the user. Sub-agents should skip UpdateObserver.
Suggested fix
Add an agent name check:
if is_upgradeable() and bot.config.update_check and bot._agent_name == "main":
Fixed in v0.15.0. I added an agent name check so only the main agent starts the UpdateObserver. Sub-agents no longer produce duplicate update checks or notifications.