We propose a framework to analyze coalition formation with heterogeneous agents. Existing literature defines stability conditions that do not ensure that, once an agent decides to sign an agreement, the enlarged coalition is feasible. Defining the concepts of refraction and exchanging, we set up conditions of existence and enlargement of a coalition with heterogeneous agents. We use the concept of exchanging agents to give necessary conditions for internal stability and show that refraction is a sufficient condition for the failure of an enlargement of the coalition. With heterogeneous agents we can get a situation where a group of members of an unstable coalition does not deviate, neither within the coalition nor within the extended coalition. Hence, the possibilities of agreement are richer than in the standard analysis with homogeneous agents. Examples of industrial economics are used for illustration, and an application to climate change negotiations is discussed in more detail.