Window of Opportunity

"Window of Opportunity" is the sixth episode of the fourth season of Stargate SG-1.

Synopsis
On a routine mission to P4X-639, SG-1 meets an alien archaeologist Malakai operating an Ancient device. Malakai has his own motives and causes a time loop, where only Colonel Jack O'Neill and Teal'c notice. Furthermore, convincing the rest they are trapped in a time loop and that they have to return to the planet to stop it proves difficult when the same few hours from breakfast to the mission is repeated over and over again.

Plot
SG-1 is currently assigned to P4X-639, a planet experiencing a coronal mass emission from its sun, causing a geomagnetic storm that Major Samantha Carter is measuring. Dr. Daniel Jackson, meanwhile, is examining the writing on a device in line with the Stargate with an alien archaeologist named Malakai. Daniel observes that the writing on the device is similar to Latin. While he is thinking aloud about the nature of the machine itself, Malakai urges Daniel and his teammates to leave due to the incipient emission.

A sensor device that Malakai is holding suddenly alerts him that the geomagnetic storm has reached its peak and that he has to act immediately. He pulls out a concealed weapon and stuns Daniel before starting the machine. Carter, meanwhile, has finished the preparations for her readings and Colonel Jack O'Neill calls for Daniel, who fails to respond. Suddenly the Stargate activates behind them and they duck out of the way of the kawoosh. Meanwhile, on Earth, the Stargate has activated at the same moment, causing a series of electrical arcs around the Stargate. On P4X-639, O'Neill and Teal'c go to Malakai while Carter tends to Daniel, but after a moment a flash strikes the three at the altar and the scene flashes into white.

Suddenly, O'Neill is at breakfast, eating Froot Loops, and is sitting with Daniel and Carter, in the middle of Daniel asking O'Neill his opinion of something. He asks them if they had just been on another planet, to which the others say no, and say they're going to be late for their briefing.

The briefing is about the upcoming mission to P4X-639, which SG-15 had visited two weeks earlier, measuring the solar activity. Teal'c and O'Neill both observe that they've already been through this briefing, to go to the planet and set up a remote observatory, which according to them they had just been doing. The others are skeptical about his foreknowledge of the briefing, except for Daniel who observes that O'Neill never reads the reports ahead of time. At that moment, an unscheduled off-world activation occurs, and Teal'c and O'Neill both give details about what is about to happen: SG-12 is returning ahead of schedule and one of their number has been injured.

O'Neill and Teal'c are both inspected by Dr. Janet Fraiser while they relate the details of the mission that has not yet happened. Based on the odd occurrences, Major General George S. Hammond decides to postpone the mission until they know what's going on. Daniel stops O'Neill in the hallway afterward to ask about details of the ruins, whereupon he is run into by MSgt. Sylvester Siler, which O'Neill implies he'd known would happen and did not stop. Some time after this, Hammond confirms that O'Neill and Teal'c are in perfect health, but before they can be put on active duty there is an unscheduled off-world activation, accompanied by the same arc lightning effect seen before. A moment later, there is a flash of light and O'Neill is again at breakfast at the same moment Daniel asks his original question.

They once again go into the briefing, with O'Neill unsuccessfully trying to convince them he knows what they will say (which are all obvious statements in context) until the return of SG-12. They are once again examined by Dr. Frasier, whereupon Hammond walks in, but O'Neill forestalls him before he can postpone the mission this time. O'Neill then again meets Daniel in the hallway, where is once again run into by Sgt. Siler, but this time before that happens Daniel reveals that the writings are a variation of Ancient. Teal'c and O'Neill then visit Hammond, this time successfully convincing him to let them return to the planet.

Once they are on the planet, they encounter Malakai, who at first feigns ignorance. While examining Malakai's bag, O'Neill sees an image of the man's wife. Before they can get further, however, the machine activates automatically, and Malakai makes a slip, giving Carter's name before he's been told what it is. O'Neill orders Malakai to shut it off but he refuses, and Daniel has no idea how, even though he can read Ancient. Before they can continue, however, there is a flash of white and O'Neill is once again at breakfast with Daniel and Carter.

