Shortly after the formation of the Galactic Empire, the irregular clone commando unit Clone Force 99 was sent on a mission to Onderon to wipe out a supposed separatist outpost. However, the squad instead found a group of refugees from the rise of the Empire being protected by Saw Gerrera and his Partisans, who had once fought for the Galactic Republic. As the refugees included children, Clone Sergeant "Hunter" and most of his squad did not want to kill them. However, CT-9904 "Crosshair," the team sniper, was insistent that they follow orders as he, alone among the squad's members, had been brainwashed by his behavioral modification biochip. After meeting with Gerrera and allowing him, his fighters and the civilians to depart, Hunter destroyed a probe droid which had been sent to spy on the squad by Admiral Wilhuff Tarkin. Realizing that they could not serve the Empire, Hunter decided to return to Kamino to rescue Omega, a young enhanced clone who had attempted to warn the squad about the mission.
Prior to their escape from Kamino, Crosshair had the effects of his inhibitor chip enhanced, retaining his absolute loyalty to the Empire and causing him to turn against his former comrades. Crosshair was later sent on another mission to Onderon to succeed where Clone Force 99 had failed, accompanied by a squad of new Elite Squad Troopers, who were human recruits instead of clones. Crosshair's forces killed all of the refugees at the camp, but discovered Gerrera was no longer there.
During the Clone Wars, the planet Onderon was engaged in a civil war between the Separatist-aligned government, headed by King Sanjay Rash, and a group of rebels whose leaders included siblings Saw and Steela Gerrera. Eventually, the rebels appealed to the Jedi High Council for covert assistance, and they sent Jedi Generals Anakin Skywalker and Obi-Wan Kenobi, Jedi Commander Ahsoka Tano and Clone Captain Rex on a mission to give the rebels supplies and training. The rebels eventually succeeded in ousting Rash and his Separatist backers and restoring King Ramsis Dendup to the throne, but Steela was killed during the final battle. Saw continued to fight for the Galactic Republic, participating in the defence of Onderon when it was besieged in the final days of the war, as did many other former rebels.
In 19 BBY, the Clone Wars ended in bloodshed when Republic Supreme Chancellor Sheev Palpatine revealed himself as Darth Sidious, the Dark Lord of the Sith, and issued Order 66, a secret command which compelled the clone troopers of the Grand Army of the Republic to turn on and kill their Jedi officers. It was enforced through inhibitor chips implanted in the clones' brains by the Kaminoan cloners at their creation, which further brainwashed the clones into unquestioning and total obedience to Sidious. Shortly thereafter, Sidious' new Sith apprentice, Darth Vader, killed the Executive Separatist Council and shut down the Separatist Droid Army, bringing an end to the Confederacy of Independent Systems. Painting the unsuccessful attempt by the Jedi to arrest him as an assassination attempt, Palpatine proclaimed himself Emperor of the new Galactic Empire. Gerrera recognized the danger of the Empire immediately, and he and many of his fighters were forced into hiding in Onderon's jungles, along with many civilian refugees under their protection, as the Empire wanted them wiped out.
Although almost all of the clone army had succumbed to the brainwashing of Order 66, there were a few clones who were unaffected, among them most of the members of the irregular clone commando unit Clone Force 99. The unit was almost entirely composed of genetically defective clones with mutations which gave them advantages in certain areas of combat, and in the case of Clone Sergeant Hunter, Tech, and Wrecker, their mutations altered their cranial activity and cancelled out their chips. Echo, a later addition to the squad, was an ARC trooper who had been captured during the Battle of Lola Sayu after sustaining severe injuries in an explosion, and the Techno Union had experimented on him and implanted him with extensive cybernetics before he was discovered to be alive and rescued, with his chip thus rendered inoperable. However, Crosshair, the team's sniper, was the exception: although his altered cranial activity had an effect on his chip, it was still active, albeit less so than in standard clones. After the issuing of Order 66, the other members of the so-called "Bad Batch" noticed that Crosshair was acting unusual relatively quickly, starting with attacking Jedi Commander Caleb Dume on Kaller, although Hunter let the Padawan escape and lied about having killed him.
Shortly after the proclamation of the Empire, Admiral Wilhuff Tarkin visited Kamino to inform Prime Minister Lama Su that the Empire intended to phase out clones and begin conscripting soldiers, ostensibly on the grounds of cost. Tarkin also intended to evaluate the clones' performance, and decided that he wanted to see how Clone Force 99 did after witnessing a cafeteria brawl between the squad and regular clone troopers. He was impressed by their performance in a combat evaluation which he had switched to a live fire exercise midway through, but was troubled by their history of disobedience, although Lama Su and Chief Medical Scientist Nala Se argued that this had never hindered their mission performance. Tarkin, however, aware of a report Crosshair had secretly filed about Dume's escape, was wary about whether the team had truly executed Order 66. He decided to test the unit's loyalty by sending them to eliminate Gerrera and his people, and to dispatch a probe droid to surveil the operation. However, Tarkin told the squad that they were being sent to eliminate a Separatist force, giving them the impression they were going after remaining battle droids.
While staying at Tipoca City in the aftermath of the proclamation of the Empire, Hunter had made the acquaintance of Omega, a young female clone who worked as Nala Se's medical assistant and was fascinated with the Bad Batch. Her genetic augmentations made her highly perceptive, and she was present when Tarkin had discussed the unit's loyalties with Lama Su and Nala Se. Discerning that Tarkin disliked clones and was probably up to something, Omega approached Hunter before the squad was set to depart and asked him not to go. When he indicated that he was going on the mission regardless, she asked him to take her with them as Kamino was no longer safe, but he refused since she was not a soldier, and she warned him not to return to the planet afterwards. Clone Force 99 departed Kamino in their shuttle, the Marauder.
The Marauder landed on Onderon two kilometers away from Saw Gerrera's camp, and the Bad Batch proceeded on foot to the location they had been given. Hunter had Tech scan for droids, but he found that his scanners were being interfered with. When the team reached a vantage point to the camp, Tech surveyed the location with his translation visor and found that there were heat signatures which corresponded to people instead of droids. Echo, looking through electrobinoculars, stated that he was not sure they were either insurgents or Separatists, as there were children down there. Surprised, Hunter took the binoculars to see for himself. Wrecker asked if they were going to be fighting droids, and Tech snapped that there were none. Crosshair noted that Tarkin had specified insurgents, aiming at an elderly woman in the camp and insisting that Hunter make the call to attack.
Hunter realized that they were not alone: several of Gerrera's fighters had managed to surround them. He ordered his squad to stand down so they could figure out what was going on. The rebels revealed themselves, and one suggested that the clones follow Hunter's request. Hunter pushed down Wrecker's blaster and raised his hands, insisting that the others surrender so they could hear the Onderonians out. The Bad Batch were relieved of their weapons and escorted into the camp, where they got a good look at the civilian refugees under Gerrera's protection. Echo noted that there were former Republic fighters in the camp, and Tech wondered why they had been sent to attack people on their own side. Gerrera revealed himself, explaining that it was because they refused to fight for the Empire. Tech recognized Gerrera from reports about his history with Skywalker and Rex. One of the fighters took Hunter's blaster pistol and handed it to Gerrera.
The rebel leader surmised they had been sent to wipe his camp out, and Hunter explained they had been sent to wipe out a group of insurgents. Gerrera mockingly announced his people's presence, and asked Hunter if his group intended to wipe them out like the clones had the Jedi. Crosshair asked if that was a request, and Hunter snapped at him to stop it. Gerrera ordered his people to pack up the camp and depart. Tech noted the reports that the Jedi had attempted to kill Palpatine, but Gerrera suggested that the massacre had occurred to get them out of his way, as with his control of the clone army and unjust self-coronation as Emperor, Palpatine would rule the galaxy unless people stopped him. Hunter noted that Gerrera did not stand a chance with only a handful of fighters and limited equipment, but the rebel leader responded that it would be possible if people banded together, suggesting that civil war was about to erupt.
As the group prepared to decamp, one fighter asked Gerrera what would be done with the clones. Gerrera noted that the clones had once helped free Onderon, and turning to Hunter, he said he was offering them a choice: they could either adapt to survive, or die with the past, returning Hunter's pistol to him. Switching off the camp's central lamp, Gerrera, his fighters and the civilians departed into the night. Wrecker went to the Batch's gear and handed Hunter his helmet before picking up the crate. The squad prepared to depart the clearing back the way they had come, but Hunter stopped and looked around, sensing something briefly. Crosshair also lingered before they left. What Hunter had sensed was a Viper probe droid sent by Tarkin, which had observed the entire encounter. The droid subsequently followed the Batch back to their starship.
As they returned to the Marauder, Tech remarked that with the Republic, they had always known where they stood, but not so with the Empire. Crosshair insisted that they had to finish the mission, and Echo snapped at him to "wake up" as they had been sent after innocent civilians. When Crosshair questioned their innocence, Hunter rounded on him and demanded to know what was wrong with him. The sniper insisted that he was following orders, which Hunter retorted was exactly the problem. Crosshair argued that the insurgents were obviously plotting against the Emperor. As he and Hunter glared at each other, Hunter spotted the probe droid moving in the trees and shot it, realizing they had been followed. The squad inspected the remains of the probe droid, Wrecker expressing incredulity that Tarkin had spied on them. Echo noted that the Jedi had never done such a thing, although Crosshair suggested that he merely hadn't known of it.
Hunter recalled what Omega had said to him and realized the mission had been a trap, adding that she had warned him that Kamino was unsafe. Wrecker agreed that the girl might be right. When Crosshair questioned why Hunter was taking the word of a child, Tech revealed that he had deduced Omega was an enhanced clone and that she likely had heightened perception as a result. Echo questioned why Tech had waited so long to mention it, the specialist's answer that he had thought it was obvious being refuted by Wrecker. Hunter decided that they owed it to Omega to rescue her since she was one of them. Crosshair protested the idea due to his brainwashing, but the others agreed. They all boarded the Marauder and departed Onderon.
Returning to Kamino, Tech noted that Tipoca City's comscan was unusually silent. Landing the Marauder outside the hangar bays, the squad disembarked on orders to find Omega so they could leave. However, they were ambushed by Coruscant Guard shock troopers and confronted by Tarkin, who accused them of treason for failing to carry out their mission. They were imprisoned in a brig, where they found Omega, who had been locked up there after the Coruscant Guard had found her looking around the Batch's barracks when they had come to clear it out. Hunter told her why they had come back and asked her to leave with them, which she agreed to.
Tarkin, observing the probe droid's report, noted that Crosshair had exhibited loyalty to the Empire and had him taken away for examination, despite the rest of the Batch's protests. When the examination revealed that his inhibitor chip was partially functional, Tarkin asked Nala Se if it was possible to enhance its effects to the same level as in standard clones, and the sniper was subjected to a painful procedure to boost the effects of his chip. Becoming totally loyal to the Empire as a result, Crosshair was outfitted with new armour and weapons.
The rest of the Bad Batch broke out of imprisonment with Omega, heading to the hangar bay to reclaim their ship and equipment. Hunter intended to locate and rescue Crosshair, but the brainwashed clone confronted his former squad in the hangar along with several shock troopers, resulting in a tense firefight before the remaining Bad Batch and Omega were able to escape in the Marauder.
As part of Project War-Mantle, which involved recruiting natural-born soldiers into the Imperial ranks, Tarkin and Vice Admiral Rampart placed Crosshair in charge of a unit of four recruited Elite Squad Troopers. The group was sent on another mission to Onderon to accomplish what the Bad Batch had refused to do, attacking a rebel camp and wiping out the fighters there. At Crosshair's insistence, the recruited troopers then murdered the refugees at the camp, although trooper ES-01 was executed for refusing to follow the order to do so. However, Gerrera was not present at the camp at the time and avoided the massacre.