Habits are an important aspect of human behaviour. Habits are reflexive, inflexible, and fast, in contrast to goal-directed behaviour which is reflective, flexible, and slow. Current theories assume that habits and goal-directed actions are controlled by two separate but interacting systems. However, it is not clear how these two systems interact when actions must be made under time pressure. Here we use a task which induces habitual behaviour in the form of action sequences, while concurrently requiring participants to perform goal-directed actions that are either congruent or incongruent with the habit. This task thus allows for concurrent measurement of both goal-directed and habitual behaviour, thereby permitting a nuanced analysis of the interaction between these two control modes. Using computational modelling, we find that models where the influence of the habit depends on the number of repetitions, explain participant behaviour better than models that assume the habit to be constant. We further show that roughly half of the participants modulate their use of the habit depending on the context, i.e. they selectively inhibit the habit's influence when it is incongruent to their explicit goals, but not when both are congruent and the influence of the habit is adaptive. Additional drift-diffusion modelling of choice and reaction time data shows that proactive control is mobilized in the congruent task context whereas reactive control is mobilized in the incongruent task context. The present study thus indicates that habitual control is context-dependent and can be adaptively deployed via proactive and reactive control, rather than being a fixed or isolated mechanism.