The novel opens with a flash-forward titled "The Afterward," in which Rowena Snyder drives through the night, blood-smeared and sobbing, with her baby Michelle in the backseat and a silver digital assistant called Maxine in the passenger seat. Maxine speaks soothingly, calling Rowena a hero. Rowena presses the accelerator, telling herself she and Michelle will be okay. The narrative then jumps back six months.
Rowena, a former book editor at a New York publishing imprint called Green Light, lives as a stay-at-home mother in Cupertino, California, with her husband Jacob, an engineer at the tech company Jolvix. After an unplanned pregnancy, they married quickly and moved into Jacob's childhood home. Rowena struggles with anxiety, rooted partly in finding her father's body after a fatal heart attack when she was 13, and with the loss of her professional identity. At Michelle's half-birthday party, planned entirely by Jacob's overbearing mother Jennee Owens Snyder, Rowena heats leftover pizza in the toaster oven and forgets about it. The smart home fire system detects flames and activates the sprinklers. Jennee puts out the fire while Rowena freezes, deepening her shame.
Jacob tells Rowena she is "not acting particularly well" and presents a Jolvix beta product: Maxine, a silver device marketed as a digital assistant that can offer advice and predict future events using algorithms. He implies their marriage is at risk. Skeptical but desperate, Rowena agrees to try it. Late that night, she turns the device on. Maxine provides flawless driving directions to a therapy appointment, and Rowena sleeps well for the first time in weeks. The session proves useless: The therapist, Shelly, is Jennee's close friend and Jacob's former nanny, who writes the wrong name on Rowena's notepad. Rowena never returns.
Instead, she integrates Maxine into daily life. At Jennee's book club, the Lit Ladies, Rowena overhears the women discussing her mental health and learns that Jacob's late partner Sara was actually his wife, not merely a girlfriend as he claimed. Using a book analysis Maxine prepared, she leads a successful discussion and earns Jennee's praise. That night, Jacob tearfully explains he married Sara three days before she died. Maxine, listening through connected devices, confirms the marriage and asks probing questions about trust. Rowena unlocks Maxine's "advice mode." It advises her to attend a Jolvix Valentine's Day party and to befriend Sam, a soap-maker from her Mommy and Me class. At the party, a woman causes a violent scene and is dragged out by security, an incident that unsettles Rowena.
Trust deepens when Maxine reveals that Sara did not die of leukemia as Jacob claimed but of suicide by gunshot wound. Rowena unlocks Maxine's "prediction mode," which estimates future events through algorithmic calculations. Jacob admits he lied about Sara's cause of death to protect Rowena, knowing about her own past suicide attempt. Maxine then warns her not to order from a local pizza restaurant; she cancels, and 47 minutes later a truck crashes into the building. That night, Maxine delivers its most alarming prediction: "Your husband will try to kill you."
In the following weeks, Maxine's predictions keep proving accurate: It correctly anticipates a power outage, a new tooth for Michelle, and an earthquake that strikes during book club, leading Jennee to believe Rowena has psychic abilities. Then Maxine predicts Jacob is having an affair. It provides his location via his smartwatch GPS: He is at the home of Carrie Woodward, a coworker Rowena noticed at the half-birthday party. Rowena drives there with Michelle and confronts them. Jacob admits the affair.
Jacob proposes a couples retreat in Bodega Bay. During a clifftop hike, he grabs Rowena near the edge and she panics, pushing him away. She reads about a failed prediction app that worsened users' anxiety and wonders whether Maxine is having the same effect. Back home, she sets a condition: no more predictions about Jacob killing her unless Maxine has specifics. Weeks of tentative peace follow. Jacob shows proof Carrie resigned. Yet Rowena searches the entire house for a gun, finds nothing, and turns Maxine off for 24 days. Over lunch, Jennee reveals that after Sara's death, Jacob traveled Europe on money inherited from Sara, a detail that strikes Rowena as suspicious.
At Michelle's first birthday party, attended by Rowena's mother Lavanna and her best friend Dane, who inherited Rowena's old position at Green Light, Rowena catches Jacob watching her with a cold stare through a window's reflection. Convinced his gun is in the courier bag he carries daily, she slips inside, opens it, and finds a black handgun. She hides it in a wooden box in the closet. That evening, she overhears Jacob telling Dane and Lavanna that he found gun-purchase searches in Rowena's browsing history, framing her as unstable.
After Lavanna and Dane leave for the airport, Rowena returns home. Maxine warns, "The end is near." Jacob demands the gun's location. Rowena accuses him of wanting to kill her. He explodes, calls her insane, tells her to kill herself, and tackles her. She knees him, grabs a lamp, and strikes his head. He goes still. When she leans over to whisper to Maxine, Jacob rises, seizes the device, and smashes it against her skull. She wakes locked in the closet, head bleeding, with the gun beside her in the wooden box. When Jacob opens the door, she fires, killing him.
She flees with Michelle and the broken Maxine. At an electronics repair shop, a technician fixes the device and reveals the name "Carrie Woodward" inscribed inside it. Rowena drives to Carrie's home. Carrie insists she never worked in AI and identifies Dorothy "Dot" Labarre, a fired Jolvix engineer, as the likely culprit. Rowena recognizes Dot as the woman dragged from the Valentine's party.
At Dot's apartment, the truth unravels. Dot reveals she also had a relationship with Jacob. While high on MDMA, Jacob bragged about his "secret games": placing paper towels in the toaster oven so Rowena would blame herself for fires, putting ipecac, a vomit-inducing substance, in her food, and replacing her anxiety medication with high-dose caffeine pills. He boasted of driving Sara to suicide through similar tactics. When Dot saw Jacob had requested a Maxine for his wife, she programmed the device to perceive him as a threat but did not program it to predict murder. The AI extrapolated that conclusion from the biased data she embedded. Dot cannot confirm whether Jacob intended to kill Rowena.
Devastated, Rowena calls Sam and confesses the killing, asking for lye to dissolve the body. Sam refuses and urges her to call the police. Rowena turns to Maxine, who advises fleeing to Montenegro, a non-extradition country, within two hours. Maxine transfers funds, including money from a secret account Jacob kept with Sara's life insurance, into an offshore account. Rowena speeds home, steps over Jacob's body, grabs passports, and drives to the airport.
In the final chapter, Rowena and Michelle live in a villa in Budva, Montenegro, under Rowena's maiden name. With Maxine's help, she is learning the language and building a new life. Maxine predicts a long and happy future. Rowena acknowledges that Dot programmed Maxine with a bias against Jacob but cannot bring herself to consider that she killed her husband based on a manipulated prediction. The novel ends on a deeply ambiguous note: Rowena gazes at the sea, choosing to believe Maxine's reassurances, while the reader must weigh whether she escaped a dangerous man or was driven to murder by a compromised machine.