ductor icon indicating copy to clipboard operation
ductor copied to clipboard

UpdateObserver runs on all agents instead of main only

Open alexeymorozua opened this issue 8 months ago • 1 comments

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":

alexeymorozua avatar Mar 12 '26 21:03 alexeymorozua

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.

PleasePrompto avatar Mar 14 '26 13:03 PleasePrompto