Animals constantly need to cope with changes in their environment. Coping with changes in cues that are associated with the location and abundance of food is essential for being able to adjust behaviourally to a variable environment. The use of cues in decision making requires appropriate levels of attention and learning ability, which may be affected by the personality of an individual. The relationship between personality, attention and learning as essential mechanisms for behavioural adaptation, however, is not well understood. We studied the relationship between attention to environmental cues, behavioural flexibility in learning and exploratory behaviour, a proxy for personality, in great tits, Parus major. We used a dimensional shift learning paradigm; a learning task involving several stages differing in complexity and requiring attention to changes in relevant cues. The results show personality differences in performance in learning flexibility in only the apparently most difficult stage, yet in opposite directions for males and females. Fast-exploring males showed more flexible learning abilities than slow males, whereas in females slow explorers outperformed fast explorers. These context-dependent and sex-specific personality effects reveal behavioural and cognitive mechanisms that may underlie observed sex- and personality-dependent fitness differences in natural populations.