Sensor of abasic sites in single-stranded DNA (ssDNA) required to preserve genome integrity by promoting error-free repair of abasic sites (PubMed:30554877, PubMed:31235913, PubMed:31235915, PubMed:32307824, PubMed:32492421). Acts as an enzyme that recognizes and binds abasic sites in ssDNA at replication forks and chemically modifies the lesion by forming a covalent cross-link with DNA: forms a stable thiazolidine linkage between a ring-opened abasic site and the alpha-amino and sulfhydryl substituents of its N-terminal catalytic cysteine residue (PubMed:30554877, PubMed:31235913). Promotes error-free repair by protecting abasic sites from translesion synthesis (TLS) polymerases and endonucleases that are error-prone and would generate mutations and double-strand breaks (PubMed:30554877). The HMCES DNA-protein cross-link is then either reversed or degraded (PubMed:30554877, PubMed:36608669, PubMed:37519246, PubMed:37950866). HMCES is able to catalyze the reversal of its thiazolidine cross-link and cycle between a cross-link and a non-cross-linked state depending on DNA context: mediates self-reversal of the thiazolidine cross-link in double stranded DNA, allowing APEX1 to initiate downstream repair of abasic sites (PubMed:37519246, PubMed:37950866). The HMCES DNA-protein cross-link can also be degraded by the SPRTN metalloprotease following unfolding by the BRIP1/FANCJ helicase (PubMed:36608669). Has preference for ssDNA, but can also accommodate double-stranded DNA with 3′ or 5′ overhang (dsDNA), and dsDNA-ssDNA 3′ junction (PubMed:31235915, PubMed:31806351). Plays a protective role during somatic hypermutation of immunoglobulin genes in B-cells: acts via its ability to form covalent cross-links with abasic sites, thereby limiting the accumulation of deletions in somatic hypermutation target regions (PubMed:35450882). Also involved in class switch recombination (CSR) in B-cells independently of the formation of a DNA-protein cross-link: acts by binding and protecting ssDNA overhangs to promote DNA double-strand break repair through the microhomology-mediated alternative-end-joining (Alt-EJ) pathway (By similarity). Acts as a protease: mediates autocatalytic processing of its N-terminal methionine in order to expose the catalytic cysteine (By similarity).