Almost as soon as they returned to the present, Coulson’s team soon found themselves in the crosshairs of Hydra's General Hale, who had inherited a teleportation device with a direct link to a group of alien warlords known as the Confederacy. Before Hale came into possession of the device, the Confederacy had struck a deal with Hydra for Earth's protection in exchange for gravitonium and Inhumans, but she wasn't very interested in upholding the bargain. She eventually enlisted Coulson to help her fight back against the Confederacy, which led to the creation of Graviton. With a show of force, Graviton ultimately got the truth out of the Confederacy.
“The Confederacy never intended to honor this agreement, nor could it, even if it so desired. It was merely a deception to extort the resources from your planet before time ran out, which now it has,” the Kree member of the Confederacy finally confessed. “Thanos and his forces have begun an assault on your world even as we speak ... Thanos’ strength is unrivaled. You will lose, even with your powerful friends fighting alongside you.”
To break the story down to its most basic elements, then, the Confederacy got wind of Thanos' plans to attack Earth. Realizing this, they approached Hydra, who they believed to be Earth's custodians, after the insidious organization came into possession of the teleportation device following the attack on New York in The Avengers. The Confederacy offered Hydra a deal in order to sap Earth of its resources before Thanos destroyed it, with no intention of upholding their end of the bargain. Hale quickly realized this and turned to an old Hydra program designed to create the Destroyer of Worlds in an effort to fight back. The Destroyer of Worlds program created Graviton, who -- in the 2091 timeline -- lived up to his name and cracked the planet apart with his powers. Fortunately, Coulson and his team were able to avert this, but for a price.
As such, Thanos' impending arrival set the story of Agents of S.H.I.E.L.D. Season 5 into motion. However, he didn't even need to be involved for the stakes to feel high. He was responsible for the Confederacy's interest in Earth, but he didn't dictate their plan nor the events that followed. Thus, the show was able to craft a story all its own, while acknowledging the influence of the wider MCU in a way that wove throughout the season without feeling forced. Thanos' involvement, however light, felt organic but essential to the season-long story arc.
The crossover never dismissed the threat of the Mad Titan, but it did give Coulson's team a Thanos-level villain to deal with: Graviton. Per the 2091 timeline, his abilities were strong enough to trigger an apocalyptic event. Worse, Coulson's team -- and, by extension, the viewers -- had evidence Graviton would use his powers for a cataclysm; they witnessed first-hand the destruction he would wrought. Thus, the show never needed to explain why they weren't with the Avengers during the events of Infinity War. Their need to stop Graviton didn't need to be pointed out or overstated; all the proof the audience needed was on screen.
While Agents of S.H.I.E.L.D. didn't lean into the repercussions of Thanos' success, the show managed to pull off a spectacular season-long story arc that felt relevant to the MCU at large. Season 5 gave Coulson's team with a threat powerful enough to rival the Mad Titan, providing a satisfying explanation for their absence from the fight in Wakanda without needing to say it outright. However, the season wasn't dictated by the events taking place in the wider MCU, allowing the series to craft a fresh and unique story. With its Infinity War crossover, S.H.I.E.L.D. finally struck a balance it hadn't quite managed yet.
Returning in summer 2019 on ABC, Marvel’s Agents of S.H.I.E.L.D. stars Clark Gregg, Ming-Na Wen, Chloe Bennet, Henry Simmons, Ian De Caestecker, Natalia Cordova-Buckley and Elizabeth Henstridge.