Description
Streaming (edit-based live updates) should be decided per-thread based on multibot detection, not globally based on allow_bot_messages config.
Current Behavior
allow_bot_messages = "off" -> streaming ON (all threads)
allow_bot_messages = "mentions" -> streaming OFF (all threads)
A human chatting 1-on-1 with a bot gets no streaming just because the deployment allows bot-to-bot interaction.
Expected Behavior
Default streaming ON. Only disable when 2+ bots detected in the thread.
fn should_stream(other_bot_present: bool) -> bool {
!other_bot_present
}
Scenarios
Scenario 1: Single bot, human conversation
- Human sends
@bot-A hello in channel
- openab creates new thread
other_bot_present = false (new thread, no other bots)
- streaming ON - bot-A responds with live edit updates
- Human sends follow-up (no mention) - bot-A still alone - streaming ON
Scenario 2: Second bot joins mid-conversation
- Thread has bot-A + human (streaming ON)
- Human sends
@bot-B can you help too?
- bot-B checks thread, sees bot-A ->
other_bot_present = true
- bot-B responds with send-once (no streaming)
multibot_threads cache updated for this thread
- Human sends
@bot-A what do you think?
- bot-A checks thread, sees bot-B ->
other_bot_present = true
- bot-A switches to send-once (was streaming before, now off)
Scenario 3: Channel message without mention
- Human sends
hello everyone in channel (no @mention)
- Bot ignores - no streaming decision needed
Scenario 4: Bot-to-bot conversation
- bot-B sends
@bot-A please review this in thread
- bot-A checks thread ->
other_bot_present = true
- send-once (bot-to-bot always send-once)
Use Case
Users deploying openab with allow_bot_messages=mentions for multi-agent collaboration lose streaming in ALL threads, including 1-on-1 human conversations. This degrades the human UX unnecessarily. Per-thread streaming lets the same deployment provide live edit updates for single-bot threads while safely using send-once in multi-bot threads.
Implementation Notes
The data is already there:
multibot_threads cache tracks which threads have multiple bots
other_bot_present is computed per-thread in bot_participated_in_thread()
use_streaming() needs to change from per-adapter global to per-thread
The allow_bot_messages config should have no effect on streaming decisions.
Background
Description
Streaming (edit-based live updates) should be decided per-thread based on multibot detection, not globally based on
allow_bot_messagesconfig.Current Behavior
A human chatting 1-on-1 with a bot gets no streaming just because the deployment allows bot-to-bot interaction.
Expected Behavior
Default streaming ON. Only disable when 2+ bots detected in the thread.
Scenarios
Scenario 1: Single bot, human conversation
@bot-A helloin channelother_bot_present = false(new thread, no other bots)Scenario 2: Second bot joins mid-conversation
@bot-B can you help too?other_bot_present = truemultibot_threadscache updated for this thread@bot-A what do you think?other_bot_present = trueScenario 3: Channel message without mention
hello everyonein channel (no @mention)Scenario 4: Bot-to-bot conversation
@bot-A please review thisin threadother_bot_present = trueUse Case
Users deploying openab with
allow_bot_messages=mentionsfor multi-agent collaboration lose streaming in ALL threads, including 1-on-1 human conversations. This degrades the human UX unnecessarily. Per-thread streaming lets the same deployment provide live edit updates for single-bot threads while safely using send-once in multi-bot threads.Implementation Notes
The data is already there:
multibot_threadscache tracks which threads have multiple botsother_bot_presentis computed per-thread inbot_participated_in_thread()use_streaming()needs to change from per-adapter global to per-threadThe
allow_bot_messagesconfig should have no effect on streaming decisions.Background
use_streaming()=trueunconditionallyallow_bot_messagesconfig (global, not per-thread)