Let \(\Gamma \) be a graph with vertex set V, and let a, b be nonnegative integers. An (a, b)-regular set in \(\Gamma \) is a nonempty proper subset D of V such that every vertex in D has exactly a neighbours in D and every vertex in \(V \setminus D\) has exactly b neighbours in D. In particular, a (1, 1)-regular set is called a total perfect code. Let G be a finite group and S a square-free subset of G closed under conjugation. The Cayley sum graph \(\textrm{CayS}(G,S)\) of G is the graph with vertex set G such that two vertices x, y are adjacent if and only if \(xy \in S\) . A subset (respectively, subgroup) D of G is called an (a, b)-regular set (respectively, subgroup (a, b)-regular set) of G if there exists a Cayley sum graph of G which admits D as an (a, b)-regular set. We obtain two necessary and sufficient conditions for a subgroup of a finite group G to be a total perfect code in a Cayley sum graph of G. We also obtain two necessary and sufficient conditions for a subgroup of a finite abelian group G to be a total perfect code of G. We classify finite abelian groups whose all non-trivial subgroups of even order are total perfect codes of the group, and as a corollary we obtain that a finite abelian group has the property that every non-trivial subgroup is a total perfect code if and only if it is isomorphic to an elementary abelian 2-group. We prove that, for a subgroup H of a finite abelian group G and any pair of positive integers (a, b) within certain ranges depending on H, H is an (a, b)-regular set of G if and only if it is a total perfect code of G. Finally, we give a classification of subgroup total perfect codes of a cyclic group, a dihedral group and a generalized quaternion group.