When Teal'c and O'Neill get to the briefing, they take the initiative of explaining that they're in a time loop and try to get out of being examined by Dr. Frasier this time (unsuccessfully). O'Neill and Teal'c then meet Daniel in his office, presumably at the time of the accident in the hallway in previous loops, and they stress him translating the writing on the altar, but he points out that that wouldn't allow them to operate the machine. In a briefing with Carter immediately after, she hypothesizes that since the arc lightning energizing the gate was transferred to Earth via the Stargate, they should attempt to dial out before Malakai can dial in. They attempt to do so but cannot dial out, and while they are attempting to find the problem, the incoming wormhole activates and the loop begins again.

O'Neill and Teal'c experience loop after loop. They are seen in Daniel's office attempting to get him to translate the writing on the altar, but he explains that he can't translate it in less than a day. O'Neill attempts to play a recording he made of the same conversation in the last loop, but the recording ceased to exist when the loop began again. Daniel points out that the only way they can help is by learning Latin and remembering from one loop to another.

Carter, meanwhile, has discovered that the Ancient device on P4X-639 simultaneously activates 14 Stargates, including Earth and Alaris, the planet SG-12 had been stationed on, cutting them all off from the normal flow of time in the rest of the universe.

O'Neill and Teal'c begin learning Latin so that they can begin learning Ancient, and O'Neill mentions to Teal'c that Daniel always asks a question but he hadn't been listening the first time. Teal'c points out that he also has to "endure some discomfort." The loop begins again, whereupon it is shown that at the moment of the loop's start, Teal'c is hit in the face by an Airman opening a door.

There is a montage of scenes from various loops: O'Neill and Teal'c have become quite proficient in the language at a certain point since they correct Daniel's translation, then O'Neill takes up juggling, then Teal'c does and again becoming proficient at it. Jack finally "takes a loop off" and tells Teal'c that if they don't get out of it soon, he'll go crazy. His exact words are: "I'm telling you Teal'c, If we don't get out of this soon I'm going to lose it... Lose it, it means go crazy, nuts, insane, bonzo, no longer in possession of ones faculties, three fries short of a Happy Meal... WACKO!"

In a loop after this, while O'Neill and Teal'c are in charge of the translation while Daniel seems to be learning from them, Daniel makes an offhand remark that the two of them could do anything they wanted with no consequences since they know the loop would reset at the end anyway. Getting an idea, they both suddenly leave.

For several loops, the two indulge in whatever behavior they feel like. Teal'c takes revenge upon the Airman who opens the door in his face by violently slamming it back on him. O'Neill tries pottery, bicycles through the base, golfs with Teal'c to Alaris through the gate (and shouting at Gen. Hammond for interrupting his back swing), and resigns his commission from the Air Force so that he can kiss Carter.

Finally, Daniel has finished the translation and confirmed that the planet was once an Ancient outpost, but was wiped out by some unidentified disaster at some point in the past. In order to avoid this, the Ancients on the planet built a time machine to go back and change their fate, but the machine never worked properly, only creating a loop repeating over and over. Faced with this, the Ancients shut down the machine and let the end come.

SG-1 returns to the planet to break the loop, but Malakai is expecting them and has the altar blocked by a Goa'uld force shield. In attempting to talk Malakai into shutting down the machine, he reveals that the reason why he's doing it is to see his wife again, who died twelve years earlier. However, since she died of a congenital heart condition there is no way to save her. O'Neill tells him that he wouldn't be able to stand going through her death again, telling him of the death of his own son and that he could never go through that again. Malakai agrees and shuts down the device before it begins again.

Back on the base, O'Neill, Carter, and Daniel are at breakfast. O'Neill comments on how the oatmeal is a nice change of pace from the Froot Loops he has been eating. Carter informs them that the Tok'ra had been trying to reach them for over three months, but the loop could have lasted for longer, there is no clear indication how long exactly it had lasted. Daniel asks O'Neill if he ever did anything "crazy" without fear of consequences while trapped in the loops. O'Neill states that he asked that before, but instead of elaborating he gives a long look at Carter and continues eating.

