Follow up on review feedback by re-checking the active gateway state after awaiting the permission snapshot refresh. If auto-reconnect was disabled or the active gateway changed during the async gap, the stale task now exits instead of re-applying an old config.