The following contains spoilers for Star Trek: Prodigy Season 1, Episode 17, "Ghost in the Machine," now streaming on Paramount+.

Star Trek: Prodigy has a nifty way of reinventing past Star Trek dilemmas, whether it's the Kobayashi Maru or a crashed shuttle with a singular name. Season 1, Episode 17, "Ghost in the Machine" continues that tradition, with a new wrinkle in the favorite franchise dilemma: the malfunctioning holodeck. More specifically, it riffs on a classic episode of Star Trek: The Next Generation in which a holographic version of Professor Moriarty traps several members of the crew in a simulacrum of the Enterprise that they believe to be the real thing.

The Prodigy episode's choice of setting, and plot, is telling. While it isn't directly connected to the events of the upcoming third season of Picard, its use of the gag clearly signals things to come. Moriarty is slated to return on Picard, and "Ghost in the Machine" has quietly suggested that fans brush up on his past appearances without compromising its ability to tell its own story.

RELATED: Star Trek Prodigy's Jameela Jamil Dishes on THAT Big Reveal

Professor Moriarty Is One of Star Trek's Unique Antagonists

moriarty-star-trek-next-generation

Moriarty first appears in The Next Generation Season 2, Episode 3, "Elementary Dear Data." To make their Sherlock Holmes holodeck program more challenging, Geordi instructs the computer to create a foe capable of outwitting Data. It's an unfortunate slip of the tongue -- Geordi means a foe capable of outwitting Holmes, whom Data plays in the holodeck to the engineer's Doctor Watson -- which results in the program's Moriarty gaining self-awareness.

That returns to bite the crew in Season 6, Episode 12, "Ship in a Bottle." Unable to leave the holodeck and wearying of his time trapped there, Moriarty lures Data, Lt. Barclay and Picard into a holographic version of the Enterprise, indistinguishable from the real one. They believe they're in the "real" world while they're actually stuck in the holodeck with him the whole time. The trio eventually solves the dilemma by making Moriarty believe that he has freed himself from the holodeck, then leave his program running in a memory module, where he could experience a lifetime in the 24th century unaware that he was still in a computer's data banks.

RELATED: Star Trek: Prodigy Gives the Federation's Overlooked Founders Their Due

Prodigy Makes a Nod to Moriarty Without Harming Its Own Narrative

star trek prodigy e17 crew

"Ghost in the Machine" finds the Protostar crew using the holodeck to puzzle out how to safely contact the Federation. They eventually give up and leave, only to find themselves in a simulacrum of the Protostar still within the holodeck. The remainder of the episode concerns their efforts to find a way out, as well as determining why the holodeck malfunctioned in the first place.

Unlike "Ship in a Bottle," the Prodigy episode gets the twist out of the way early. The crew figures out that their spaceship is make-believe in the episode's first few minutes, while Picard and his friends don't solve the mystery until late in the second act. That's in keeping with Prodigy's need to focus on its own crew's dilemma of getting back to the Federation, in which their malfunctioning holodeck program plays a large part. Moriarty doesn't come into play at all (though someone similar does), and while "Ghost in the Machine" openly tips its cap to "Ship in a Bottle," it borrows only the concept and leaves the remaining details untouched.

Yet its placement in the schedule -- a short time before Moriarty's return on Picard -- is a quiet nudge to Star Trek fans to do a little catching up. With Star Trek's new line of shows so tightly scheduled, it's hard to believe that it's a mistake. The specifics of it let Prodigy continue with its own storyline unimpeded, as well as making an excellent episode in and of itself. Moriarty differs from other Star Trek antagonists in that his wishes are not unreasonable and his emotions are quite justified. Picard may change all of that, making Prodigy's subtle admonition all the more important.

New episodes of Star Trek: Prodigy stream every Thursday on Paramount+.