Skip to content

support proactive-voice discussion for sessions, with a locking bus to guarantee sequential chats #422

Description

@kwannoel

Summary

Add support for proactive-voice discussion capabilities for sessions, where the system can initiate conversations with the user rather than only responding. Implement a locking bus mechanism to guarantee that chats within a session are processed sequentially, preventing race conditions from concurrent messages.

Details

Currently, sessions only support reactive interactions — the user sends a message and gets a response. This feature introduces proactive-voice discussion, allowing the system to surface observations, suggestions, or status updates without being prompted.

Key requirements:

  • Proactive messaging: Sessions can emit discussion messages triggered by events (e.g., task completion, errors, idle detection)
  • Locking bus: A sequential message bus that acquires a lock before processing each chat message, ensuring strict ordering and preventing interleaving of proactive and user-initiated messages
  • Lock lifecycle: Lock is acquired before sending, held through response completion, then released for the next queued message
  • Queue management: When the bus is locked, incoming messages (both proactive and user-driven) are queued and processed FIFO
  • Backpressure: Configurable queue depth to prevent unbounded accumulation of proactive messages

This ensures conversation coherence regardless of whether messages originate from the user or the system.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions