Animals adjust their behaviour over time and contexts to cope with ecological and environmental variation. However, the presence of consistent between-individual differences in behaviour (i.e. personality) suggests that individual behaviour may be less flexible than previously thought. Here, we tested whether the size of the experimental tank and the ontogenetic stage of individuals affect estimates of average and consistent individual variation in activity and risk-taking behaviours in the eastern mosquitofish, Gambusia holbrooki, a fish model widely utilized for behavioural research. We measured risk taking and activity in juvenile, subadult and adult mosquitofish in a standard open-field test, in which the size of test tank varied linearly. We found strong evidence that spatial constraints alter mosquitofish behaviour. In particular, we observed that average activity increased with tank size, while the willingness of fish to take risks was independent of tank size. Moreover, juvenile fish exhibited, on average, lower risk-taking behaviours than older individuals. We highlight that the use of differently sized tanks may result in unequal variation in the average behaviour between juvenile and older fish, with escaping abilities of juvenile fish being underestimated in small environments. Most interestingly, we observed that variation in tank size triggered changes in the individual rank order for both risk taking and activity in juvenile fish, thus altering their personality estimates. In contrast, adult fish maintained consistent individual rank orders across all tank sizes. This study supports the hypothesis that behavioural repeatability increases with age, suggesting that personality estimates on adult animals may be less vulnerable to variation in laboratory contexts than those on juvenile ones.