It might be useful to implement a queue-write-based heartbeat mechanism.
For example, there might be a bug in AgentExecutor implementation where not all execution paths set TaskStatusUpdateEvent.Final and consumers never terminate.
RequestHandler can be configurable with an option like WithAgentInactivityTimeout(). The timeout will be reset whenever an event is written to a queue. And if we don't receive any activity in the specified time window, we terminate the producer-consumer errgroup.