We investigated the cognitive mechanisms underlying turn-taking joint action in 42-month-old children (Experiment 1) and adults (Experiment 2) using a behavioral task of dressing a virtual bear together. We aimed to investigate how participants represent a partners' behavior, i.e., in terms of specific action kinematics or of action effects. The bear was dressed by pressing a smaller and a bigger button. In the Action-response task, instructions asked participants to respond to the partner by pressing the same or opposite button; in the Action-effect task they had to respond to the partner's action effect by dressing the bear with the lacking part of the clothing, which in some cases implied pressing the same button and in other cases implied pressing the opposite button. In 50% of the trials, the partner's association between each button and the ensuing effect (dressing the bear with t-shirt or pants) was reversed, while it never changed for participants. Both children and adults showed no effect of physical congruency of actions, but showed impaired performance in the Action-effect task if their partner achieved her effect through a different action-effect association than their own. These results suggest that, when encoding their partner's actions, agents are influenced by action-effect associations that they learnt through their own experience. While interference led to overt errors in children, it caused longer reaction times in adults, suggesting that a flexible cognitive control (that is still in development in young children) is required to take on the partner's perspective.