Rush is back on Earth, in bed with his wife Gloria. He gets out of bed and goes to work cracking a code. Gloria eventually catches up to him at breakfast and reminds him that they're meeting with Dr. Browning later that day, but Rush says he can't make it and goes to his study. The board is covered with mathematical formulae and the walls are paper with more calculations.
Later, Rush gives a college lecture on mathematics and discusses his work, and is briefly taken aback when a glowing light streaks across his vision. He ignores it and continues. Afterward, friend and fellow teacher Constance asks him why he didn't go to Gloria's appointment. Rush insists that Gloria preferred to go on her own. As he talks with Constance, more lights fill his vision. Going to his office, Rush continues his work. Gloria calls to tell him that the doctor confirmed the cancer came back, but he appears unimpressed and says that he'll meet her at home sometime, but he doesn't know when.
Later, Rush returns home and listens briefly to Gloria as she plays the violin. He ignores her and goes back to the college, and finds Dr. Daniel Jackson waiting for him. Daniel wants to get Rush's help on a top-secret project. Rush responds by describing the Stargate in detail and explaining that he won't be able to get the ninth chevron engaged. Daniel is surprised to learn that Rush knows about the Stargate, and Rush explains that he has already been through all of this before. He is in a dream of his past, reliving everything due to a side effect of the process he is undergoing. Daniel has no response to that, and Rush walks away.
In the real world, Young gets word that Brody and Rush have come up with a process to allow Rush to use the Ancients' chair of knowledge without dying. Johansen confirms that Rush is alive and stable for the moment, and Brody explains that they came up with a buffer that slowed down the knowledge feed from the chair. When Young objects to Brody's involvement, the scientist notes that Rush would have done it with or without his help, so he went along. They have created a program that allows Rush to access the information from the ship's database via his dreams, and they put in a "backdoor," a literal door in the program, that allows Rush to walk through it when he wishes and leave the dream. If anyone else tries to bring Rush out, it would likely kill him. Once Young confirms that the process shouldn’t hurt the ship, he orders them to continue but with instructions to pull the plug at the first sign of danger to Destiny
In Rush's dream, he returns home to find Gloria talking to Constance about how she wants to take a plane and go to see her parents one last time. Rush goes on with his work and Constance angrily confronts him, demanding to know why he's ignoring Gloria. Rush insists that he's busy and doesn't want any distractions, and doesn't see the point in trying to explain to a memory in his dream.
, Chloe goes to see Eli, who seems to be avoiding her. She apologizes for betraying him during the civilian rebellion, and promises not to do it again. Eli accepts her apology in good grace as the ship drops out of the FTL. They go to the Gate Room where Young and the scientists have already sent a kino through to the nearby planet. It can support life but there's no sign of any inhabitants. They have six hours until the ship returns to FTL, and Scott prepares to take a team through. Chloe and Eli both volunteer, and Chloe insists that she can be useful since she's been studying Daniel Jackson's archaeological findings. Eli supports her, and Young finally tells them he's fine with them going.
In the dream, Rush tries to get his class to help break the code. They have no idea what he's talking about and he complains that since they're all part of his memories, they should be able to assist. He tells them to get out, and finds Daniel waiting for him again. The Daniel memory again asks Rush to help unlock the ninth chevron on the Stargate, and Rush complains that he can't solve it, and it's Eli who eventually will do so despite his lack of dedication to science and his sloppy attitude. Daniel says he can sympathize with Rush since he also lost his wife, and suggests he should be with Gloria now. Rush admits that he finds his work easier when he's with Gloria, and then discovers that his nose is bleeding.
Scott takes a team of Greer, Chloe, and Eli to the planet and they explore the ruins. Meanwhile, Johansen tends to Rush's body, which also has a nose bleed, and warns Young that his condition is no longer stable. When Young asks Brody what the odds are of Rush surviving an involuntary removal from the dream state, Brody doesn't believe they're good.
In his dream, Rush continues to work and ignore Gloria, who tries to make conversation. When she asks why he's there with her at all, Rush claims it's because it's what happened the first time. Gloria tells him not to let her illness hold him back, and that she knows he'll be there for her when she dies.
Eli uses the kino to explore the tunnels, and then suggests they go down themselves. Scott doesn't see the point but Eli and Chloe insist they might find something critical to their survival, like a ZPM. Eli finally admits that he lost the kino in the maze of tunnels and wants to go down to find it. Scott reluctantly agrees and Greer prepares to stay behind. When Eli jokingly teases him about being scared, Greer insists on coming. As they go down, Scott admits to Chloe that Greer is a little claustrophobic after a childhood incident.
In Rush's dream, he continues to do his work while staying close to Gloria as she deals with cancer and proceeds with her life as best she can: walks in the park, violin lessons, and chemotherapy. However, the strain of Rush ignoring her because she's not "real" soon takes its toll on her.
Scott and his team go further down but find nothing and decide to turn back. As they head back to the entrance, Greer spots a large spider-creature approaching Zoe. He tells her to run and opens fire, and the shock brings down a section of the ceiling, blocking their route back to the surface. Young contacts them and sends a rescue team to get them out. With time running out and only two hours left, Eli and Chloe go scouting but can't find another way out. James arrives on the planet with the rescue team but warns Scott that there's too much debris to quickly clear away.
In the dream, Rush is in his office, exhausted, and dreaming about Gloria. When he wakes up, he finds that Daniel is there again. Rush's nose is bleeding again, but Daniel is more interested in discussing the Icarus Project. As he explains that they've found a planet with a suitable power source, Rush tries to get him to help with his project. Daniel admits that he doesn't understand it, and Rush explains that he's accessing the ship's computer, and his calculations are a representation of the small amount of that data he can safely access through the chair. Rush admits that he's done as much as he can and is no closer to a solution. His "escape door" appears and Rush prepares to leave, but Daniel asks after Gloria. Rush admits that this is the day that she dies, and Daniel again says that Rush should be with his wife. Realizing that Daniel has said that repeatedly, Rush realizes that it's his subconscious trying to tell him something. When he realizes that the day is April 6, 4/6, Rush remembers that his wife died on a different day. Going outside, he discovers that his home address has changed to 46. Thinking back, Rush remembers dozens of other incidents of the number 46 appearing. He asks Daniel for his opinion, and Daniel talks about the 23 Enigma Theory, and how half of 46 is 23. Before Rush can pursue this line of questioning, he suddenly collapses of a heart attack.
In the real world, Johansen informs Young that Rush is having a cardiac incident. Meanwhile, James informs the colonel that the rescue party can't free the crew members in time. Young considers whether Rush has learned enough of the ship's master code to prevent Destiny
's departure and stop the ship from leaving long enough to rescue Scott and the others. He suggests that they pull him out now despite the risk, in the hopes he'll survive and has the knowledge they need.
James decides to use C-4 to try to blast away the debris. She calls Scott on the radio and warns him, and the trapped crew members move as far away as possible. The tunnels collapse further due to the explosion, and Scott warns there's no way out. James apologizes and Scott orders her to get her team back to Destiny
before it departs.
In his dream, Rush goes to the hospital to see Gloria. She realizes that he's not there for her, but because her presence helps his calculations. Speaking as his subconscious, Gloria says that he chose to revisit this period of his life because it's something he'd rather not remember. When she realizes that Rush would rather die than leave through the door and admit failure, she tells him that he's not the man she fell in love with. Rush insists that he's had to make hard decisions, but they've been for good reasons. Gloria doesn't believe it, and says that her death made him callous. She tells him to listen to his conscience and do what is right, and says that it's not his fault she's dying. It's simply a matter of a defective inherited gene that failed to catch and fix the cancer. Rush gets an idea from her comment, and the door appears. Gloria tells him that she knows how much he loved her, and not to take it out on orders. Before Rush goes, he promises that he'll never stop loving her.
Rush wakes up and Young brings him up to speed on what's happening. However, there's nothing Rush has learned that can stop the ship from departing. Young calls Scott on the radio and tells him not to give up, and then the ship goes into FTL.
Later, Rush goes back to work and Young asks him for answers. Rush explains that the number 6 in his dream represented the 46 chromosomes in human DNA. The Ancients used scanner technology to identify specific markers before granting access to their systems. Now that they know where to start, they can write a program to start checking the DNA markers. It will still take a while, but possibly only a few days or a few weeks. As Young goes, he stops to ask Rush if it was worth risking his life to get the answer. Rush simply says that they'll see.