ductor icon indicating copy to clipboard operation
ductor copied to clipboard

/model command blocked by other topics in same group chat

Open alexeymorozua opened this issue 8 months ago • 1 comments

Summary

In a Telegram supergroup with forum topics, the /model command is blocked with "Agent is working" if any topic has an active CLI process, even though topics are independent sessions.

Steps to reproduce

  1. Open Topic A (e.g. "Server") and send a message — CLI starts processing
  2. Open Topic B (e.g. "Media") and send /model
  3. Expected: Model selector buttons appear (Topic B has no active process)
  4. Actual: "Agent is working. Use /stop to terminate first, then switch models."

Root cause

In messenger/telegram/app.py line ~798:

if self._sequential.is_busy(chat_id) or self._orch.is_chat_busy(chat_id):

The busy check uses chat_id (group ID), which is the same for all topics. It should also consider thread_id to allow independent /model per topic.

Environment

  • Ductor v0.14.0
  • Telegram supergroup with forum topics enabled
  • Multiple topics with independent sessions

Workaround

Switch model when no other topic is processing, or use /stop first.

alexeymorozua avatar Mar 13 '26 09:03 alexeymorozua

Fixed in v0.15.0. I reworked the /model command to never block — the selector opens instantly even during active processes. ProcessRegistry now tracks topic_id, so busy checks are per-topic. The switch happens immediately with an info note if a process is still running.

PleasePrompto avatar Mar 14 '26 13:03 PleasePrompto