Imagine a robot that, for whatever reason, is performing a sequence of actions according to some program, and is determined to complete this execution, no matter what exogenous events occur in the world while it is executing this program. An example of this setting, which we treat in this paper, is a robot executing a program to build a tower of blocks in an environment inhabited by a (sometimes) malicious agent who might arbitrarily move some block when the robot is not looking. The robot is equipped with sensors, so it can observe when the real world fails to conform to its internal representation of what the world would be like in the absence of malicious agents. We will understand the execution monitor as a mechanism that gets output from sensors, compares sensor measurements with its internal model and, if necessary, invokes a recovery procedure to make things right again. Our purpose in this paper is to provide a situation calculus-based, purely logical account of such an execution monitor, together with a Prolog implementation for it. To illustrate the theory and implementation, we consider a standard blocks world as an environment in which a robot is executing a Golog program to build a suitable tower.