SG-1 visits a world and finds itself in a large beautiful garden, but then they find out that all people on the world are tied to some machines. Suddenly all team members are captured by some empty machines. Afterwards they are separated and find themselves in other places.

ColonelJack O'Neill and Teal'c of Chulak find themselves in a wooded area and suddenly meet other human soldiers from Earth, including Charles Kawalsky, who died one year ago. O'Neill then recognizes this place and remembers that this was the time of an undercover mission in East Germany, 1982, where one of them died. However the soldiers act as if Teal'c is one of them and call him "Thomas". Because they think that they might have traveled through time, they again go through the mission. However it again goes wrong and suddenly the mission starts again from the beginning. This scenario happens over and over again and O'Neill isn't able to change the outcome.

Dr.Daniel Jackson and CaptainSamantha Carter in the meantime find themselves in a museum and Jackson remembers it as the time when his parents were killed by falling stones. He also tries to change this event several times but also fails.

Back at O'Neill and Teal'c they are visited by a strange man named the "Keeper", who tells them that he offers them the possibility to change the past - albeit only in a simulation. Afterwards he also visits Daniel and Carter and tells them the same. However all members of SG-1 decide that they won't take part in this simulations anymore and refuse to do anything. Because of this the Keeper brings all the team members back together and tells them that over 1000 years ago a chemical disaster took place which destroyed this world. Because of this the whole civilizations entered stasis and now they want more scenarios for their virtual world. Because Teal'c's and Carter's brain can't be accessed (Jaffa are apparently immune to the process and Sam's mind has been altered by Jolinar of Malkshur), the Keeper lets them take part in the simulations of their friends.

While they talk they are watched by many people (the other inhabitants of the virtual world) and when they hear that the outside world has recovered, they react. However the Keeper then sends them away and finally lets SG-1 free. The team then returns to Earth, where they are checked in the infirmary and then report to Major GeneralGeorge S. Hammond. However the General tells them to get more information about this virtual world, which would mean that they would have to be hooked up to the machines again and Hammond orders them to do so. Due to his uncharacteristic behavior, SG-1 then concludes that they are still in the VR and O'Neill attacks the General, who then orders them to be arrested.

In the cell they are visited by Kawalsky who tells them that they simply should stay in the VR. However the team then escapes and suddenly meets the residents of the VR, who ask the team about the outside world. They tell them that outside a beautiful garden exists. Since they are unaware of any exits out of the VR, SG-1 decides to show the residents their planets through their memories. Before they could step through the Stargate to show how, it is shut off by the Keeper, who was disguised as Hammond. They chase after him and accidentally discover the exit doors that the Keeper has been trying to keep his people from discovering, enabling them to exit the VR for real. They then capture the Keeper in the garden and demand to know why he didn't let out the people. He tells them that they would ruin the garden which he manages and finally the whole world, thus repeating their former mistakes. However they suddenly see that the people have already left the VR and now go through the garden and pick flowers, much to the anger of the Keeper. Promising to return and help the residents begin new lives, SG-1 returns to Earth.

Carter: This is beautiful.O'Neill: Yeah... but where there's a garden, there's snakes.Jackson: And flowers. (sneezes) Way too many flowers.

Jackson: Jack, we should go back to the planet and free those people.O'Neill: I'm not sure it's any of our business, frankly.Hammond: I concur. Who are we to judge how someone on another planet lives?Jackson: But the people are in those machines under false pretenses. The Keeper is lying to them about what's outside.Fraiser: Okay, if, if I may weigh in here…all evidence points to the fact that the machines are clinically sustaining those people. Removing them could be like taking a patient off life support when he still needs it.Hammond: Sounds to me like we have to get more information to make this decision, folks.Teal'c: The only way to gain more information would be to venture back into the artificial world of P7J-989.Hammond: Then that's exactly what I want you to do.O'Neill: Uh, General, without meaning to, this time, to sound like a smart ass, are you cracked?

Hammond: What are you doing, Colonel?O'Neill: Ah, I'm looking for the edges of a mask.Hammond: What?O'Neill:You're obviously not the real General Hammond.Hammond: Sit down, Colonel.O'Neill: I don't think so, bucko. The jig's up, we're on to ya.Hammond: What are you talking about?Carter: We're still on P7J-989.O'Neill: Oh, you betcha. This is just a new game brought to you by our good friend (Pats Hammond on the head) the Keeper.

Jackson: Where are we going?O'Neill: Back through the Gate to show them what their planet looks like... (gets confused) ...in our memories... before the virtual reality... Leave me alone!

Keeper: They are ruining everything. Do you know they are actually picking the flowers?O'Neill: This is real this time, isn't it?Keeper: Do not pull that! You are ruining the garden! I told you they would ruin everything. First the garden, next the entire planet!Jackson/O'Neill:- It's real.

When Teal'c and ColonelJack O'Neill are living the mission over and over again, two of the other soldiers are carrying M4A1 assault rifles. O'Neill said that the mission happened in 1982 but M4A1 assault rifles were not made until 1994.