In the enactivist framework, habits are precarious, self-sustaining, and self-individuating sensorimotor structures: they are a first approximation of autonomous sensorimotor entities. We present a prototype computational model which demonstrates a relatively simple mechanism for facilitating the emergence of such habits in robots. At its core this model is a system which retains a history of sensorimotor sequences which are compared and re-enacted by the controller as a function of the recent sensorimotor activity of the controlled robot. To demonstrate an application of this model concretely, we also present a minimal cognition task loosely inspired by the role of sensorimotor contingencies in human colour perception. This task requires that a robot maintains a set of particular sensorimotor coordinations which allow it to respond to different objects appropriately, influenced by an evolved behavioural history.