We analyze the impact of individuals' self-attribution biases on the formation of teams in the workplace. We consider a two periods model in which workers jointly decide whether to form a team or work alone. We assume workers' abilities are unknown. Agents update their beliefs about abilities after receiving a signal at the end of the first period. We show that allowing workers to learn about their abilities undermines cooperation when a fixed allocation of the group outcome is assumed. Consistent with the latter finding, we establish that making learning about workers' abilities less accessible increases workers' cooperation and welfare. When workers suffer from selfserving attribution, cooperation among agents is undermined whatever the allocation rule considered for the group outcome. We analyze possible solutions to insufficient teamwork. We find that team contracts based on a revelation game can improve cooperation as well as the presence of a manager in the team. Full efficiency is however never achieved. Our paper establishes a basic framework to analyze necessary psychological conditions for individuals to form teams. We apply our model to coauthorship and to organizational issues