Set aboard the flagship of the Universal Union Space Fleet, the novel opens with a prologue establishing its central mystery. Ensign Tom Davis accompanies Captain Lucius Abernathy, Science Officer Q'eeng, and Chief Engineer Paul West on a mission to explore a cave on the planet Borgovia. Another ensign is killed immediately by carnivorous land worms. Davis, stranded on a boulder, experiences strange intrusive thoughts about Abernathy's past that he has no reason to know. He feels compelled to run despite orders and is killed. In his final moments, he glimpses his death's true purpose: to serve as a dramatic catalyst in a storyline about Abernathy and Davis's father.
Ensign Andrew Dahl, a former seminary student on the alien planet Forshan, arrives at Earth Dock for his assignment to the Intrepid. He meets Ensign Maia Duvall, a former ground forces soldier transferring from the starship Nantes; his friend Jimmy Hanson, son of one of the wealthiest men in the Universal Union; Finn, a resourceful smuggler of quasi-legal alien substances; and Hester, Finn's reluctant associate. All five board the shuttle together.
Aboard the Intrepid, Dahl notices unsettling behavior. Crew members scatter from Q'eeng's path. Dahl's lab mates in the Xenobiology department vanish whenever senior officers approach. At mess, the five newcomers discover they all replaced crew who died on away missions, and that everyone aboard seems deeply disturbed by the dangers these missions pose.
The strangeness deepens when Dahl is ordered to produce a cure for the Merovian Plague in six hours using "the Box," a device resembling a microwave oven that no one can explain. After five and a half hours, the Box outputs scrolling gibberish to his tablet. Dahl is coached through a ritual: deliver the data to Q'eeng, point out one fabricated flaw, and let Q'eeng "solve" it. The performance makes no scientific sense but always works. Afterward, a wild-looking, reclusive crew member named Jenkins warns Dahl to "stay off the bridge" and "avoid the Narrative," a force Dahl will later learn is a television show intruding on and warping their reality, then vanishes into the cargo tunnels.
On his first away mission, Dahl witnesses the pattern firsthand. Lieutenant Kerensky, an astrogator who appeared near death from plague just a week earlier, leads the team to a space station overrun by killer machines. Two crew members die while Kerensky survives despite serious injuries. Dahl's lab mates explain what the veteran crew already knows: A strong correlation exists between away missions involving five specific officers and crew deaths. An illegal tracking system built by Jenkins alerts certain crew when these officers approach, allowing them to avoid dangerous assignments. Hanson adds a darker insight: Veterans never warned the newcomers because uninformed arrivals absorb the deaths in their place.
After surviving another nearly fatal mission where two terrified lab mates try to kill Dahl, hoping one death will trigger the "Sacrificial Effect" and spare the rest, Dahl is punitively transferred to the bridge by his superior, Lieutenant Collins. He tracks Jenkins to a hidden cargo hub deep in the ship's tunnels.
Jenkins, whose wife Margaret was killed on an away mission, presents his theory using statistical analysis. Crew fatality rates spiked five years ago around five specific officers who exhibit statistically impossible survival patterns. The only ship with comparable data is the starship Enterprise from
Star Trek. Jenkins concludes that their reality is being intruded upon by a science fiction television show he calls "the Narrative." The five officers are the show's stars; Dahl and his friends are "glorified extras," given just enough backstory for audiences to care before they are killed off. Finn disputes the theory, calling it an insanity feedback loop.
Dahl's first day on the bridge confirms Jenkins' predictions: inertial dampeners, systems that counteract acceleration forces, fail only during dramatic moments; stations explode in showers of sparks; and officers deliver portentous lines followed by pauses Jenkins calls "lead-outs to commercial breaks." When Duvall is assigned to a mission tied to her personal history aboard the Nantes, Finn drugs her unconscious to prevent a dramatically scripted death and takes her place. Aboard the Nantes, Finn encounters Jer Weston, a former crewmate who turns out to be the suspected rebel spy who seized the ship. Weston detonates a bomb implanted in his skull during an interrogation with Abernathy, killing Finn. In his final moments, Finn grips Dahl's hand and whispers, "Find a way to stop this."
Devastated, Dahl demands a solution. Jenkins proposes time travel: fly a shuttle toward a black hole to reach the show's production era and convince its creators to stop killing crew. The plan requires a kidnapped main character whose plot armor will protect the shuttle and must be completed within six days before their atoms revert to their original temporal positions.
The group drugs and crates Kerensky, steals a shuttle, and arrives in 2012 Los Angeles. Dahl discovers their show is called
Chronicles of the Intrepid and contacts Brian Abnett, the actor who plays him. Abnett helps arrange access to Marc Corey, the actor who plays Kerensky. After Kerensky and Corey forge a profound personal connection, Corey pressures the show's creator, Charles Paulson, into a meeting.
At Paulson Productions, the crew discovers that Paulson's son, Matthew Paulson, who is in a coma after a motorcycle accident, is the actor who plays Hester. Dahl formulates a plan: Hester stays in the 21st century while Matthew's comatose body goes aboard the shuttle. Head writer Nick Weinstein writes an episode identifying the person on the shuttle as "Jasper Allen Hester," exploiting the show's sloppy internal logic so the Narrative's advanced medicine heals him. Hester volunteers, reasoning that his expendable life can finally serve a purpose. Dahl negotiates terms: None of his crew will be killed, the show will stop randomly killing extras, and the series will end the following season. Paulson agrees. Before departing, Dahl delivers Jenkins' photos and letters to Samantha Martinez, the actress who played Margaret.
The group returns through the black hole and emerges above Forshan in the middle of a massive space battle from Weinstein's hastily written episode. Fighting to reach the Intrepid and use the Box to resolve the Narrative's plot, Dahl is impaled by debris. Dying, he pushes the tablet into Kerensky's hands. Jenkins rescues him from the wreckage.
Dahl wakes four days later. Hester stands over him, alive and himself: The swap worked. Q'eeng delivers a classified message that is actually a filmed scene from Paulson, confirming all promises will be honored. Dahl is promoted to lieutenant. In a final conversation, Dahl tells Hanson he believes he is the protagonist of something larger, perhaps a novel. Hanson neither confirms nor denies this, telling Dahl that whatever he wants to be will soon be up to him alone. The novel closes with a fake-out announcing the Intrepid's destruction, immediately corrected: "They all lived happily ever after. Seriously."
Three codas follow. In the first, Weinstein grapples with writer's block after learning his characters are real, breaking through when dead crew members confront him in a dream and demand not fewer deaths but better-written ones. In the second, Matthew Paulson wakes in his healed body with no memory of the swap and finds a video message from Hester challenging him to stop drifting through life. In the third, Samantha Martinez processes the legacy of Jenkins' wife Margaret through photos and letters, burns and scatters them in the ocean, and meets Weinstein on the beach. She puts her arm around him as they walk away together.