Question: who spies on hamlet and why?
Answer: During the performance Hamlet will spy (or, as it actually happens in Act III, he will have Horatio spy) on Claudius to see if his reaction to the scene incriminates him. If Claudius "do blench" (i.e., flinch), Hamlet will know what to do next. For we have closely sent for Hamlet hither.