After the creation of the Galactic Empire, Cody was absorbed into the ranks of the Stormtrooper Corps. For their stellar performances, Commanders Cody and Odd Ball were given control over Squad Seven, although Major Jorir handled its day-to-day operations. The two held them off for a brief moment before the droids threw thermal detonators in their direction. In his hurry to evacuate the redoubt, Gunray left behind his mechno-chair, from the which the Republic was able to learn of the coming Separatist attack on the planet Belderone. Mace and the transports were then able to land, and the Republic forces headed to the capital city of Lessu to retake it and free the planet. Of the hundred commanders put through Alpha-17's training program, a handful were picked by Alpha-17 and assigned to Squad Seven, an elite group of cross-trained commandos made up of the Grand Army's best snipers, demolition experts, and marines, whose role was to accompany ranking Jedi on any type of mission. Skywalker and his newly arrived apprentice Ahsoka Tano managed to sneak behind enemy lines and destroy the shield generator, and the heavy cannons were able to obliterate the exposed droids. As it turns out, Utapau was acting as a temporary safe haven for the Separatist Council, with General Grievous and his droid armies acting as their protectors. Cody readied his troops to pursue the Separatist Council, which in the confusion of battle had managed to slip away. Cody's fears were confirmed when he was informed by a lieutenant that General Grievous's personal starfighter had fled the planet. He was often teamed up with Captain Rex and enjoyed friendship with him. These zombies had been controlled by Brain Worms that enabled the Queen Karina the Great to keep contact with them even after death. Early in the Clone Wars, he used a set of Phase I clone trooper armor that featured a visor, antennas, a small flood light, and orange stripes. This, however, failed, and Cody and his troopers killed her while Kenobi and Skywalker rescued Unduli and escaped the collapsing temple, along with Cody. A second wave of droids charged and then retreated, blocked by the Republic's heavy cannons. He often worked with Captain Rex, Jedi General Anakin Skywalker and his Padawan, Commander Ahsok… CC-2224 and CT-7567 quickly became friends during their training exercises before Cody was moved to the field.

While they were unable to capture the Viceroy himself, they were able to capture vital intelligence. As droid reinforcements arrived, the clones planned to use multiple explosives and liquid tibanna to destroy the base and stop the all-clear signal, which would alert the Republic to the Separatists' presence. The leader of the 7th Sky Corps, though he typically took personal command of the 212th Attack Battalion, Cody was a loyal and competent soldier who always followed his orders. After heavy fire from the AATs began to harass them, Cody ordered his men to fall back, and the droids pursued them. However, their retreat was revealed to be a ploy, as they soon charged again, but this time behind a deflector shield, making the heavy cannons useless. He is also commander of the Third Systems Army, 7th Sky Corps, and Ghost Company. This also made it possible for the drones to continue their attack after being shot or cut by a lightsaber. CC-2224 began his life as one of countless cloned officers slated for a leadership position in the Grand Army of the Republic. Commander Cody receives Order 66 from Darth Sidious.During the Battle of Utapau, Commander Cody led his team of men into Pau City, along with Parjai Squad and various other paratrooping squads.