Abstract In early Solar System during the runaway growth stage of planetary formation, the distribution of planetary bodies progressively evolved from a large number of planetesimals to a smaller number of objects with a few dominant embryos. Here, we study the possible thermal and compositional evolution of these planetesimals and planetary embryos in a series of models with increasing complexities. We show that the heating stages of planetesimals by the radioactive decay of now extinct isotopes (in particular 26Al) and by impact heating can occur in two stages or simultaneously. Depending on the accretion rate, melting occurs from the center outward, in a shallow outer shell progressing inward, or in the two locations. We discuss the regime domains of these situations and show that the exponent β that controls the planetary growth rate R ˙ ∝ R β of planetesimals plays a crucial role. For a given terminal radius and accretion duration, the increase of β maintains the planetesimals very small until the end of accretion, and therefore allows radioactive heating to be radiated away before a large mass can be accreted. To melt the center of ∼500 km planetesimal during its runaway growth stage, with the value β = 2 predicted by astrophysicists, it needs to be formed within a couple of million years after condensation of the first solids. We then develop a multiphase model where the phase changes and phase separations by compaction are taken into account in 1-D spherical geometry. Our model handles simultaneously metal and silicates in both solid and liquid states. The segregation of the protocore decreases the efficiency of radiogenic heating by confining the 26Al in the outer silicate shell. Various types of planetesimals partly differentiated and sometimes differentiated in multiple metal–silicate layers can be obtained.