@runloop/remote-agents-sdk
    Preparing search index...

    Function runConnectionReadLoop

    • Runs a protocol-neutral message read loop that resubscribes indefinitely.

      The broker evicts idle axons (cleanly closing every subscriber stream), so both clean stream ends and transient errors trigger a reconnect with after_sequence set to the last seen sequence (handled by the transport), with exponential backoff between consecutive failures (see runStreamResubscribeLoop). Fatal broker errors permanently terminate the connection; unretryable subscribe errors (HTTP 401/403/404) surface through onTerminalError. Transient errors are reported through onError on every occurrence.

      Type Parameters

      • TMessage

      Returns Promise<void>