Notable Quotes
(During the second loop)

Carter: We haven't been to P4X-639.

O'Neill: Yes we have. 'No we haven't.' That's what you were gonna say.

Jackson: Of course that's what I was gonna say.

O'Neill: ...

O'Neill: Ok, bad example.

(O'Neill and Teal'c are attempting to convince Hammond)

O'Neill: C'mon, is this the face of a crazy man?! (Gestures to Teal'c)

O'Neill: ...

O'Neill: Bad example.

(Confronting Malakai)

O'Neill: What kind of archaeologist carries a weapon?

Jackson: Uhh.. I do!

O'Neill: Bad example.

Jackson: Section 23 ends with a reference to Perennial Adventus.

O'Neill: [bored] Been over this.

Teal'c: I believe it means "the approaching disaster."

Jackson: (surprised) Good.

(Flash of another loop occurring.)

Jackson: (writing on the chalkboard) ...of the machine itself. With recurring use, the machine surrenders to the rigors of time.

Teal'c: That is incorrect, Daniel Jackson.

(Daniel turns around in surprise.)

O'Neill: The word "abicierum" means to give up, not surrender.

(After multiple loops of helping Daniel translate the time machine)

Teal'c: O'Neill, should we not be assisting Daniel Jackson with the translation?

O'Neill: I'm taking this loop off. I'm telling you Teal'c, if we don't find a way out of this soon, I'm going to lose it.

Teal'c: (raises an eyebrow)

O'Neill: Lose it. It means go crazy, nuts, insane, bonzo, no longer in possession of one's faculties, three fries short of a Happy Meal... WACKO!!

(O'Neill and Teal'c trade off at the blackboard. O'Neill sits down next to Jackson, stretches and utters something like "ewch gawkh" in frustration after multiple rounds of working on the translation, during which the passage of time was indicated by both O'Neill and Teal'c learning to juggle.)

Jackson: Exactly how many of these loops have you... have we been through?

O'Neill: I've lost track.

Jackson: That must be frustrating.

O'Neill: Ah, yeah.

Jackson: On the other hand, it... it's kind of an opportunity.

O'Neill: How's that?

Jackson: Well think about it... I mean, if you know in advance that everything is always going to go back to the way it was, then you could do anything, for as long as you want, without having to worry about consequences.

(Teal'c turns from the blackboard where he's been working to look at them.)

O'Neill: Excuse me.

(O'Neill leaves the room followed by Teal'c. The following scenes are comprised of amusing montages involving O'Neill and Teal'c explore this new found "freedom".)

(While hitting golf balls through the activated Stargate.)

O'Neill: Oh, yeah!! That'll play. How far is Alaris anyway?

Teal'c: Several billion miles, O'Neill.

O'Neill: That's gotta be a record.

Hammond: (Angry) Colonel O'Neill, what the hell are you doing!?

O'Neill: (Shouting) In the middle of my back swing!?!?

O'Neill: Listen to me. I know what its like.

Malakai: You can't!!

O'Neill: I LOST MY SON!! I KNOW!! And as much as I w... I could never live that over again. Could you?

Malakai: No.

O'Neill: Let her go.

(Malakai deactivates the machine and lowers the force shield)

O'Neill: Well, General, you know what they say: "If at first you don't succeed, try, try, try, try, try, try again."

Goofs

 * The Meteorological data collection system is installed too low to the ground close to the ruins. A real meteorological data collection system would not get proper readings. The ruins would block the wind and rain.
 * When SG-1 arrives through the gate on P4X-639 for the first time after the time loop begins, Major Samantha Carter's foot passes 'through' the solid portion of the gate.

In other languages

 * French: L’Histoire Sans Fin (The Neverending Story)
 * Italian: Inversione Temporale (Time Inversion)
 * Spanish: Una Ventana a la Esperanza (Window of Opportunity)
 * Czech: Časová Smyčka (Time Loop)
 * German: Kein Ende in Sicht (No End in Sight)
 * Hungarian: Egy apró lehetőség (A Small Opportunity)