Recent computational models frame theory of mind as the process of reverse-engineering others’ beliefs and goals from their actions. However, distinguishing between epistemic goals (information, curiosity) and extrinsic motivations (rewards) is crucial for effective social learning. Mistaking one for the other can lead to inaccurate beliefs about others’ knowledge or preferences. We investigated this ability in children aged 7 to 12 using a novel box-selection task. In this task, children inferred the goals of monsters motivated by either maximizing rewards (stars or moons) or seeking to learn the underlying rule governing rewards. Our findings show that children across this age range successfully distinguished between epistemic and extrinsic motivations. Contrary to expectations, there were no significant age differences in this ability, suggesting it remains stable throughout middle childhood. These results highlight the sophistication of children’s reasoning in uncertain environments—a skill that remains challenging even for state-of-the-art computational models.