Using her Sonic Blaster, River is able to open up an escape route for her and the others to climb through. As they continue their retreat through the Library the little girl watches their progress on her television, whose channels now show different parts of the planet.
One channel, however, depicts a country retreat. An ambulance pulls up outside and Donna Noble is taken inside, where Doctor Moon is ready to greet her. He claims she has been there for two years, and although she seems to doubt this she suddenly recalls it as if it were fact.
Doctor Moon suggests they take a walk outside, and before she can comprehend the situation, Donna finds herself walking with him in the grounds. She talks with her carer about the dreams she once had of travelling with a man named the Doctor – dreams Doctor Moon has helped to stop.
In another blink-of-an-eye they find themselves at the lake feeding ducks, where Donna is introduced to a fellow patient, named Lee, who’s speech impediment causes him difficulty in pronouncing her name. In quick succession the two become friends, get married, buy a house and have two children, and all the while Doctor Moon is observing.
He visits Donna one day and commends her on integrating herself so well over the past seven years – a period of time she admits sometimes feels like no time at all. As he gets up to leave his body begins to flicker and is replaced with that of the Doctor, who appears to be tracing some form of signal with the use of his Sonic Screwdriver. Turning to face Donna he is jubilant to have found her, but before he can say any more he reverts back to being Doctor Moon.
Donna claims she has just seen the man from her dreams and Doctor Moon confirms it was the Doctor – “and then you forgot”. Immediately Donna stops thinking about the encounter, and appears surprised at Doctor Moon’s presence, apparently not recalling him arriving some minutes ago.
Back in the Library the Doctor, River and their three companions find a clear room but discover the Vashta Nerada are beginning to swarm nearby. As the Doctor continues his scans River speaks with her colleagues about him, claiming that she trusts the Doctor to the end of the universe – somewhere, coincidentally, they have visited together. They ask how she knows the stranger and she confesses that technically speaking, he has not met her yet.
River then speaks with the Doctor, who has picked up a nearby signal. She offers the use of her (formally his) Sonic Screwdriver, and he begins interrogating her again about why, in his future, he would hand over the device so readily. Worried about his mistrust and the increasing need of cooperation, River decides to prove she will one day become someone he can trust, and confirms it by whispering something in his ear. Immediately he becomes somewhat unnerved but confirms the two can now work together without more questioning.
Covering up his emotions, the Time Lord ponders what might be blocking his Screwdriver, and notes that the moon has begun to show in the sky above the Library. Lux explains that it is an artificial mass, a ‘Doctor Moon’ that completes virus checks to safeguard the mainframe of the Library, which lies at the core of the planet. He realises someone in the Library is communicating with the moon, and begins scanning again. He is surprised when the Screwdriver suddenly projects an image of Donna into midair, but is unable to communicate with her before the image fades.
He struggles to find the signal again but is interrupted when Anita, another member of the party, tearfully reveals she has developed a second shadow – the Vashta Nerada have caught her. River places her colleague’s space helmet back onto her suit and the Doctor tints the visor, hoping the Vashta Nerada will assume something is already inside and refrain from attacking.
Further complications ensue when the animated remains of Proper Dave enter, having tracked them down once again. They run, still being watched by the small girl with her television, who momentarily flicks back to the channel showing Donna’s newfound life with Lee.
As her husband arrives home, Donna is somewhat bemused that Doctor Moon, who was with her seconds ago, has disappeared. She glances out of the window and finds a cloaked stranger walking away outside. She doesn’t mention this to Lee, instead confessing that she is tired. Suddenly she is in her room getting ready for bed. Initially she seems concerned by the time shift but then rationalises what must have happened during the skip and thinks no more of it.
After a few moments the letterbox downstairs is heard and Lee goes to retrieve what has been delivered. Donna, meanwhile, glances outside again and once more sees the veiled stalker walking around outside. Lee returns with the note, addressed to Donna, and he reads it – it claims, “The world is wrong” and asks Donna to come to the local playground the following day.
In the blink of an eye she is there with her children, who go off to play whilst she confronts the masked stranger. She claims to have received the note the previous night but the stranger, who speaks with a voice Donna finds familiar, claims she received it only a few seconds ago, and that having decided to attend the meeting was immediately brought there – as if in a dream. The figure then claims that they met once before, in the Library, and the kindness shown by Donna on that encounter will be returned now. Again Donna considers the voice speaking to her through the heavy veil and the stranger confesses her identify – she is all that remains of Moss Evangelista.
In the Library, the Doctor, River, Anita, Lux and Other Dave all run for their lives. The Doctor sends the others ahead and remains to talk with the creature chasing them – however River ensures that Other Dave remains with him to stop him being harmed. As the creature arrives the Doctor tells the swarm inside to use the discarded soul of Proper Dave to speak, and after a few seconds it begins to talk.
As Other Dave repeatedly calls for them to leave, the Doctor asks why the Vashta Nerada, who usually hunt in forests, have come to the Library. The swarm replies by claiming the Library is the forest they were born in – the trees were cut down to form the books and the spores of the Vashta Nerada were transported within the pages. After a while they hatched and took over the planet.
The Doctor then realises that Other Dave’s repeated calls are not a cry for retreat – they are the words of the Data Ghost created by his life support system – he to has been devoured by the swarm. Now caught between two reanimated bodies, the Doctor appears helpless, but reveals he has a trick up his sleeve. He has positioned himself over a trap door, which he opens with the Sonic Screwdriver. He disappears below ground and finds himself dangling from a girder outside, which he proceeds to climb along.
Meanwhile, Donna and the masked Miss Evangelista continue to talk – with Donna beginning to recall the events of her time in the Library. Miss Evangelista claims that both she and Donna are the dead of the Library, but Donna retorts by claiming that this cannot be because her children are real. However, her companion exposes the lie of the world they live in by revealing that every child is identical. Sure enough Donna turns and sees that every boy and girl playing in the park all look alike. Enraged by this and Miss Evangelista’s claims, she pulls up her veil, only to recoil at the disfigured face beneath.
Night falls on the Library and River Song begins examining a circular pattern on the floor of a chamber she, Lux and Anita have sought refuge in. She talks with Anita about the Doctor and reminisces about the travels they shared together. She claims that he could turn away entire armies and open the TARDIS doors just by clicking his fingers.
Unbeknownst to the others the Doctor has returned and has been listening to the conversation, and denies that the TARDIS can be operated in such a way. River insists the Doctor she knew could do it but the conversation stops there – instead the Doctor turns to Anita. He asks if she needs anything and she claims she needs some reassurance. Recalling the Doctor’s change of trust when River whispered something in his ear, Anita asks the Doctor to repeat it to her, thinking it will give her the same solace. When he doesn’t respond she claims he can trust her – his secrets will be safe with her.
Suddenly something clicks in the Doctor’s head – the use of the word ‘safe’. He recalls the message stored in the Library databank – ‘4022 saved’, and claims that the wording is misleading – anyone else would say ‘4022 safe’, so therefore those who went missing, including Donna, must literally have been ‘saved’ somewhere.
In the park, Miss Evangelista explains that when she was transferred away from the Library the genetic makeup of her face was corrupted but so was her intellect, which is now massively improved. Donna asks why all the children are identical and her friend replies by claiming that it saves space – cyberspace. This comment throws the little girl, who is still watching these events on her television, into panic, and she screams at the television screen claiming Miss Evangelista must not tell Donna any more.
In the Library, the Doctor explains that when the Vashta Nerada hatched and attacked, all 4022 people on the planet were teleported away, but the computer operating the system had nowhere to send them. In order to stop them being deleted they were saved to the main hard drive – the Data Core at the centre of the planet.
Miss Evangelista tells Donna that the world in which they now exist is virtual reality – Donna, like the others teleported from the Library are simply projections. She, however, was a Data Ghost caught in the field of the computer and automatically uploaded. Now with a larger IQ and disfigured face she holds the two qualities that allow for absolute truth and understanding – she is both brilliant and unloved.
Donna, still struggling to understand this concept, asks whose dream it is they now inhabit, and Miss Evangelista claims she doesn’t know. The only clue is a word that keeps recurring in the fictional landscape – CAL. At this revelation the little girl watching them on television descends into fury. Almost in reaction to this, one of Donna’s children falls over and hurts herself – causing Donna to become distracted from Miss Evangelista’s warnings. She hurries home with her children, all the while the disfigured woman calls out to her to let her offspring go and accept the true reality.
The little girl grows more frustrated and screams that Miss Evangelista is ruining everything. When her father tries to interrupt she zaps him with her remote control and he disappears, causing her yet more strife. With this she throws the remote onto the floor – which causes a warning system in the Library to activate – the auto destruct system will launch in twenty minutes.
As Donna and her children return home, now bathed in a blood red light, Lux tries to assure the Doctor that the Doctor Moon will deal with any problems. However, when the little girl zaps the humanoid manifestation of Doctor Moon that resides in her landscape with her remote control this option is no longer available. Lux insists they must do all that can to save CAL, and at last decides to reveal what CAL is by taking the others down into the data core.
The gateway to the core is the circular pattern River was examining earlier – when activated it transforms into a platform that lowers she, the Doctor, Lux and Anita deep below the planet’s surface.
In the virtual reality, Donna tries to comfort her children by putting them to bed, but soon they themselves begin doubting their own existence, claiming that when Donna is not around they cease to exist. Donna tries to soothe them but is thrown into despair when, in the blink of an eye, the two children disappear from their beds, leaving their erstwhile mother alone and terrified.
Down in the data core the Doctor and River begin trying to save the planet, which is going into meltdown. As the little girl begins crying out for help her words are relayed by the main computer, which the Doctor claims is dreaming. Lux claims that it is not the computer that is dreaming, but a little girl.
He walks over to a different terminal, where he shows the others the main command Node – whose face is that of the little girl. He explains that CAL is Charlotte Abigail Lux – the youngest daughter of his grandfather. When it was discovered the child was dying the family built her the Library and stored her mind inside, meaning she could live forever. With every book known to man at her disposal and a massive hard drive she could live happily in any era of history she wished. The family’s wish was to keep her hidden, Lux’s anger at seeing the Doctor and Donna when they first arrived was not because of wanting exclusivity of the excavation, but for fear that CAL would be exposed and made into a freak show.
CAL explains that when the swarm arrived she tried to save all those in the library but could not send them anywhere so stored them in her own imagination where they could be safe However, with nobody around to retrieve them they are stuck.
The Doctor, on the other hand, is able to bring them back and begins his work to set up a transfer from CAL’s dreamscape to the real world – with this he can rescue all those inside her mind and also avert the destruction of the Library, which is still approaching meltdown. However, CAL does not have the sufficient memory space to achieve the transfer so he realises he will have to wire himself into the computer. River warns that this will burn out his two hearts and leave him unable to regenerate but he insists he will find a way to survive. He sends her and Lux up to the main Library to try and locate any computer space that will assist the download, whilst Anita remains to look after the Doctor.
She asks what will happen to the Vashta Nerada and he claims that once all those in the computer are brought back the creatures will be able to swarm freely, as long as they allow enough time to let the transference take place. After a few moments the Doctor turns on her, revealing she has infact already been devoured, now the Vashta Nerada are using her to speak.
The creatures begin to swarm and a pool of shadow extends from where Anita’s remain stand – spreading out toward the Doctor. Unconcerned, the Time Lord goads the creatures into accessing the main computer bank and looking him up in the Library’s catalogue. As soon as they have done this the shadows retreat. After claiming he has one day in which to evacuate the planet the swarm depart, causing the suit to crumple into a heap on the floor. Seconds later River enters, distressed by the loss of Anita. Claiming Lux can cope above ground without her, she tells the Doctor he cannot, and promptly knocks him out.
He recovers sometime later, chained to a wall several feet before River, who is seated near a computer terminal, ready to complete the transfer – this time using her mind instead of the Doctor’s, something that will result in her death. The Doctor protests but she snaps at him, claiming it was either her or him. She ponders that this means, by the time the Doctor first meets her in the future, he will always have known how she will die. She recalls the last time they met – how sad he was and how he gave her his Screwdriver.
Again the Doctor protests but River insists it must be her who dies – if the Doctor sacrifices himself then he will never live to meet her and time will be rewritten, something she will not allow given the time they spent together. She seeks solace for the both of them by claiming the entire relationship they will share is, in a way, yet to come – together they will witness all of time and space – together they will run.
In one last attempt to discover how he and River will meet and what they will mean to each other the Doctor begs to know how she knew the words she whispered in his ear – his real name. He claims that there is only one reason why he would reveal that to anyone, there is only one time he ever could.
Before he can be given an answer the countdown reaches it’s final stages and with her last breath River chides him lovingly for wanting to know things ahead of their time. When the clock reaches zero she activates the transference and the chamber is flooded with a blinding light.
Inside the computer Donna and Lee find themselves bathed in light – at last Donna understands that nothing in their world is real. Lee asks her if he truly exists and as she clings to him she insists that he does, but her certainty begins to falter. Their surroundings are bleached out in the brilliant light and the two are dragged apart, Lee trying to call out his lover’s name and Donna pleading that he truly be real and not an invention.
In the foyer of the Library Lux taps away at a computer terminal, then looks up to discover the room is full of people. He runs out to a balcony and finds the planet is now full of people – 4022 people have been returned.
Eventually the Doctor manages to return to the surface and there he finds Donna, who has been trying to find Lee in the crowd of people now safely restored to the real world. However, the computers claim that nobody called Lee was in the Library the day it was closed down – it seems he really was an invention of her mind.
She asks the Doctor if he is okay, and he claims he is fine, but she realises this is a front – like her he is far from being all right. Together in their grief they leave the foyer, unaware that only feet away Lee has been placed on the teleport that is being used to transport people home. He sees Donna and tries to call out but his speech impediment prevents him. He is sent away, alone.
Finding themselves on a balcony the Doctor places River Song’s diary and Sonic Screwdriver on the ledge. Donna asks why River did not know about her, and ponders where she will be in the future when the Doctor finally meets River the way he were meant to. The Doctor claims they can look in River’s diary and find out but they both know that they must find out for themselves and avoid the spoilers. Leaving the diary and Screwdriver behind the pair walk away, headed for the next chapter in their adventures.
“When you run with the Doctor it feels like it will never end. But however hard you try you can’t run forever. Everybody knows that everybody dies, and nobody knows it like the Doctor, but I do think that all the skies of all the worlds might just turn dark if he ever, for one moment, accepts it…”
Suddenly the Doctor runs back and picks up the Screwdriver, determined to uncover why he would give it to River on their last encounter before she came to the Library. He realises that his future self would find a way to save her and opens up the device to discover the remains of River’s life support system built into the workings. Like Miss Evangelista and the others who were killed it still holds an impression of consciousness – she has been saved.
Frantically the Doctor runs through the Library until he reaches the portal to the data core. Throwing himself down into the depths of the planet, and just as the last of the Data Ghost is about to fade he plugs the Screwdriver into the data core and transmits River into the world invented by CAL – with Doctor Moon, CAL, and her lost companions all there to be with her.
“Everybody knows that every body dies, but not every day. Not today...Some days are special. Some days are so, so blessed. Some days nobody dies at all.”
Returning to the empty foyer, the Doctor approaches the TARDIS. Recalling what River said about the machine earlier he stands before the doors and clicks his fingers. They open. He steps inside and joins Donna, before clicking his fingers again to make the doors close.
In the dream world inside the Data Core, River Song reads from her diary to her newly adopted children, including CAL:
“Now and then, every once in a very long while, every day in a million days when the wind stands fair and the Doctor comes to call, everybody lives…sweet dreams everyone.”