The last time Thanos had co-ordinated an attack against the space station Knowhere, it had been, in the end, unsuccessful. Admittedly, The Mad Titan had underestimated just how many powerful beings were among the refugees to this reality, and his Chitauri army had been easily spotted well in advance, and promptly dealt with upon arrival.
But this time, Thanos had learned from his mistakes the last time. He'd enlisted the aid of several witches, telepaths, and sorcerers to mask the presence of himself and his army for as long as possible. While Cosmo had inevitably realized something was about to happen, he had no details, and precious little time to do anything about it.
The moment the invasion team arrived, Thanos and a group of his elite troops quietly slipped through to Knowhere's docking bay in a smaller starship before it could be shut down, as most of the attention was on the fleet of ships outside.
Now... with a fleet of starfighters outside the space station, and both a small army of Chitauri AND Thanos himself inside... the fight to protect the Reality Gem and it's refugees was on.