Problem
When an event fires, PubSub.__call__ iterates all subscribers sequentially and awaits each one. If one WebSocket subscriber is slow (congested client), it delays event delivery to all other subscribers for that conversation.
Location: pub_sub.py:63–74
Evidence
Code review of pub_sub.py:63–74.
Severity: Medium
Impact of fix
Slow clients don't block other subscribers.
Suggested fixes
- Use
asyncio.gather for concurrent dispatch
- Or give each subscriber its own asyncio queue with independent drain
Discovered during profiling investigation (code review), May 2026. openhands-agent-server v1.19.1.
Problem
When an event fires,
PubSub.__call__iterates all subscribers sequentially and awaits each one. If one WebSocket subscriber is slow (congested client), it delays event delivery to all other subscribers for that conversation.Location:
pub_sub.py:63–74Evidence
Code review of
pub_sub.py:63–74.Severity: Medium
Impact of fix
Slow clients don't block other subscribers.
Suggested fixes
asyncio.gatherfor concurrent dispatchDiscovered during profiling investigation (code review), May 2026. openhands-agent-server v1.19.1.