Source Code begins in medias res, as Army Captain Colter Stevens (Jake Gyllenhaal), who flies helicopter missions in Afghanistan, awakens on a commuter train destined for Chicago, with no idea how he got there or why the woman seated across from him seems to think he is a schoolteacher named Sean Fentress.
The confusing out-of-body experience ends with a massive explosion as Colter awakens strapped into a cock pit of sorts, unaware of his whereabouts and unable to free himself. A televised soldier named Goodwin (Vera Farmiga), whose name Stevens recalls after basic memory-recall exercises, explains that he must locate the bomb and bomber of the train. Stevens locates the bomb after the second trip into Fentress’ consciousness, but is unable to disarm it or find the perpetrator.
Goodwin explains to Stevens that the train bombing, which occurred at 7:48 that morning, precedes a larger “dirty bomb” presumed to be placed and detonated somewhere in downtown Chicago later that same day, Stevens being the only one capable of preventing the imminent attack. Colter receives information based upon a need-to-know basis, usually after becoming angry about the lack of straight answers given to him and of course, his complete absence of agency.
Goodwin explains that he has been “with them,” a military outfit called Beleaguered Castle, for 2 months, although Colter’s last memory was flying a rescue mission in Afghanistan, yesterday, which he finds out (in Fentress’ consciousness) was his last mission after Christina finds his death announcement on the internet (stating he died 2 months ago) per his request. Stevens is told that his mission is to urgently utilize the 8 minute block of time he is allotted to find the bomb and bomber by any means necessary. Although he locates the bomb on his second placement into Fentress’ consciousness (all along understandably assuming these experiences are just a simulation), he is continually unable to locate the bomber, mainly because he grows increasingly concerned about saving Christina (Michelle Monaghan), Fentress’ acquaintance and potential lover.
As Stevens becomes increasingly frustrated about his eerily illusive circumstances, the commanding officer of Beleaguered Castle, Dr. Rutledge (Jeffrey Wright), explains that the logic of Source Code, the science that makes Stevens’ “trips,” “is not time travel. Rather, Source Code is time reassignment.” Rutledge explains that Stevens’ neurological network (brain mapping) and body size are compatible with that of Sean Fentress, one of the victims on board the ill-fated commuter train. After death, explains Rutledge, the brain retains a “short term memory track” for 8:00, along with circuitry that remains active, leaving a halo-like effect of electromagnetic energy—like that of a lightbulb after being switched off—from which Rutledge’s science has found a way to “capitalize on the overlap” of these phenomena, allowing the transfer of one’s consciousness (Stevens) into the last 8 minutes of the compatible deceased (Fentress).
Goodwin eventually reveals the truth to Stevens, that he was essentially killed in action, and that his body and physical surroundings (while in his present state at Beleaguered Castle) are manifestations of his imagination, and that he is hooked up to life support. Rutledge claims that Stevens’ attempts at saving passengers, namely Christina, is futile, as the “time transfers” to the train, at 7:40 each time, are to a parallel reality that ceases to exist following the 8 minute interval: “There’s only one continuum on this end and it cannot be unsettled.” The Dr. tells Stevens the latter is “a hand on a clock” to be set and reset as many times as it takes: “That represents the entirety of your function here.” Rutledge agrees to terminate Stevens’ life support in return for completing his mission, although the former adds insult to injury by telling Stevens that he should feel honored to continue serving his country after death.
Stevens finally notices a passenger toss his wallet into the train after de-boarding, and after leaping from the moving train to follow him, realizes that he, Derek Frost (Michael Arden), is the bomber. Frost shows Stevens the massive bomb in the back of a rented van destined for downtown Chicago, and shoots Stevens and Christina, who ran after the latter, killing them both, but not before Frost answers Stevens’ question, as he lay dying, of “why?”. “Because the world is hell, but we have a chance to start over in the rubble. But first there has to be rubble. You’re a teacher, you understand.”
After Stevens returns to Beleaguered Castle, he relays Frost’s full name, license plate number, and the location of the van. Frost is later apprehended, making Stevens’ mission a successful completion of his forced duties, but he has one last request: to go back one last time and try to save the fated passengers aboard the commuter train, no matter how implausible his success may seem to Rutledge or anyone else.
Unsurprisingly, Rutledge plans to ignore Stevens’ request for death and erase his memory in order to wait for the next major threat for which he may be able to prevent via Source Code. Ironically, Rutledge is eager for impending national tragedies to occur, so Source Code can effectively prevent the disasters, giving him all of the prestige he craves. Beleaguered Castle significantly chooses casualties of America’s endless wars as candidates for Source Code. America was heavily entrenched in Afghanistan during the production of the movie (2011), and Bin Laden was killed just one month (May) after the movie was released. Casualties of war who are refused death by the military in order to prevent imminent tragedies from occurring in order to validate military science by exploiting casualties of conflict is an unnerving prospect.
Unlike Rutledge, Goodwin has a sense of humanity, as she secretly places Stevens back into Fentress’ last 8 minutes of consciousness aboard the train, wherein Stevens disarms the bomb; apprehends Frost; calls the cops and tells them where Frost’s van, filled with radioactive material, is parked; calls his father under the guise of a fellow soldier to gain closure and say goodbye; sends Goodwin (from the alternate timeline) an email explaining/warning her of the circumstances of his current mission; and shows his love for Christina by embracing her in a frozen kiss, right at the 8 minute mark, trying to “make every second count” before his time with her ends.
Just before Goodwin terminates Stevens’ life support, we get our first glimpse of the fated soldier as he truly is—his mouth vaguely forming the words he currently is expressing in the alternate reality, as he is pitiably stimulated by electronic impulses, lying mangled, limbless, and comatose in a pod.
Suddenly Stevens realizes he is still with Christina aboard the same train, and time, which was frozen/stuck, continues to flow forward. Outside the train with Christina, Stevens happens to see “his” reflection in Cloud Gate (a mirrored sculpture in downtown Chicago), which is that of Sean Fentress’ likeness staring back at him. Rutledge and Goodwin were indeed wrong about the impossibility of the alternate timeline becoming a reality. It seems that Rutledge unknowingly created a way to transport into separate parallel realities via tapping into active brain activity/memory postmortem. The darker side to Stevens’ happy ending is Fentress’ consciousness has been taken over by the former, so it seems that the soldier failed to save one life from the train, the one he replaced.
Back at Beleaguered Castle, Goodwin receives Stevens’ message sent from the train, which explains everything that happened between them, and requests for her to take care of the version of Colter Stevens in her reality, who, as we see in the last clip of the film, is lying comatose in the pod at Beleaguered Castle, while Stevens is probably somewhere cuddled up to Christina in the body of poor Sean Fentress! Rutledge gets the news of the tragedies that, unbeknownst to him, Stevens helped to avert, the train bombing and the larger radioactive explosion. This displeases Rutledge, who calmly states, “One of these days the right crisis is going to rear its ugly head and Source Code is going to have its moment in the sun.”