A Cookie is the name given to the digitally replicated consciousness of a human being. Originally appearing in White Christmas, they have been mentioned in several other episodes.
The legal status of cookies has been shown to vary in different episodes of the series. In White Christmas, it is shown that any criminal confession from a cookie is regarded as the same as if the individual it was taken from had confessed. This is the case with Joe Potter, who has his consciousness replicated by the police and then exposed to Matt Trent, who is able to get him to confess to his crimes in 70 minutes.
However, in Black Museum it is revealed that the United Nations has implemented stricter controls on digitally replicating consciousness, stating that a cookie must be able to show at least 5 emotions for its existence to be considered "humane". It is also illegal to delete the replicated consciousness.
A device is inserted under the clients head by the brain and kept there for a week, giving it time to accurately replicate the individuals consciousness. It is then removed and installed in a larger, egg shaped device which can be connected to a computer or tablet.
Greta has her consciousness replicated through the Smartelligence service in order to have the cookie run her automated smart house. However, the replicated consciousness believes itself to be the real Greta and refuses to work, causing Matt Trent to subject it to psychological torture via increased time perception in order to break it and get it to comply.
After Joe Potter accidentally kills Gordon Grey in a fit of rage, the police arrest and interrogate him, but are unable to get him to talk. Detective's Holder and Fenn, and Home Office representative Gainsborough then decide to extract a cookie from him, and have it interact digitally with a now incarcerated Matt Trent to try and obtain a confession. Before entering the digital recreation, Trent alters the time perception, causing Joe's cookie to believe it has known him for five years. After a considerable amount of talking and coaxing, Trent is able to get a full confession from Potter in less than 70 minutes, much to the shock and delight of the police officers. Holder then informs the real Joe that his cookie has confessed, so he can keep up the silent routine as long as he wants.
Prior to clocking off for the evening over the Christmas period, Fenn asks whether they should deactivate the cookie. Holder replies that they should leave him on for Christmas. Fenn then increases the time settings to 1000 years a minute, leaving Joes cookie to be tortured to the song I Wish It Could Be Christmas Everyday on the radio. No matter how many times he smashes the radio, it returns the moment he looks back, and playing increasingly louder. He curls up on the floor, screaming.