OK, @foundlingmother, @led-lite, @tara-noire – I think the staging here suggests that Loki will spend some time (pretending to be) working with Thanos. See how he’s standing with Thanos’s generals while Thanos threatens Thor and then breaks the cube to get the Space Stone out.
Maybe Loki will claim that he usurped the throne of Asgard so that he could recover the Tesseract for Thanos after he (shamefully) lost it by losing the battle for Midgard. Why Thanos would accept that excuse, I’m not sure… but banishing Odin and posing as him for 4 years is a pretty impressive trick.