Idle, Close, And Reconnect

ConversationIdleNotify → grace expires → ConversationClosedNotify → reconnect·rejoin

Idle, Close, And Reconnect ConversationIdleNotify → grace expires → ConversationClosedNotify → reconnect·rejoin ConversationIdleNotify ConversationIdleNotify ConversationIdleNotify grace expires → ConversationClosedNotify ConversationClosedNotify ConversationClosedNotify STREAM reconnect AuthenticateReq(same token) AuthenticateRes JoinConversationReq(metadata ConversationId) JoinConversationReq JoinConversationRes(scheduled=false) JoinConversationRes(scheduled=false) Customer Client · Sequence participant Customer Client Session · Sequence participant Session ConversationSpot · Sequence participant ConversationSpot Agent Client · Sequence participant Agent Client

Idle·grace·close transitions

  • • After the domain idle deadline passes since the last message, ConversationSpot transitions to WaitingForClose and sends ConversationIdleNotify to both sides. If a message arrives within the grace timeout, it returns to Active; otherwise it sends Closed and ConversationClosedNotify. An explicit close transitions directly to Closed.
  • • The original's P→P self-message 'grace deadline expires' is merged into the following ConversationClosedNotify arrow's label ('grace expires → …') because archify sequence doesn't support self-messages.

Reconnect relay rules

  • • Reconnecting doesn't recreate the actor or the Conversation state — it returns the current state with scheduled=false. The Agent re-binds the roster actor, sends SetAgentAvailableReq(true), and then sends JoinConversationReq for each conversation that was open.
  • • Session relays to the agent's conversation actor when the metadata ConversationId is found in the agent conversation-actor map, and relays a customer map miss to the customer identity actor.
  • • When preparation and reconnect assertions across several processes take longer than the idle deadline, the runner may send a normal typed SendChatMessageReq to renew valid application traffic — this is not a heartbeat or keepalive, and a control packet, sleep, or log line must not replace it. The actual idle and grace behavior is checked with a separate bounded wait.