We theoretically demonstrate the existence of subcycle solitons in a medium with several optical resonances, with the soliton duration smaller than the periods of all resonant transitions in the medium. We show that the evolution of the electric field in this case is governed by the generalized sine-Gordon equation. We find the solitary-wave solutions of this equation both in the case of a conservative and dissipative optical medium. It is shown that stable subcycle solitons in general can only exist in an initially preexcited medium with nonresonant losses. In this case, half-cycle dissipative solitons can be formed and steadily propagate in the resonant medium. In contrast, the stable conservative solitary waves are obtained to only exist at integer ratios of the transition dipole moments of all resonances that are involved.