Construction of a firebox is rather interesting. As early as 1925, the thickness of the firebox with a firebrick lining was required as 8 inches with the lining. Back in 1925, there was a photo that clearly showed the lining is part of the total 8 inch thickness required. As times moved forward and the photo was lost from building codes, this became confusing. The bottom line is that as required in R1001.5 Where a lining of firebrick not less than 2 inches thick or other approved lining is provided, the minimum thickness of back and sidewalls shall each be 8 inches of solid masonry, including the lining. The width of joints between firebricks shall not be greater than ¼ inch (6.4 mm). Where a lining is not provided, the total minimum thickness of back and side walls shall be 10 inches (254 mm) of solid masonry. Firebrick shall conform to ASTM C27 or C1261 and shall be laid with medium- duty refractory mortar conforming to ASTM C199. Most of this code requirement appears straight forward and easy to understand but did you know that many fireplaces are not built to this specification. Before the IRC code formed, only NFPA 211 specified refractory mortar conforming to ASTM C199. BOCA required medium duty fireclay mortar, UBC required the ¼ inch thickness and CABO did not specify either. If you ever see firebox mortar joints that are very deteriorated and falling out then it is because the Portland cement that regular mortar and even fireclay mortar is composed with will break down as it cools through 600 F. Eventually, the bonding Portland material decomposes and all that is left is the sand and fireclay with no cement binder. The Uniform Building Code likely required the ¼ maximum thickness of the firebox joint because they realized these joints were deteriorating and may not have understood why they were deteriorating. To prevent the firebox from becoming loose, they require the joints to be small. Refractory mortars are either hydraulic setting mortars which are basically more lime based and not Portland based or they are selective cement based Portland mortars that have aggregates that can handle high heat. Water can deteriorate mortar joints in a fireplace too but most of the deterioration is a result of the mortar joints deteriorating with high heat. Repointing deteriorated fireplaces with C199 refractory mortar is a great option to restore your firebox to good working order.