Have you tried swapping the order of the two rules and adding a [L]
flag to the adaptive images rule?
<IfModule mod_rewrite.c>
RewriteEngine On
# prevent any looping
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]
# HiDPI
# http://cup.wpcoder.de/wordpress-hidpi-bilder/
RewriteCond %{HTTP_COOKIE} HTTP_IS_HIDPI
RewriteCond %{DOCUMENT_ROOT}/$1-554x380.$2 -f
RewriteRule ^(cms/assets.+)-277x190\.(jpe?g|png)$ $1-554x380.$2 [L]
# Adaptive-Images
# http://adaptive-images.com
RewriteCond %{REQUEST_URI} cms/assets
RewriteRule \.(?:jpe?g|gif|png)$ cms/wp-content/themes/roots/inc/adaptive-images.php [L]
</IfModule>
It seems like if the request is specifically for 277x190
sized images, the HiDPI rules will therefore match first. Otherwise, the Adaptive rule will match.