"The Deserter" represents the tenth installment of the second season of the television program Star Wars: The Clone Wars, as documented in Season Two. This episode, which aired on January 1, 2010, provided the conclusion to a narrative arc that commenced in the preceding episode, "Grievous Intrigue."
Obi-Wan Kenobi, in pursuit of General Grievous, arrives on Saleucami with his troops, including Commander Cody and Captain Rex. Grievous, due to damage his landing ship sustained during his escape, was forced to make planetfall on the planet's surface in an escape pod, along with a multitude of his battle droids. However, Grievous' escape pod's radio transmitter is non-functional, compelling him to locate another pod to send a message to the Separatist fleet before Kenobi's forces locate him. Grievous' droids procure a reek for the General to ride, and some eopies to serve as pack animals. Grievous forbids the battle droids from riding, forcing them to deplete their power reserves by marching alongside him.
As Kenobi's forces conduct their search, Rex informs him that the cruiser that brought them has ascended back into orbit, just before the Jedi General observes the wreckage of Grievous' landing craft. While combing the crash site for any signs, the clone troopers discover only droids too damaged to yield any intelligence, and Cody informs Kenobi that the ship's power intakes are still radiating heat. Rex reports that the ship's landing compartment is almost completely destroyed. Kenobi instructs Rex to lead troopers Jesse, Hardcase, and Kix on a patrol to investigate nearby wetlands, while he, Cody, and Crys continue their search in the immediate vicinity. As Rex and his squad depart, Cody remarks on the Captain's intelligence, a sentiment Kenobi echoes, noting his constant vigilance.
During their patrol, Rex and his team are traversing the wetlands on speeder bikes when two surviving commando droids aim a sniper rifle, striking Rex in the chest and causing him to fall from his bike. Jesse instructs Kix, the medic, to attend to Rex while he and Hardcase pursue and eliminate the commando droids. After examining the injured Captain and removing his helmet, Kix communicates to Jesse that he needs to return urgently.
Back at the crash site, a clone trooper discovers a functional droid, and Kenobi orders it to be loaded onto an AT-TE for analysis during transport. After analyzing the data, Cody reports that the droid altered its pod's descent to avoid colliding with another, and Crys informs Kenobi that he can use the data to determine the location of the other pod. Kenobi instructs Cody to inform the men that they've picked up their quarry's trail.
In the wetlands, Kix informs Jesse that Rex's injuries are critical, but he requires removing his armor to assess further. As Jesse contemplates their next course of action, he notices domesticated eopies nearby, suggesting the presence of a farm in the vicinity, and decides to seek it out. Meanwhile, Grievous grows increasingly exasperated as his battle droid escorts, one by one, exhaust their power and collapse. Upon Kix's arrival at the farm, he is surprised when the farmhouse door opens, revealing a Twi'lek woman who greets him by aiming a blaster rifle at him, prompting him to raise his hands. Jesse arrives shortly after, successfully de-escalating the situation by explaining that they only seek a place to care for their injured captain for the night, as they already have a medic. The woman, instructing her two children to return inside, mentions that her husband is away and directs the clones to some benches in the barn.
As night falls, Rex awakens as Kix is tending to his wound, and is promptly informed of the situation. He is alarmed to realize he has lost sensation in his left arm, and Kix explains that he has suffered nerve damage. Rex attempts to order Kix to provide a quick fix so they can resume their patrol, but Kix refuses, asserting that he holds authority over everyone when it comes to the health of the men. The woman, identifying herself as Suu, appears with a plate of fruit, and Jesse expresses his gratitude, assuring her that the food is sufficient. Suddenly, a ball rolls into the barn, stopping beneath the table where Rex is lying. Suu's daughter Shaeeah follows the ball, disregarding her mother's instruction to stay inside and claiming that the toy escaped her. Emerging from under the table, she notices Rex's face and stares at him for a moment before remarking, to his confusion, that he resembles her father. The other clones are equally perplexed, but Suu tells her daughter not to bother Rex, who, with a slight head shake, assumes she meant nothing by it. After mother and daughter leave, Rex reluctantly orders his men to continue the search without him, placing Jesse in command. Hardcase leaves one of Rex's blaster pistols on the table beside him as he prepares to rest.
Elsewhere, Kenobi and his men locate a Separatist escape pod, but find it empty. Deducing that Grievous must be heading to another escape pod, Kenobi attempts to contact Rex and reaches Jesse, who informs him of the captain's condition and that they have found him shelter for the night. Kenobi instructs Jesse and his patrol to reposition themselves to meet up with his forces at the final escape pod.
Later that night, Rex is briefly awakened by an eopie licking his face, prompting him to shoo it away. Shortly thereafter, a man enters the barn through the side door, grabbing a farming tool as a weapon. The man slowly advances across the room. Rex, waking up again, cautiously grabs his pistol and closes his eyes, waiting for the man to approach before sitting up and aiming the blaster at him, only to have it knocked from his hand. To Rex's astonishment, the man is another clone, and he proceeds to turn on a light, commenting that the Clone Wars have finally reached Saleucami. Rex accuses him of being a deserter, but he counters that he is merely a simple farmer and, when asked for his identification number, introduces himself as Cut Lawquane. He explains that he left the army because he no longer wanted to kill for a living, although Rex believes it wasn't Cut's decision to make since he swore an oath to the Galactic Republic. Cut retorts that he swore an oath to his family, and asks if that still counts, or if Rex intends to turn him in. At that moment, Suu and the children arrive, and Shaeeah and her younger brother Jek are overjoyed to see their father, Jek presenting him with a drawing. Shaeeah informs Cut that she told Rex he looked just like him.
Suu explains to Cut why Rex is there, and Rex is compelled to clarify that he also has a name after Cut asks him what his ID number is. Cut invites Rex to dinner, and Rex, feeling uneasy, initially declines but is persuaded to change his mind when Shaeeah and Jek insist, and Cut says they won't stop begging until he agrees. During the meal, Cut and Rex engage in a debate, with Cut asserting that the clones are still individuals, and questioning why Rex has a name instead of just a number. Rex tentatively suggests that perhaps the army's leaders see it as a more efficient way of distinguishing between the clones, but Cut retorts that the Kaminoans likely don't see it that way, arguing that names provide a sense of uniqueness in an army where everyone looks and sounds the same, and challenging Rex when he denies ever having contemplated it. Cut points out to Rex that his very presence indicates he must be considering what would happen if he chose the life he desired, and Rex counters that perhaps, by remaining in the army, he is, as he cannot fathom the potential devastation that could befall the galaxy if the Republic were to lose. Afterwards, he abruptly asks if he has gained Cut's approval, and Cut affirms, which prompts Shaeeah to inquire about the meaning of "to each his own," and her father explains that it means she is free to pursue whatever she wishes in her life.
Grievous successfully reaches the remaining functional capsule and prepares to transmit a distress signal. Informed by a droid already at the pod that lifeforms are approaching from the east and west, Grievous orders his forces to prepare for combat. When Kenobi and his men arrive, a battle ensues. As a Separatist shuttle arrives, the last AT-TE is unable to destroy it, and Kenobi engages Grievous in personal combat to prevent his escape. However, Grievous attaches himself to the shuttle with a grappling cable and manages to escape once more, leaving Kenobi disappointed.
Meanwhile, Rex and Lawquane engage in a game of dejarik, during which Rex inquires about Lawquane's reasons for leaving the army. Lawquane recounts how, after the First Battle of Geonosis, his transport was shot down, resulting in the slaughter of his brothers on board. Realizing that there was nothing he could do, Cut fled - an experience that continues to haunt him. While playing outside, Shaeeah and Jek discover a crashed Separatist escape pod in one of their fields and inadvertently activate a platoon of damaged, but still-operational commando droids inside. The droids promptly attack the farm, and Lawquane prepares to defend his family. Rex offers his assistance, and despite the droids managing to breach the farmhouse, the two clones valiantly fight them off, with Lawquane saving Rex's life.
The following morning, Rex prepares to depart on an eopie. Although it would be his duty to report Lawquane as a deserter, he respects his clone brother's desire for a peaceful life sufficiently to conveniently overlook the entire incident. He declines Lawquane's invitation to stay, departing with the words: "This is your home, Cut. My family is elsewhere."

The Blu-ray edition of The Complete Season Two includes a Jedi Temple Archives feature with the excised scene "Commando Droid Snipers."

The original episode guide slideshow incorrectly displayed an image of Hardcase, without headgear, attending to Rex after the BARC speeder incident. In the episode that aired, Kix, the team medic, was the one who stopped and his helmet remained on.
In the opening scene of the episode, Grievous expresses his need to locate an escape pod, however, it isn't until the subsequent scene that a battle droid informs him of the transmitter malfunction, leading to his decision.
Despite having deserted the Republic post-first battle of Geonosis, Cut accurately identified the Commando Droids, which were deployed shortly after said battle, approximately a year before the battle of Saleucami.