High levels of team trust have been shown to positively influence team performance. However, a high degree of team trust does not necessarily reflect a strong consensus on trust among team members. Focusing exclusively on trust magnitude may overlook the critical role of the underlying structure of team trust. Building on social identity theory and self-categorization theory, this study investigates the interpersonal antecedents and boundary conditions of trust consensus at both team and subgroup levels, as well as their effects on team task performance. Using social network data from 1,099 team members in 136 teams, the results indicated that team strong friendship ties foster trust consensus at both the team and subgroup levels, which subsequently enhances team task performance. Furthermore, team weak friendship ties were found to inhibit the formation of trust consensus at the team level, while having no significant moderating effect on trust consensus within subgroups. This research contributes to the literature on trust consensus by exploring its hierarchical structure, measurement, and antecedents. Moreover, it extends the understanding of workplace friendships and subgroup dynamics within teams. Our findings also offer several practical implications for seeking to optimize team trust and performance.