I see, that your circuit is derived from an LM335 datasheet application. Your variant has at least one error and one bad property.
- The LM311 has an open collector rather than an push-pull output, so it can't drive two relays as you intended. A standard OP could, if the relay current isn't too high.
- The circuit has no hysteresis. This is acceptable when directly driven a heating resistor as in the original circuit but very bad with relays. Near the setpoint you get continuous relay clattering and a rather short relay lifetime.
More generally, I doubt if a heat/cool controller should be designed as on-off-controller, because it must be expected to cycle permanently between heating an cooling.